Loading configure.in +1 −1 Original line number Diff line number Diff line Loading @@ -343,7 +343,7 @@ MYSQL_PROG_AR # libmysqlclient versioning when linked with GNU ld. if $LD --version 2>/dev/null|grep -q GNU; then LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libmysql/libmysql.ver" LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libmysql/libmysql.ver" AC_CONFIG_FILES(libmysql/libmysql.ver) fi AC_SUBST(LD_VERSION_SCRIPT) Loading include/heap.h +1 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,7 @@ typedef struct st_heap_share HP_KEYDEF *keydef; ulong min_records,max_records; /* Params to open */ ulong data_length,index_length,max_table_size; uint key_stat_version; /* version to indicate insert/delete */ uint records; /* records */ uint blength; /* records rounded up to 2^n */ uint deleted; /* Deleted records in database */ Loading libmysql/libmysql.c +6 −0 Original line number Diff line number Diff line Loading @@ -5036,6 +5036,12 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt) { DBUG_ENTER("mysql_stmt_reset"); DBUG_ASSERT(stmt != 0); if (!stmt->mysql) { /* mysql can be reset in mysql_close called from mysql_reconnect */ set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate); DBUG_RETURN(1); } /* Reset the client and server sides of the prepared statement */ DBUG_RETURN(reset_stmt_handle(stmt, RESET_SERVER_SIDE | RESET_LONG_DATA)); } Loading mysql-test/extra/rpl_tests/rpl000006.testdeleted 100644 → 0 +0 −47 Original line number Diff line number Diff line # # Test forced timestamp # -- source include/master-slave.inc # Don't log table creating to the slave as we want to test LOAD TABLE set SQL_LOG_BIN=0,timestamp=200006; create table t1(t timestamp not null,a char(1)); insert into t1 ( a) values ('F'); select unix_timestamp(t) from t1; connection slave; load table t1 from master; select unix_timestamp(t) from t1; # Delete the created table on master and slave connection master; set SQL_LOG_BIN=1,timestamp=default; drop table t1; save_master_pos; connection slave; sync_with_master; connection master; # # Test copying table with checksum # # Don't log table creating to the slave as we want to test LOAD TABLE set SQL_LOG_BIN=0; eval CREATE TABLE t1 ( a int not null ) ENGINE=$engine_type MAX_ROWS=4000 CHECKSUM=1; INSERT INTO t1 VALUES (1); save_master_pos; connection slave; sync_with_master; load table t1 from master; check table t1; drop table t1; connection master; drop table t1; save_master_pos; connection slave; sync_with_master; # End of 4.1 tests mysql-test/extra/rpl_tests/rpl_insert_id.test +17 −7 Original line number Diff line number Diff line ########################################################### # 2006-02-01: By JBM: Added 1022, ORDER BY ########################################################### # See if queries that use both auto_increment and LAST_INSERT_ID() # are replicated well ############################################################ # REQUIREMENT # Auto increment should work for a table with an auto_increment # column and index but without primary key. ############################################################## # We also check how the foreign_key_check variable is replicated Loading @@ -15,8 +24,8 @@ insert into t2 values (null,last_insert_id()); save_master_pos; connection slave; sync_with_master; select * from t1; select * from t2; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; #check if multi-line inserts, #which set last_insert_id to the first id inserted, Loading Loading @@ -49,13 +58,13 @@ create table t2(b int auto_increment, c int, key(b)); insert into t1 values (10); insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 (c) select * from t1; select * from t2; insert into t2 (c) select * from t1 ORDER BY a; select * from t2 ORDER BY b; save_master_pos; connection slave; sync_with_master; select * from t1; select * from t2; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; drop table t1; drop table t2; Loading @@ -71,7 +80,8 @@ connection master; SET TIMESTAMP=1000000000; CREATE TABLE t1 ( a INT UNIQUE ); SET FOREIGN_KEY_CHECKS=0; --error 1062 # Duplicate Key Errors --error 1022, 1062 INSERT INTO t1 VALUES (1),(1); sync_slave_with_master; Loading Loading
configure.in +1 −1 Original line number Diff line number Diff line Loading @@ -343,7 +343,7 @@ MYSQL_PROG_AR # libmysqlclient versioning when linked with GNU ld. if $LD --version 2>/dev/null|grep -q GNU; then LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libmysql/libmysql.ver" LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libmysql/libmysql.ver" AC_CONFIG_FILES(libmysql/libmysql.ver) fi AC_SUBST(LD_VERSION_SCRIPT) Loading
include/heap.h +1 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,7 @@ typedef struct st_heap_share HP_KEYDEF *keydef; ulong min_records,max_records; /* Params to open */ ulong data_length,index_length,max_table_size; uint key_stat_version; /* version to indicate insert/delete */ uint records; /* records */ uint blength; /* records rounded up to 2^n */ uint deleted; /* Deleted records in database */ Loading
libmysql/libmysql.c +6 −0 Original line number Diff line number Diff line Loading @@ -5036,6 +5036,12 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt) { DBUG_ENTER("mysql_stmt_reset"); DBUG_ASSERT(stmt != 0); if (!stmt->mysql) { /* mysql can be reset in mysql_close called from mysql_reconnect */ set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate); DBUG_RETURN(1); } /* Reset the client and server sides of the prepared statement */ DBUG_RETURN(reset_stmt_handle(stmt, RESET_SERVER_SIDE | RESET_LONG_DATA)); } Loading
mysql-test/extra/rpl_tests/rpl000006.testdeleted 100644 → 0 +0 −47 Original line number Diff line number Diff line # # Test forced timestamp # -- source include/master-slave.inc # Don't log table creating to the slave as we want to test LOAD TABLE set SQL_LOG_BIN=0,timestamp=200006; create table t1(t timestamp not null,a char(1)); insert into t1 ( a) values ('F'); select unix_timestamp(t) from t1; connection slave; load table t1 from master; select unix_timestamp(t) from t1; # Delete the created table on master and slave connection master; set SQL_LOG_BIN=1,timestamp=default; drop table t1; save_master_pos; connection slave; sync_with_master; connection master; # # Test copying table with checksum # # Don't log table creating to the slave as we want to test LOAD TABLE set SQL_LOG_BIN=0; eval CREATE TABLE t1 ( a int not null ) ENGINE=$engine_type MAX_ROWS=4000 CHECKSUM=1; INSERT INTO t1 VALUES (1); save_master_pos; connection slave; sync_with_master; load table t1 from master; check table t1; drop table t1; connection master; drop table t1; save_master_pos; connection slave; sync_with_master; # End of 4.1 tests
mysql-test/extra/rpl_tests/rpl_insert_id.test +17 −7 Original line number Diff line number Diff line ########################################################### # 2006-02-01: By JBM: Added 1022, ORDER BY ########################################################### # See if queries that use both auto_increment and LAST_INSERT_ID() # are replicated well ############################################################ # REQUIREMENT # Auto increment should work for a table with an auto_increment # column and index but without primary key. ############################################################## # We also check how the foreign_key_check variable is replicated Loading @@ -15,8 +24,8 @@ insert into t2 values (null,last_insert_id()); save_master_pos; connection slave; sync_with_master; select * from t1; select * from t2; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; #check if multi-line inserts, #which set last_insert_id to the first id inserted, Loading Loading @@ -49,13 +58,13 @@ create table t2(b int auto_increment, c int, key(b)); insert into t1 values (10); insert into t1 values (null),(null),(null); insert into t2 values (5,0); insert into t2 (c) select * from t1; select * from t2; insert into t2 (c) select * from t1 ORDER BY a; select * from t2 ORDER BY b; save_master_pos; connection slave; sync_with_master; select * from t1; select * from t2; select * from t1 ORDER BY a; select * from t2 ORDER BY b; connection master; drop table t1; drop table t2; Loading @@ -71,7 +80,8 @@ connection master; SET TIMESTAMP=1000000000; CREATE TABLE t1 ( a INT UNIQUE ); SET FOREIGN_KEY_CHECKS=0; --error 1062 # Duplicate Key Errors --error 1022, 1062 INSERT INTO t1 VALUES (1),(1); sync_slave_with_master; Loading