Loading BUILD/compile-solaris-amd64 0 → 100755 +55 −0 Original line number Diff line number Diff line #!/usr/bin/bash function _find_mysql_root () ( while [ "x$PWD" != "x/" ]; do # Check if some directories are present if [ -d BUILD -a -d sql -a -d mysys ]; then echo "$PWD" return 0 fi cd .. done return 1 ) make -k clean || true /bin/rm -f */.deps/*.P config.cache path=`dirname $0` . "$path/autorun.sh" warning_flags="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused" compiler_flags="-g -O3 -fno-omit-frame-pointer" export CC CXX CFLAGS CXXFLAGS LDFLAGS LIBS CC="gcc" CXX="gcc" CFLAGS="$warning_flags $compiler_flags" CXXFLAGS="" LDFLAGS="-O3 -g -static-libgcc" LIBS=-lmtmalloc root=$(_find_mysql_root) $root/configure \ --prefix=/usr/local/mysql \ --localstatedir=/usr/local/mysql/data \ --libexecdir=/usr/local/mysql/bin \ --with-extra-charsets=complex \ --enable-thread-safe-client \ --enable-local-infile \ --with-zlib-dir=bundled \ --with-big-tables \ --with-readline \ --with-archive-storage-engine \ --with-named-curses=-lcurses \ --with-big-tables \ --with-innodb \ --with-berkeley-db \ --with-example-storage-engine \ --with-blackhole-storage-engine \ --with-ndbcluster \ --with-federated-storage-engine \ --with-csv-storage-engine \ --with-ssl \ --with-embedded-server \ --disable-shared client/mysql.cc +11 −0 Original line number Diff line number Diff line Loading @@ -1047,6 +1047,17 @@ static int read_and_execute(bool interactive) if (!interactive) { line=batch_readline(status.line_buff); /* Skip UTF8 Byte Order Marker (BOM) 0xEFBBBF. Editors like "notepad" put this marker in the very beginning of a text file when you save the file using "Unicode UTF-8" format. */ if (!line_number && (uchar) line[0] == 0xEF && (uchar) line[1] == 0xBB && (uchar) line[2] == 0xBF) line+= 3; line_number++; if (!glob_buffer.length()) status.query_start_line=line_number; Loading mysql-test/include/ctype_regex.inc 0 → 100644 +42 −0 Original line number Diff line number Diff line # # To test a desired collation, set session.collation_connection to # this collation before including this file # --disable_warnings drop table if exists t1; --enable_warnings # # Create a table with two varchar(64) null-able column, # using current values of # @@character_set_connection and @@collation_connection. # create table t1 as select repeat(' ', 64) as s1, repeat(' ',64) as s2 union select null, null; show create table t1; delete from t1; insert into t1 values('aaa','aaa'); insert into t1 values('aaa|qqq','qqq'); insert into t1 values('gheis','^[^a-dXYZ]+$'); insert into t1 values('aab','^aa?b'); insert into t1 values('Baaan','^Ba*n'); insert into t1 values('aaa','qqq|aaa'); insert into t1 values('qqq','qqq|aaa'); insert into t1 values('bbb','qqq|aaa'); insert into t1 values('bbb','qqq'); insert into t1 values('aaa','aba'); insert into t1 values(null,'abc'); insert into t1 values('def',null); insert into t1 values(null,null); insert into t1 values('ghi','ghi['); select HIGH_PRIORITY s1 regexp s2 from t1; drop table t1; mysql-test/r/binlog_killed.result +44 −0 Original line number Diff line number Diff line Loading @@ -9,4 +9,48 @@ insert into t2 values (null, null), (null, get_lock("a", 10)); select @result /* must be zero either way */; @result 0 select RELEASE_LOCK("a"); RELEASE_LOCK("a") 1 delete from t1; delete from t2; insert into t1 values (1,1),(2,2); begin; update t1 set b=11 where a=2; begin; update t1 set b=b+10; kill query ID; rollback; rollback; select * from t1 order by a /* must be the same as before (1,1),(2,2) */; a b 1 1 2 2 begin; delete from t1 where a=2; begin; delete from t1 where a=2; kill query ID; rollback; rollback; select * from t1 order by a /* must be the same as before (1,1),(2,2) */; a b 1 1 2 2 drop table if exists t4; create table t4 (a int, b int) engine=innodb; insert into t4 values (3, 3); begin; insert into t1 values (3, 3); begin; insert into t1 select * from t4 for update; kill query ID; rollback; rollback; select * from t1 /* must be the same as before (1,1),(2,2) */; a b 1 1 2 2 drop table t4; drop table t1,t2,t3; end of the tests mysql-test/r/binlog_killed_simulate.result 0 → 100644 +33 −0 Original line number Diff line number Diff line drop table if exists t1,t2; create table t1 (a int) engine=MyISAM; insert into t1 set a=1; reset master; update t1 set a=2 /* will be "killed" after work has been done */; select (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) is not null; (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) is not null 1 select 1 /* must return 1 as query completed before got killed*/; 1 1 create table t2 (a int, b int) ENGINE=MyISAM; reset master; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */; ERROR 70100: Query execution was interrupted show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Begin_load_query 1 # ;file_id=1;block_len=12 master-bin.000001 133 Execute_load_query 1 # use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */ ;file_id=1 select (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) is not null; (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) is not null 1 select 0 /* must return 0 to mean the killed query is in */; 0 0 drop table t1,t2; end of the tests Loading
BUILD/compile-solaris-amd64 0 → 100755 +55 −0 Original line number Diff line number Diff line #!/usr/bin/bash function _find_mysql_root () ( while [ "x$PWD" != "x/" ]; do # Check if some directories are present if [ -d BUILD -a -d sql -a -d mysys ]; then echo "$PWD" return 0 fi cd .. done return 1 ) make -k clean || true /bin/rm -f */.deps/*.P config.cache path=`dirname $0` . "$path/autorun.sh" warning_flags="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused" compiler_flags="-g -O3 -fno-omit-frame-pointer" export CC CXX CFLAGS CXXFLAGS LDFLAGS LIBS CC="gcc" CXX="gcc" CFLAGS="$warning_flags $compiler_flags" CXXFLAGS="" LDFLAGS="-O3 -g -static-libgcc" LIBS=-lmtmalloc root=$(_find_mysql_root) $root/configure \ --prefix=/usr/local/mysql \ --localstatedir=/usr/local/mysql/data \ --libexecdir=/usr/local/mysql/bin \ --with-extra-charsets=complex \ --enable-thread-safe-client \ --enable-local-infile \ --with-zlib-dir=bundled \ --with-big-tables \ --with-readline \ --with-archive-storage-engine \ --with-named-curses=-lcurses \ --with-big-tables \ --with-innodb \ --with-berkeley-db \ --with-example-storage-engine \ --with-blackhole-storage-engine \ --with-ndbcluster \ --with-federated-storage-engine \ --with-csv-storage-engine \ --with-ssl \ --with-embedded-server \ --disable-shared
client/mysql.cc +11 −0 Original line number Diff line number Diff line Loading @@ -1047,6 +1047,17 @@ static int read_and_execute(bool interactive) if (!interactive) { line=batch_readline(status.line_buff); /* Skip UTF8 Byte Order Marker (BOM) 0xEFBBBF. Editors like "notepad" put this marker in the very beginning of a text file when you save the file using "Unicode UTF-8" format. */ if (!line_number && (uchar) line[0] == 0xEF && (uchar) line[1] == 0xBB && (uchar) line[2] == 0xBF) line+= 3; line_number++; if (!glob_buffer.length()) status.query_start_line=line_number; Loading
mysql-test/include/ctype_regex.inc 0 → 100644 +42 −0 Original line number Diff line number Diff line # # To test a desired collation, set session.collation_connection to # this collation before including this file # --disable_warnings drop table if exists t1; --enable_warnings # # Create a table with two varchar(64) null-able column, # using current values of # @@character_set_connection and @@collation_connection. # create table t1 as select repeat(' ', 64) as s1, repeat(' ',64) as s2 union select null, null; show create table t1; delete from t1; insert into t1 values('aaa','aaa'); insert into t1 values('aaa|qqq','qqq'); insert into t1 values('gheis','^[^a-dXYZ]+$'); insert into t1 values('aab','^aa?b'); insert into t1 values('Baaan','^Ba*n'); insert into t1 values('aaa','qqq|aaa'); insert into t1 values('qqq','qqq|aaa'); insert into t1 values('bbb','qqq|aaa'); insert into t1 values('bbb','qqq'); insert into t1 values('aaa','aba'); insert into t1 values(null,'abc'); insert into t1 values('def',null); insert into t1 values(null,null); insert into t1 values('ghi','ghi['); select HIGH_PRIORITY s1 regexp s2 from t1; drop table t1;
mysql-test/r/binlog_killed.result +44 −0 Original line number Diff line number Diff line Loading @@ -9,4 +9,48 @@ insert into t2 values (null, null), (null, get_lock("a", 10)); select @result /* must be zero either way */; @result 0 select RELEASE_LOCK("a"); RELEASE_LOCK("a") 1 delete from t1; delete from t2; insert into t1 values (1,1),(2,2); begin; update t1 set b=11 where a=2; begin; update t1 set b=b+10; kill query ID; rollback; rollback; select * from t1 order by a /* must be the same as before (1,1),(2,2) */; a b 1 1 2 2 begin; delete from t1 where a=2; begin; delete from t1 where a=2; kill query ID; rollback; rollback; select * from t1 order by a /* must be the same as before (1,1),(2,2) */; a b 1 1 2 2 drop table if exists t4; create table t4 (a int, b int) engine=innodb; insert into t4 values (3, 3); begin; insert into t1 values (3, 3); begin; insert into t1 select * from t4 for update; kill query ID; rollback; rollback; select * from t1 /* must be the same as before (1,1),(2,2) */; a b 1 1 2 2 drop table t4; drop table t1,t2,t3; end of the tests
mysql-test/r/binlog_killed_simulate.result 0 → 100644 +33 −0 Original line number Diff line number Diff line drop table if exists t1,t2; create table t1 (a int) engine=MyISAM; insert into t1 set a=1; reset master; update t1 set a=2 /* will be "killed" after work has been done */; select (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) is not null; (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) is not null 1 select 1 /* must return 1 as query completed before got killed*/; 1 1 create table t2 (a int, b int) ENGINE=MyISAM; reset master; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */; ERROR 70100: Query execution was interrupted show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Begin_load_query 1 # ;file_id=1;block_len=12 master-bin.000001 133 Execute_load_query 1 # use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */ ;file_id=1 select (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) is not null; (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) is not null 1 select 0 /* must return 0 to mean the killed query is in */; 0 0 drop table t1,t2; end of the tests