Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle-MySQL 8 job: Data type CHAR(255) / CHARACTER(255) / NCHAR(255) Sync update statement failed #973

Open
asiroliu opened this issue May 12, 2022 · 0 comments
Labels

Comments

@asiroliu
Copy link
Collaborator

asiroliu commented May 12, 2022

Description

Oracle-MySQL 8 job: Data type CHAR(255) / CHARACTER(255) / NCHAR(255) Sync update statement failed

Steps to reproduce the issue

  1. create dtle job
{
  "job_id": "CHAR_255_COLUMNS",
  "is_password_encrypted": false,
  "task_step_name": "all",
  "failover": true,
  "retry": 2,
  "src_task": {
    "task_name": "src",
    "node_id": "35a4ebcf-1ed0-94a8-3a77-823802fc13fe",
    "binlog_relay": false,
    "repl_chan_buffer_size": 120,
    "group_max_size": 1,
    "group_timeout": 100,
    "oracle_src_task_config": {
      "scn": 0
    },
    "connection_config": {
      "database_type": "Oracle",
      "host": "172.100.9.31",
      "port": 1521,
      "user": "roma_logminer",
      "password": "oracle",
      "service_name": "XE"
    },
    "replicate_do_db": [
      {
        "table_schema": "ACTION_DB",
        "tables": [
          {
            "table_name": "CHAR_255_COLUMNS"
          }
        ]
      }
    ]
  },
  "dest_task": {
    "task_name": "dest",
    "node_id": "2205ffbc-6b16-7208-99c0-eb15e6d24370",
    "mysql_dest_task_config": {},
    "connection_config": {
      "database_type": "MySQL",
      "host": "172.100.9.2",
      "port": 3306,
      "user": "test_dest",
      "password": "test_dest"
    }
  }
}
  1. load data on src Oracle
CREATE TABLE ACTION_DB.CHAR_255_COLUMNS(col1 INT, col2 CHAR(255));
INSERT INTO ACTION_DB.CHAR_255_COLUMNS VALUES (1, 'abcdefghijklmnopqrstuvwxyz');
UPDATE ACTION_DB.CHAR_255_COLUMNS SET COL2='ABCDEFGHIJKLMNOPQRSTUVWXYZ' WHERE COL1=1;
  1. dest MySQL check data, the update statement not synchronized
mysql> select * from CHAR_255_COLUMNS where COL1=1;
+------+----------------------------+
| COL1 | COL2                       |
+------+----------------------------+
|    1 | abcdefghijklmnopqrstuvwxyz |
+------+----------------------------+
1 row in set (0.00 sec)
  1. check dest general log
2022-05-12T06:55:20.442375Z        17 Execute   update `ACTION_DB`.`CHAR_255_COLUMNS` set
`COL1`='1', `COL2`='ABCDEFGHIJKLMNOPQRSTUVWXYZ                                                                                                                                                                                                                                     '
where
((`COL1` = '1') and (`COL2` = 'abcdefghijklmnopqrstuvwxyz                                                                                                                                                                                                                                     ')) limit 1
  1. verify where condition, string with space
# MySQL 8
mysql> select * from CHAR_255_COLUMNS where COL2='abcdefghijklmnopqrstuvwxyz    ';
Empty set (0.00 sec)
# MySQL 5
mysql> select * from CHAR_255_COLUMNS where COL2='abcdefghijklmnopqrstuvwxyz   ';
+------+----------------------------+
| COL1 | COL2                       |
+------+----------------------------+
|    1 | abcdefghijklmnopqrstuvwxyz |
+------+----------------------------+
1 rows in set (0.00 sec)

Output of ./dtle version:**

9.9.9.9-master-352256e
@LordofAvernus LordofAvernus added this to the 4.22.07.0 milestone Jun 24, 2022
@LordofAvernus LordofAvernus removed this from the 4.22.07.0 milestone Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants