细节
-
错误
-
状态: Done">完成
-
低
-
解决方法: 固定
-
3.0.10
-
没有一个
-
没有一个
描述
pt-osc在使用具有(可空的)唯一键的表和具有NULL值的行时,会出现以下错误:
2018-06-26T14:21:48从“test”中复制行错误。' t1 '到' test '。' _t1_new ':在字符串ne中使用未初始化的值。/pt-online-schema-change第6133行。
$ pt-online-schema-change——version pt-online-schema-change 3.0.10
如何重复:
创建表' t1 ' (' id ')int(11) DEFAULT NULL, ' site_name ' varchar(25) DEFAULT NULL, ' last_update ' datetime DEFAULT NULL, UNIQUE KEY ' idx_id ' (' id '), KEY ' idx_last_update ' (' last_update '), KEY ' idx_site_name ' (' site_name '))
INSERT INTO ' t1 ' VALUES (1385108873)“卡洛琳瑞恩”,“2018-01-13 17:05:24”), (2140660022,“帕特里夏·加尔萨”,“2018-01-13 19:07:51”), (1473481373,“雷切尔·乔治”,“2017-12-05 21:09:53”), (1394124308,“珍妮特·狄克逊夫人、女士、小姐”,“2017-10-28 07:07:41”), (1978918050,“小路易·格雷一世二世”,“2017-11-01 22:10:39”), (1275940242,洛伊斯·斯宾塞的,“2018-02-22 01:01:38”),(空,空,空);
pt-online-schema-change——chunk-index idx_id——chunk-size 1——nocheck-plan——execute h=127.0.0.1,P=5713,u=root, P= msandbox,D=test,t=t1
运行的全部输出:
pt-online-schema-change——chunk-index idx_id——chunk-size 1——nocheck-plan——execute h=127.0.0.1,P=5713,u=root, P= msandbox,D=test,t=t1没有slave。看到——recursion-method如果主机bm-support01有slave。没有检查slave lag,因为没有找到slave,并且没有指定——check-slave-lag。操作,尝试,等待:analyze_table, 10,1 copy_rows, 10,0.25 create_triggers, 10,1 drop_triggers, 10,1 swap_tables, 10,1 update_foreign_keys, 10,1正在修改' test ' . ' t1 '…创建新表格创建新表测试。_t1_new OK。2018-06-26T14:47:06创建触发器…2018-06-26T14:47:06创建的触发器OK。2018-06-26T14:47:06复制约5行…2018-06-26T14:47:06掉落触发器…2018-06-26T14:47:06删除触发器OK。2018 - 06 - 26 t14:47:06下降新表格2018 - 06 - 26 t14:47:06下降新表好。“测试”。' t1 '没有改变。2018-06-26T14:47:06从“test”中复制行错误。' t1 '到' test '。' _t1_new ':在字符串ne中使用未初始化的值。/pt-online-schema-change第6133行。
我也会附加调试运行,以防需要。
PTDEBUG=1 pt-online-schema-change——chunk-index idx_id——chunk-size 1——nocheck-plan——execute h=127.0.0.1,P=5713,u=root, P= msandbox,D=test,t=t1 > pt-osc.debug.out 2>&1
值得注意的一件有趣的事情是,错误消息在进行调试输出时发生了变化:
2018-06-26T14:50:50从“test”中复制行错误。' t1 '到' test '。' _t1_new ':在。/pt-online-schema-change第6092行使用未初始化的值。