Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 5.5.40
-
Fix Version/s: 5.5.44
-
Component/s: Replication
-
Labels:None
-
Environment:centos-6.5
x86_64
-
Sprint:5.5.44
Description
If the middle of a pt-online-schema change using --set-vars binlogformat=ROW the following replication error.
The table was created on 5.0.34 and has since been upgraded over time to 5.5.29. Could it be the column is the old decimal format?
http://forums.mysql.com/read.php?26,619649,619718#msg-619718 references (Bug #16416302).
Server version: 5.5.29-MariaDB-log MariaDB Server
Same effects where observed on 5.5.40 slave.
MariaDB [weather]> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.124.35
Master_User: replication
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.046692
Read_Master_Log_Pos: 67654425
Relay_Log_File: mysqld-relay-bin.930329
Relay_Log_Pos: 30748354
Relay_Master_Log_File: mysql-bin.046557
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1677
Last_Error: Column 3 of table 'weather.lightning' cannot be converted from type 'decimal(0,?)' to type 'decimal(10,7)'
Skip_Counter: 0
Exec_Master_Log_Pos: 30748070
Relay_Log_Space: 14291648459
Until_Condition: None
on master:
mysqlbinlog --start-position 30748070 mysql-bin.046557 | more BEGIN /*!*/; # at 30748141 # at 30748202 # at 30748274 #141204 10:12:43 server id 1 end_log_pos 30748202 Table_map: `weather`.`lightning` mapped to number 177647 #141204 10:12:43 server id 1 end_log_pos 30748274 Table_map: `weather`.`_lightning_new` mapped to number 177646 #141204 10:12:43 server id 1 end_log_pos 30748356 Delete_rows: table id 177647 flags: STMT_END_F BINLOG ' 65h/VBMBAAAAPQAAACou1QEAAO+1AgAAAAEAB3dlYXRoZXIACWxpZ2h0bmluZwAHAw8MAAAADwQK AAoAYA== 65h/VBMBAAAASAAAAHIu1QEAAO61AgAAAAEAB3dlYXRoZXIADl9saWdodG5pbmdfbmV3AAcDDwz2 9vYPCgoACgcKBwUBCgBg 65h/VBkBAAAAUgAAAMQu1QEAAO+1AgAAAAEAB/+AG4GOBAVHUEFUU5OG1tNFEgAAIC0zMy42MzA3 NDc5IDE1Mi44MzIwNjk3ICAtNDEuMgJHUw== '/*!*/; # at 30748356 #141204 10:12:43 server id 1 end_log_pos 30748383 Xid = 12786901894 COMMIT/*!*/;
decoded version
mysqlbinlog --start-position 30748070 --verbose --base64-output=decode-rows mysql-bin.046557 | more BEGIN /*!*/; # at 30748141 # at 30748202 # at 30748274 #141204 10:12:43 server id 1 end_log_pos 30748202 Table_map: `weather`.`lightning` mapped to number 177647 #141204 10:12:43 server id 1 end_log_pos 30748274 Table_map: `weather`.`_lightning_new` mapped to number 177646 #141204 10:12:43 server id 1 end_log_pos 30748356 Delete_rows: table id 177647 flags: STMT_END_F ### DELETE FROM `weather`.`lightning` ### WHERE ### @1=76448027 ### @2='GPATS' ### @3=2009-11-16 09:51:23 ### @4=!! Don't know how to handle column type=0 meta=0 (0000)# at 30748356 #141204 10:12:43 server id 1 end_log_pos 30748383 Xid = 12786901894 COMMIT/*!*/;
| lightning | CREATE TABLE `lightning` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `source` varchar(10) NOT NULL DEFAULT '', `timestamp_utc` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `latitude` decimal(10,7) NOT NULL DEFAULT '0.0000000', `longitude` decimal(10,7) NOT NULL DEFAULT '0.0000000', `amperage` decimal(5,1) DEFAULT NULL, `event_type` varchar(10) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `idx_lightning_1` (`source`,`timestamp_utc`,`latitude`,`longitude`) ) ENGINE=InnoDB AUTO_INCREMENT=484282187 DEFAULT CHARSET=latin1 MAX_ROWS=1000000000 ROW_FORMAT=DYNAMIC | | _lightning_new | CREATE TABLE `_lightning_new` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `source` varchar(10) NOT NULL DEFAULT '', `timestamp_utc` datetime(3) NOT NULL COMMENT 'UTC time (millisecond precision)', `latitude` decimal(10,7) NOT NULL DEFAULT '0.0000000', `longitude` decimal(10,7) NOT NULL DEFAULT '0.0000000', `amperage` decimal(5,1) DEFAULT NULL, `event_type` varchar(10) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `idx_lightning_1` (`source`,`timestamp_utc`,`latitude`,`longitude`) ) ENGINE=InnoDB AUTO_INCREMENT=484282186 DEFAULT CHARSET=latin1 MAX_ROWS=1000000000 ROW_FORMAT=DYNAMIC |
After changing the format to doubles I had different conversion error at the same position.
alter table _lightning_new modify latitude double NOT NULL DEFAULT 0.0000000,modify longitude double NOT NULL DEFAULT 0.0000000, modify amperage double DEFAULT NULL;
slart slave;
MariaDB [weather]> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.124.35
Master_User: replication
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.046693
Read_Master_Log_Pos: 34510815
Relay_Log_File: mysqld-relay-bin.930329
Relay_Log_Pos: 30748354
Relay_Master_Log_File: mysql-bin.046557
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1677
Last_Error: Column 3 of table 'weather._lightning_new' cannot be converted from type 'decimal(10,7)' to type 'double'
Skip_Counter: 0
Exec_Master_Log_Pos: 30748070
Relay_Log_Space: 14363364234
Until_Condition: None
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Hide
Daniel Black
added a comment -
Permalink
Show
Daniel Black
added a comment -
set global slave_type_conversions='ALL_NON_LOSSY,ALL_LOSSY';
start slave;
141205 9:25:11 [ERROR] Slave SQL: Column 3 of table 'weather.lightning' cannot be converted from type 'decimal(0,?)' to type 'decimal(10,7)', Error_code: 1677
141205 9:25:11 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.046557' positio
n 30748070
141205 9:26:56 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.046557' at position 30748070, relay log '/var/mysql_log/mysqld-relay-bin.930329' position: 30
748354
141205 9:26:56 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see http://kb.askmonty.org/en/reporting-bugs
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Server version: 5.5.29-MariaDB-log
key_buffer_size=134217728
read_buffer_size=8388608
max_used_connections=12
max_threads=202
thread_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 3443474 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x7fafec0008c0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7fafffb4ed98 thread_stack 0x48000
??:0(my_print_stacktrace)[0xa975ee]
??:0(handle_fatal_signal)[0x6d4fcc]
??:0(??)[0x329080f710]
??:0(Field_decimal::store(char const*, unsigned int, charset_info_st const*))[0x6cb812]
??:0(Field_decimal::reset())[0x6cc3f8]
??:0(create_virtual_tmp_table(THD*, List<Create_field>&))[0x5a19d1]
??:0(table_def::create_conversion_table(THD*, Relay_log_info*, TABLE*) const)[0x62f486]
??:0(table_def::compatible_with(THD*, Relay_log_info*, TABLE*, TABLE**) const)[0x62ffa9]
??:0(Rows_log_event::do_apply_event(Relay_log_info const*))[0x7aeb49]
??:0(apply_event_and_update_pos(Log_event*, THD*, Relay_log_info*))[0x50df22]
??:0(exec_relay_log_event(THD*, Relay_log_info*))[0x515c30]
??:0(handle_slave_sql)[0x516f44]
??:0(??)[0x32908079d1]
??:0(??)[0x32904e8b6d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x0): is an invalid pointer
Connection ID (thread ID): 126479
Status: NOT_KILLED
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_conditi
on_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,s
ubquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_j
oin_buffer_size=off,table_elimination=on,extended_keys=off