Loading client/mysqldump.c +12 −0 Original line number Diff line number Diff line Loading @@ -2428,6 +2428,18 @@ static int start_transaction(MYSQL *mysql_con) need the REPEATABLE READ level (not anything lower, for example READ COMMITTED would give one new consistent read per dumped table). */ if ((mysql_get_server_version(mysql_con) < 40100) && opt_master_data) { fprintf(stderr, "-- %s: the combination of --single-transaction and " "--master-data requires a MySQL server version of at least 4.1 " "(current server's version is %s). %s\n", ignore_errors ? "Warning" : "Error", mysql_con->server_version ? mysql_con->server_version : "unknown", ignore_errors ? "Continuing due to --force, backup may not be consistent across all tables!" : "Aborting."); if (!ignore_errors) exit(EX_MYSQLERR); } return (mysql_query_with_error_report(mysql_con, 0, "SET SESSION TRANSACTION ISOLATION " "LEVEL REPEATABLE READ") || Loading myisam/sort.c +4 −2 Original line number Diff line number Diff line Loading @@ -559,9 +559,10 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) if (!mergebuf) { length=param->sort_buffer_length; while (length >= MIN_SORT_MEMORY && !mergebuf) while (length >= MIN_SORT_MEMORY) { mergebuf=my_malloc(length, MYF(0)); if ((mergebuf= my_malloc(length, MYF(0)))) break; length=length*3/4; } if (!mergebuf) Loading Loading @@ -897,6 +898,7 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file, count=error=0; maxcount=keys/((uint) (Tb-Fb) +1); DBUG_ASSERT(maxcount > 0); LINT_INIT(to_start_filepos); if (to_file) to_start_filepos=my_b_tell(to_file); Loading mysql-test/include/ctype_common.inc +9 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,15 @@ SELECT c1 as want1result from t1 where c1 like 'locatio%'; SELECT c1 as want1result from t1 where c1 like 'location%'; DROP TABLE t1; # # Bug #31070: crash during conversion of charsets # create table t1 (a set('a') not null); insert into t1 values (),(); select cast(a as char(1)) from t1; select a sounds like a from t1; drop table t1; DROP DATABASE d1; # Restore settings USE test; Loading mysql-test/r/ctype_big5.result +11 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,17 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; create table t1 (a set('a') not null); insert into t1 values (),(); select cast(a as char(1)) from t1; cast(a as char(1)) select a sounds like a from t1; a sounds like a 1 1 drop table t1; DROP DATABASE d1; USE test; SET character_set_server= @safe_character_set_server; Loading mysql-test/r/ctype_euckr.result +11 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,17 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; create table t1 (a set('a') not null); insert into t1 values (),(); select cast(a as char(1)) from t1; cast(a as char(1)) select a sounds like a from t1; a sounds like a 1 1 drop table t1; DROP DATABASE d1; USE test; SET character_set_server= @safe_character_set_server; Loading Loading
client/mysqldump.c +12 −0 Original line number Diff line number Diff line Loading @@ -2428,6 +2428,18 @@ static int start_transaction(MYSQL *mysql_con) need the REPEATABLE READ level (not anything lower, for example READ COMMITTED would give one new consistent read per dumped table). */ if ((mysql_get_server_version(mysql_con) < 40100) && opt_master_data) { fprintf(stderr, "-- %s: the combination of --single-transaction and " "--master-data requires a MySQL server version of at least 4.1 " "(current server's version is %s). %s\n", ignore_errors ? "Warning" : "Error", mysql_con->server_version ? mysql_con->server_version : "unknown", ignore_errors ? "Continuing due to --force, backup may not be consistent across all tables!" : "Aborting."); if (!ignore_errors) exit(EX_MYSQLERR); } return (mysql_query_with_error_report(mysql_con, 0, "SET SESSION TRANSACTION ISOLATION " "LEVEL REPEATABLE READ") || Loading
myisam/sort.c +4 −2 Original line number Diff line number Diff line Loading @@ -559,9 +559,10 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) if (!mergebuf) { length=param->sort_buffer_length; while (length >= MIN_SORT_MEMORY && !mergebuf) while (length >= MIN_SORT_MEMORY) { mergebuf=my_malloc(length, MYF(0)); if ((mergebuf= my_malloc(length, MYF(0)))) break; length=length*3/4; } if (!mergebuf) Loading Loading @@ -897,6 +898,7 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file, count=error=0; maxcount=keys/((uint) (Tb-Fb) +1); DBUG_ASSERT(maxcount > 0); LINT_INIT(to_start_filepos); if (to_file) to_start_filepos=my_b_tell(to_file); Loading
mysql-test/include/ctype_common.inc +9 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,15 @@ SELECT c1 as want1result from t1 where c1 like 'locatio%'; SELECT c1 as want1result from t1 where c1 like 'location%'; DROP TABLE t1; # # Bug #31070: crash during conversion of charsets # create table t1 (a set('a') not null); insert into t1 values (),(); select cast(a as char(1)) from t1; select a sounds like a from t1; drop table t1; DROP DATABASE d1; # Restore settings USE test; Loading
mysql-test/r/ctype_big5.result +11 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,17 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; create table t1 (a set('a') not null); insert into t1 values (),(); select cast(a as char(1)) from t1; cast(a as char(1)) select a sounds like a from t1; a sounds like a 1 1 drop table t1; DROP DATABASE d1; USE test; SET character_set_server= @safe_character_set_server; Loading
mysql-test/r/ctype_euckr.result +11 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,17 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; create table t1 (a set('a') not null); insert into t1 values (),(); select cast(a as char(1)) from t1; cast(a as char(1)) select a sounds like a from t1; a sounds like a 1 1 drop table t1; DROP DATABASE d1; USE test; SET character_set_server= @safe_character_set_server; Loading