Loading .bzrignore +10 −9 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ Makefile.in Makefile.in' PENDING/* TAGS VC++Files/client/mysql_amd64.dsp ac_available_languages_fragment acinclude.m4 aclocal.m4 Loading Loading @@ -274,6 +275,8 @@ client/mysqlmanager-pwgen client/mysqlmanagerc client/mysqlshow client/mysqltest client/mysqltestmanager-pwgen client/mysqltestmanagerc client/mysys_priv.h client/select_test client/ssl_test Loading @@ -284,10 +287,12 @@ cmd-line-utils/libedit/common.h cmd-line-utils/libedit/makelist comon.h config.cache config.guess config.h config.h.in config.log config.status config.sub configure configure.lineno core Loading Loading @@ -355,6 +360,7 @@ innobase/ib_config.h.in innobase/stamp-h1 insert_test install install-sh isam/isamchk isam/isamlog isam/pack_isam Loading Loading @@ -519,7 +525,9 @@ linked_libmysqldex_sources linked_server_sources linked_tools_sources locked ltmain.sh man/*.1 missing mit-pthreads/config.flags mit-pthreads/include/bits mit-pthreads/include/pthread/machdep.h Loading Loading @@ -936,6 +944,7 @@ scripts/mysqld_multi scripts/mysqld_safe scripts/mysqldumpslow scripts/mysqlhotcopy scripts/mysqlhotcopy.sh.rej scripts/safe_mysqld select_test server-tools/instance-manager/client.c Loading Loading @@ -1100,18 +1109,10 @@ tmp/* tools/my_vsnprintf.c tools/mysqlmanager tools/mysqlmngd tools/mysqltestmanager tools/mysys_priv.h vi.h vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl VC++Files/client/mysql_amd64.dsp client/mysqltestmanager-pwgen client/mysqltestmanagerc tools/mysqltestmanager config.guess config.sub install-sh ltmain.sh missing BitKeeper/etc/logging_ok +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ dlenev@build.mysql.com dlenev@jabberwock.localdomain dlenev@mysql.com ejonore@mc03.ndb.mysql.com elliot@mysql.com evgen@moonbone.(none) evgen@moonbone.local gbichot@bk-internal.mysql.com Loading myisam/mi_key.c +3 −3 Original line number Diff line number Diff line Loading @@ -107,7 +107,8 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, } if (keyseg->flag & HA_SPACE_PACK) { end=pos+length; FIX_LENGTH(cs, pos, length, char_length); end= pos + char_length; if (type != HA_KEYTYPE_NUM) { while (end > pos && end[-1] == ' ') Loading @@ -118,8 +119,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, while (pos < end && pos[0] == ' ') pos++; } length=(uint) (end-pos); FIX_LENGTH(cs, pos, length, char_length); char_length= (uint) (end - pos); store_key_length_inc(key,char_length); memcpy((byte*) key,(byte*) pos,(size_t) char_length); key+=char_length; Loading mysql-test/include/rpl_stmt_seq.inc 0 → 100644 +180 −0 Original line number Diff line number Diff line # include/rpl_stmt_seq.inc # # Please be very careful when editing this routine, because the handling of # the $variables is extreme sensitive. # ######## The typical test sequence # 1. INSERT without commit # check table content of master and slave # 2. EXECUTE the statement # check table content of master and slave # 3. ROLLBACK # check table content of master and slave # 4. flush the logs let $VERSION=`select version()`; --disable_query_log # SELECT '######## new test sequence ########' as ""; eval SELECT CONCAT('######## ','$my_stmt',' ########') as ""; --enable_query_log ############################################################### # Predict the number of the current log ############################################################### # Disable the logging of the log number computation. --disable_query_log # $_log_num_n should contain the number of the current binlog in numeric style. # If this routine is called for the first time, $_log_num will not initialized # and contain the value '' instead of '1'. So we will correct it here. # eval set @aux= IF('$_log_num_n' = '', '1', '$_log_num_n'); let $_log_num_n= `SELECT @aux`; eval set @aux= LPAD('$_log_num_n',6,'0'); # SELECT @aux AS "@aux is"; # # $_log_num_s should contain the number of the current binlog in string style. let $_log_num_s= `select @aux`; # eval SELECT '$log_num' ; --enable_query_log ############################################################### # INSERT ############################################################### connection master; --disable_query_log SELECT '-------- switch to master -------' as ""; --enable_query_log # Maybe it would be smarter to use a table with autoincrement column. let $MAX= `SELECT MAX(f1) FROM t1` ; eval INSERT INTO t1 SET f1= $MAX + 1; # results before DDL(to be tested) SELECT MAX(f1) FROM t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; sync_slave_with_master; connection slave; --disable_query_log SELECT '-------- switch to slave --------' as ""; --enable_query_log # results before DDL(to be tested) SELECT MAX(f1) FROM t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; ############################################################### # command to be tested ############################################################### connection master; --disable_query_log SELECT '-------- switch to master -------' as ""; --enable_query_log eval $my_stmt; # Devaluate $my_stmt, to detect script bugs let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT; # results after DDL(to be tested) SELECT MAX(f1) FROM t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; sync_slave_with_master; connection slave; --disable_query_log SELECT '-------- switch to slave --------' as ""; --enable_query_log # results after DDL(to be tested) SELECT MAX(f1) FROM t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; ############################################################### # ROLLBACK ############################################################### connection master; --disable_query_log SELECT '-------- switch to master -------' as ""; --enable_query_log ROLLBACK; # results after final ROLLBACK SELECT MAX(f1) FROM t1; # Try to detect if the DDL command caused that the INSERT is committed # $MAX holds the highest/last value just before the insert of MAX + 1 --disable_query_log eval SELECT CONCAT(CONCAT('TEST-INFO: MASTER: The INSERT is ', IF(MAX(f1) = $MAX + 1, 'committed', 'not committed')), IF((MAX(f1) = $MAX + 1) XOR NOT $my_master_commit, ' (Succeeded)', ' (Failed)')) AS "" FROM mysqltest1.t1; --enable_query_log --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; sync_slave_with_master; connection slave; --disable_query_log SELECT '-------- switch to slave --------' as ""; --enable_query_log # results after final ROLLBACK SELECT MAX(f1) FROM t1; --disable_query_log eval SELECT CONCAT(CONCAT('TEST-INFO: SLAVE: The INSERT is ', IF(MAX(f1) = $MAX + 1, 'committed', 'not committed')), IF((MAX(f1) = $MAX + 1) XOR NOT $my_slave_commit, ' (Succeeded)', ' (Failed)')) AS "" FROM mysqltest1.t1; --enable_query_log --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; ############################################################### # Manipulate binlog ############################################################### #let $manipulate= 0; let $manipulate= 1; while ($manipulate) { #### Manipulate the binary logs, # so that the output of SHOW BINLOG EVENTS IN <current log> # contains only commands of the current test sequence. # - flush the master and the slave log # ---> both start to write into new logs with incremented number # - increment $_log_num_n connection master; --disable_query_log SELECT '-------- switch to master -------' as ""; --enable_query_log flush logs; # sleep 1; # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; sync_slave_with_master; connection slave; --disable_query_log SELECT '-------- switch to slave --------' as ""; --enable_query_log # the final content of the binary log flush logs; # The next sleep is urgent needed. # Without this sleep the slaves crashes often, when the SHOW BINLOG # is executed. :-( # sleep 1; # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; inc $_log_num_n; let $manipulate= 0; } connection master; --disable_query_log SELECT '-------- switch to master -------' as ""; --enable_query_log mysql-test/r/ctype_utf8.result +11 −0 Original line number Diff line number Diff line Loading @@ -891,3 +891,14 @@ string create table t1 (a varchar(255)) default character set utf8; insert into t1 values (1.0); drop table t1; create table t1 ( id int not null, city varchar(20) not null, key (city(7),id) ) character set=utf8; insert into t1 values (1,'Durban North'); insert into t1 values (2,'Durban'); select * from t1 where city = 'Durban'; id city 2 Durban drop table t1; Loading
.bzrignore +10 −9 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ Makefile.in Makefile.in' PENDING/* TAGS VC++Files/client/mysql_amd64.dsp ac_available_languages_fragment acinclude.m4 aclocal.m4 Loading Loading @@ -274,6 +275,8 @@ client/mysqlmanager-pwgen client/mysqlmanagerc client/mysqlshow client/mysqltest client/mysqltestmanager-pwgen client/mysqltestmanagerc client/mysys_priv.h client/select_test client/ssl_test Loading @@ -284,10 +287,12 @@ cmd-line-utils/libedit/common.h cmd-line-utils/libedit/makelist comon.h config.cache config.guess config.h config.h.in config.log config.status config.sub configure configure.lineno core Loading Loading @@ -355,6 +360,7 @@ innobase/ib_config.h.in innobase/stamp-h1 insert_test install install-sh isam/isamchk isam/isamlog isam/pack_isam Loading Loading @@ -519,7 +525,9 @@ linked_libmysqldex_sources linked_server_sources linked_tools_sources locked ltmain.sh man/*.1 missing mit-pthreads/config.flags mit-pthreads/include/bits mit-pthreads/include/pthread/machdep.h Loading Loading @@ -936,6 +944,7 @@ scripts/mysqld_multi scripts/mysqld_safe scripts/mysqldumpslow scripts/mysqlhotcopy scripts/mysqlhotcopy.sh.rej scripts/safe_mysqld select_test server-tools/instance-manager/client.c Loading Loading @@ -1100,18 +1109,10 @@ tmp/* tools/my_vsnprintf.c tools/mysqlmanager tools/mysqlmngd tools/mysqltestmanager tools/mysys_priv.h vi.h vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl VC++Files/client/mysql_amd64.dsp client/mysqltestmanager-pwgen client/mysqltestmanagerc tools/mysqltestmanager config.guess config.sub install-sh ltmain.sh missing
BitKeeper/etc/logging_ok +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ dlenev@build.mysql.com dlenev@jabberwock.localdomain dlenev@mysql.com ejonore@mc03.ndb.mysql.com elliot@mysql.com evgen@moonbone.(none) evgen@moonbone.local gbichot@bk-internal.mysql.com Loading
myisam/mi_key.c +3 −3 Original line number Diff line number Diff line Loading @@ -107,7 +107,8 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, } if (keyseg->flag & HA_SPACE_PACK) { end=pos+length; FIX_LENGTH(cs, pos, length, char_length); end= pos + char_length; if (type != HA_KEYTYPE_NUM) { while (end > pos && end[-1] == ' ') Loading @@ -118,8 +119,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, while (pos < end && pos[0] == ' ') pos++; } length=(uint) (end-pos); FIX_LENGTH(cs, pos, length, char_length); char_length= (uint) (end - pos); store_key_length_inc(key,char_length); memcpy((byte*) key,(byte*) pos,(size_t) char_length); key+=char_length; Loading
mysql-test/include/rpl_stmt_seq.inc 0 → 100644 +180 −0 Original line number Diff line number Diff line # include/rpl_stmt_seq.inc # # Please be very careful when editing this routine, because the handling of # the $variables is extreme sensitive. # ######## The typical test sequence # 1. INSERT without commit # check table content of master and slave # 2. EXECUTE the statement # check table content of master and slave # 3. ROLLBACK # check table content of master and slave # 4. flush the logs let $VERSION=`select version()`; --disable_query_log # SELECT '######## new test sequence ########' as ""; eval SELECT CONCAT('######## ','$my_stmt',' ########') as ""; --enable_query_log ############################################################### # Predict the number of the current log ############################################################### # Disable the logging of the log number computation. --disable_query_log # $_log_num_n should contain the number of the current binlog in numeric style. # If this routine is called for the first time, $_log_num will not initialized # and contain the value '' instead of '1'. So we will correct it here. # eval set @aux= IF('$_log_num_n' = '', '1', '$_log_num_n'); let $_log_num_n= `SELECT @aux`; eval set @aux= LPAD('$_log_num_n',6,'0'); # SELECT @aux AS "@aux is"; # # $_log_num_s should contain the number of the current binlog in string style. let $_log_num_s= `select @aux`; # eval SELECT '$log_num' ; --enable_query_log ############################################################### # INSERT ############################################################### connection master; --disable_query_log SELECT '-------- switch to master -------' as ""; --enable_query_log # Maybe it would be smarter to use a table with autoincrement column. let $MAX= `SELECT MAX(f1) FROM t1` ; eval INSERT INTO t1 SET f1= $MAX + 1; # results before DDL(to be tested) SELECT MAX(f1) FROM t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; sync_slave_with_master; connection slave; --disable_query_log SELECT '-------- switch to slave --------' as ""; --enable_query_log # results before DDL(to be tested) SELECT MAX(f1) FROM t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; ############################################################### # command to be tested ############################################################### connection master; --disable_query_log SELECT '-------- switch to master -------' as ""; --enable_query_log eval $my_stmt; # Devaluate $my_stmt, to detect script bugs let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT; # results after DDL(to be tested) SELECT MAX(f1) FROM t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; sync_slave_with_master; connection slave; --disable_query_log SELECT '-------- switch to slave --------' as ""; --enable_query_log # results after DDL(to be tested) SELECT MAX(f1) FROM t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; ############################################################### # ROLLBACK ############################################################### connection master; --disable_query_log SELECT '-------- switch to master -------' as ""; --enable_query_log ROLLBACK; # results after final ROLLBACK SELECT MAX(f1) FROM t1; # Try to detect if the DDL command caused that the INSERT is committed # $MAX holds the highest/last value just before the insert of MAX + 1 --disable_query_log eval SELECT CONCAT(CONCAT('TEST-INFO: MASTER: The INSERT is ', IF(MAX(f1) = $MAX + 1, 'committed', 'not committed')), IF((MAX(f1) = $MAX + 1) XOR NOT $my_master_commit, ' (Succeeded)', ' (Failed)')) AS "" FROM mysqltest1.t1; --enable_query_log --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; sync_slave_with_master; connection slave; --disable_query_log SELECT '-------- switch to slave --------' as ""; --enable_query_log # results after final ROLLBACK SELECT MAX(f1) FROM t1; --disable_query_log eval SELECT CONCAT(CONCAT('TEST-INFO: SLAVE: The INSERT is ', IF(MAX(f1) = $MAX + 1, 'committed', 'not committed')), IF((MAX(f1) = $MAX + 1) XOR NOT $my_slave_commit, ' (Succeeded)', ' (Failed)')) AS "" FROM mysqltest1.t1; --enable_query_log --replace_result $VERSION VERSION --replace_column 2 # 5 # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; ############################################################### # Manipulate binlog ############################################################### #let $manipulate= 0; let $manipulate= 1; while ($manipulate) { #### Manipulate the binary logs, # so that the output of SHOW BINLOG EVENTS IN <current log> # contains only commands of the current test sequence. # - flush the master and the slave log # ---> both start to write into new logs with incremented number # - increment $_log_num_n connection master; --disable_query_log SELECT '-------- switch to master -------' as ""; --enable_query_log flush logs; # sleep 1; # eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s'; sync_slave_with_master; connection slave; --disable_query_log SELECT '-------- switch to slave --------' as ""; --enable_query_log # the final content of the binary log flush logs; # The next sleep is urgent needed. # Without this sleep the slaves crashes often, when the SHOW BINLOG # is executed. :-( # sleep 1; # eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s'; inc $_log_num_n; let $manipulate= 0; } connection master; --disable_query_log SELECT '-------- switch to master -------' as ""; --enable_query_log
mysql-test/r/ctype_utf8.result +11 −0 Original line number Diff line number Diff line Loading @@ -891,3 +891,14 @@ string create table t1 (a varchar(255)) default character set utf8; insert into t1 values (1.0); drop table t1; create table t1 ( id int not null, city varchar(20) not null, key (city(7),id) ) character set=utf8; insert into t1 values (1,'Durban North'); insert into t1 values (2,'Durban'); select * from t1 where city = 'Durban'; id city 2 Durban drop table t1;