source include/master-slave.inc; SET BINLOG_FORMAT = 'STATEMENT'; connection master; --disable_warnings drop table if exists t1; --enable_warnings CREATE TABLE t1 ( `pk` int(11) NOT NULL AUTO_INCREMENT, `int_nokey` int(11) NOT NULL, `int_key` int(11) NOT NULL, `date_key` date NOT NULL, `date_nokey` date NOT NULL, `time_key` time NOT NULL, `time_nokey` time NOT NULL, `datetime_key` datetime NOT NULL, `datetime_nokey` datetime NOT NULL, `varchar_key` varchar(1) NOT NULL, `varchar_nokey` varchar(1) NOT NULL, PRIMARY KEY (`pk`), KEY `int_key` (`int_key`), KEY `date_key` (`date_key`), KEY `time_key` (`time_key`), KEY `datetime_key` (`datetime_key`), KEY `varchar_key` (`varchar_key`) ); INSERT INTO t1 VALUES (1,8,5,'0000-00-00','0000-00-00','10:37:38','10:37:38','0000-00-00 00:00:00','0000-00-00 00:00:00','p','p'), (2,1,6,'2005-12-23','2005-12-23','02:24:28','02:24:28','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'), (3,0,3,'2009-09-14','2009-09-14','00:00:00','00:00:00','2000-01-30 16:39:40','2000-01-30 16:39:40','q','q'), (4,1,4,'2002-12-03','2002-12-03','20:34:58','20:34:58','2009-10-28 09:46:21','2009-10-28 09:46:21','g','g'), (5,1,6,'2007-03-29','2007-03-29','15:49:00','15:49:00','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'), (6,4,0,'2002-12-04','2002-12-04','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','o','o'), (7,9,0,'2005-01-28','2005-01-28','00:00:00','00:00:00','2001-05-18 00:00:00','2001-05-18 00:00:00','w','w'), (8,6,0,'0000-00-00','0000-00-00','06:57:25','06:57:25','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'), (9,0,0,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','z','z'), (10,4,6,'2006-08-15','2006-08-15','00:00:00','00:00:00','2002-04-12 14:44:25','2002-04-12 14:44:25','j','j'), (11,0,5,'2006-12-20','2006-12-20','10:13:53','10:13:53','2008-07-22 00:00:00','2008-07-22 00:00:00','y','y'), (12,9,7,'0000-00-00','0000-00-00','00:00:00','00:00:00','2004-07-05 00:00:00','2004-07-05 00:00:00','{','{'), (13,4,3,'2007-01-26','2007-01-26','23:00:51','23:00:51','2001-05-16 00:00:00','2001-05-16 00:00:00','f','f'), (14,7,0,'2004-03-27','2004-03-27','00:00:00','00:00:00','2005-01-24 03:30:37','2005-01-24 03:30:37','',''), (15,6,0,'2006-07-26','2006-07-26','18:43:57','18:43:57','0000-00-00 00:00:00','0000-00-00 00:00:00','{','{'), (16,0,6,'2000-01-14','2000-01-14','00:00:00','00:00:00','2000-09-21 00:00:00','2000-09-21 00:00:00','o','o'), (17,9,8,'0000-00-00','0000-00-00','21:15:08','21:15:08','0000-00-00 00:00:00','0000-00-00 00:00:00','a','a'), (18,2,0,'2004-10-27','2004-10-27','00:00:00','00:00:00','2004-03-24 22:13:43','2004-03-24 22:13:43','',''), (19,7,4,'0000-00-00','0000-00-00','08:38:27','08:38:27','2002-03-18 19:51:44','2002-03-18 19:51:44','t','t'), (20,5,3,'2008-03-07','2008-03-07','03:29:07','03:29:07','2007-12-01 18:44:44','2007-12-01 18:44:44','t','t'), (77,6,0,'2009-05-19','2009-05-19','14:56:44','14:56:44','2007-09-09 22:47:39','2007-09-09 22:47:39','',''), (35,6,3,'0000-00-00','0000-00-00','09:38:22','09:38:22','0000-00-00 00:00:00','0000-00-00 00:00:00','i','i'), (39,8,8,'0000-00-00','0000-00-00','10:25:31','10:25:31','2003-01-24 10:45:23','2003-01-24 10:45:23','',''), (29,5,6,'0000-00-00','0000-00-00','00:21:35','00:21:35','0000-00-00 00:00:00','0000-00-00 00:00:00','y','y'), (53,3,5,'0000-00-00','0000-00-00','00:00:00','00:00:00','2007-11-05 23:51:21','2007-11-05 23:51:21','p','p'), (60,0,2,'2009-09-11','2009-09-11','23:56:26','23:56:26','2003-12-24 04:28:32','2003-12-24 04:28:32','n','n'), (93,7,2,'2007-08-18','2007-08-18','00:00:00','00:00:00','2009-02-01 00:00:00','2009-02-01 00:00:00','y','y'); --eval SELECT * FROM t1 ORDER BY RAND () LIMIT 8 INTO OUTFILE "$MYSQL_TEST_DIR/var/tmp/bug38174-1.test" --eval LOAD DATA INFILE "$MYSQL_TEST_DIR/var/tmp/bug38174-1.test" REPLACE INTO TABLE t1 --eval SELECT * FROM t1 ORDER BY RAND () LIMIT 4 INTO OUTFILE "$MYSQL_TEST_DIR/var/tmp/bug38174-2.test" --eval LOAD DATA INFILE "$MYSQL_TEST_DIR/var/tmp/bug38174-2.test" REPLACE INTO TABLE t1 --remove_file $MYSQL_TEST_DIR/var/tmp/bug38174-1.test --remove_file $MYSQL_TEST_DIR/var/tmp/bug38174-2.test save_master_pos; connection slave; sync_with_master;