Loading client/mysql_upgrade.c +11 −1 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ void set_extra_default(int id, const struct my_option *opt) case 'f': /* --force is ours */ case 'u': /* --user passed on cmdline */ case 'T': /* --debug-info is not accepted by mysqlcheck */ case 'p': /* --password may change yet */ /* so, do nothing */ break; default: Loading Loading @@ -175,7 +176,7 @@ void set_extra_default(int id, const struct my_option *opt) d->id= id; d->name= opt->name; d->n_len= strlen(opt->name); if (opt->arg_type != NO_ARG) if (opt->arg_type != NO_ARG && opt->value) switch (opt->var_type & GET_TYPE_MASK) { case GET_BOOL: if (*((int *)opt->value)) Loading Loading @@ -321,6 +322,15 @@ static int create_defaults_file(const char *path, const char *forced_path) } dynstr_set(&buf, "\n[client]"); if (opt_password) { if (dynstr_append(&buf, "\npassword=") || dynstr_append(&buf, opt_password)) { ret = 1; goto error; } } while (extra_defaults) { int len; Loading mysql-test/include/innodb_rollback_on_timeout.inc 0 → 100644 +37 −0 Original line number Diff line number Diff line # # Bug #24200: Provide backwards compatibility mode for 4.x "rollback on # transaction timeout" # show variables like 'innodb_rollback_on_timeout'; create table t1 (a int unsigned not null primary key) engine = innodb; insert into t1 values (1); commit; connect (con1,localhost,root,,); connect (con2,localhost,root,,); connection con2; begin work; insert into t1 values (2); select * from t1; connection con1; begin work; insert into t1 values (5); select * from t1; # Lock wait timeout set to 2 seconds in <THIS TEST>-master.opt; this # statement will time out; in 5.0.13+, it will not roll back transaction. --error ER_LOCK_WAIT_TIMEOUT insert into t1 values (2); # On 5.0.13+, this should give ==> 1, 5 select * from t1; commit; connection con2; select * from t1; commit; connection default; select * from t1; drop table t1; disconnect con1; disconnect con2; mysql-test/include/mix1.inc +2 −0 Original line number Diff line number Diff line Loading @@ -462,6 +462,8 @@ EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b; EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b; DROP TABLE t1; --source include/innodb_rollback_on_timeout.inc --echo End of 5.0 tests Loading mysql-test/mysql-test-run.pl +6 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ $Devel::Trace::TRACE= 0; # Don't trace boring init stuff use File::Path; use File::Basename; use File::Copy; use File::Temp qw / tempdir /; use Cwd; use Getopt::Long; use Sys::Hostname; Loading Loading @@ -1020,6 +1021,11 @@ sub command_line_setup () { my $sockdir = $opt_tmpdir; $sockdir =~ s|/+$||; # On some operating systems, there is a limit to the length of a # UNIX domain socket's path far below PATH_MAX, so try to avoid long # socket path names. $sockdir = tempdir(CLEANUP => 1) if ( length($sockdir) > 80 ); # Put this into a hash, will be a C struct $master->[0]= Loading mysql-test/r/func_str.result +12 −0 Original line number Diff line number Diff line Loading @@ -2249,4 +2249,16 @@ CHAR(0xff,0x8f USING utf8) IS NULL Warnings: Error 1300 Invalid utf8 character string: 'FF8F' SET SQL_MODE=@orig_sql_mode; select substring('abc', cast(2 as unsigned int)); substring('abc', cast(2 as unsigned int)) bc select repeat('a', cast(2 as unsigned int)); repeat('a', cast(2 as unsigned int)) aa select rpad('abc', cast(5 as unsigned integer), 'x'); rpad('abc', cast(5 as unsigned integer), 'x') abcxx select lpad('abc', cast(5 as unsigned integer), 'x'); lpad('abc', cast(5 as unsigned integer), 'x') xxabc End of 5.0 tests Loading
client/mysql_upgrade.c +11 −1 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ void set_extra_default(int id, const struct my_option *opt) case 'f': /* --force is ours */ case 'u': /* --user passed on cmdline */ case 'T': /* --debug-info is not accepted by mysqlcheck */ case 'p': /* --password may change yet */ /* so, do nothing */ break; default: Loading Loading @@ -175,7 +176,7 @@ void set_extra_default(int id, const struct my_option *opt) d->id= id; d->name= opt->name; d->n_len= strlen(opt->name); if (opt->arg_type != NO_ARG) if (opt->arg_type != NO_ARG && opt->value) switch (opt->var_type & GET_TYPE_MASK) { case GET_BOOL: if (*((int *)opt->value)) Loading Loading @@ -321,6 +322,15 @@ static int create_defaults_file(const char *path, const char *forced_path) } dynstr_set(&buf, "\n[client]"); if (opt_password) { if (dynstr_append(&buf, "\npassword=") || dynstr_append(&buf, opt_password)) { ret = 1; goto error; } } while (extra_defaults) { int len; Loading
mysql-test/include/innodb_rollback_on_timeout.inc 0 → 100644 +37 −0 Original line number Diff line number Diff line # # Bug #24200: Provide backwards compatibility mode for 4.x "rollback on # transaction timeout" # show variables like 'innodb_rollback_on_timeout'; create table t1 (a int unsigned not null primary key) engine = innodb; insert into t1 values (1); commit; connect (con1,localhost,root,,); connect (con2,localhost,root,,); connection con2; begin work; insert into t1 values (2); select * from t1; connection con1; begin work; insert into t1 values (5); select * from t1; # Lock wait timeout set to 2 seconds in <THIS TEST>-master.opt; this # statement will time out; in 5.0.13+, it will not roll back transaction. --error ER_LOCK_WAIT_TIMEOUT insert into t1 values (2); # On 5.0.13+, this should give ==> 1, 5 select * from t1; commit; connection con2; select * from t1; commit; connection default; select * from t1; drop table t1; disconnect con1; disconnect con2;
mysql-test/include/mix1.inc +2 −0 Original line number Diff line number Diff line Loading @@ -462,6 +462,8 @@ EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b; EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b; DROP TABLE t1; --source include/innodb_rollback_on_timeout.inc --echo End of 5.0 tests Loading
mysql-test/mysql-test-run.pl +6 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ $Devel::Trace::TRACE= 0; # Don't trace boring init stuff use File::Path; use File::Basename; use File::Copy; use File::Temp qw / tempdir /; use Cwd; use Getopt::Long; use Sys::Hostname; Loading Loading @@ -1020,6 +1021,11 @@ sub command_line_setup () { my $sockdir = $opt_tmpdir; $sockdir =~ s|/+$||; # On some operating systems, there is a limit to the length of a # UNIX domain socket's path far below PATH_MAX, so try to avoid long # socket path names. $sockdir = tempdir(CLEANUP => 1) if ( length($sockdir) > 80 ); # Put this into a hash, will be a C struct $master->[0]= Loading
mysql-test/r/func_str.result +12 −0 Original line number Diff line number Diff line Loading @@ -2249,4 +2249,16 @@ CHAR(0xff,0x8f USING utf8) IS NULL Warnings: Error 1300 Invalid utf8 character string: 'FF8F' SET SQL_MODE=@orig_sql_mode; select substring('abc', cast(2 as unsigned int)); substring('abc', cast(2 as unsigned int)) bc select repeat('a', cast(2 as unsigned int)); repeat('a', cast(2 as unsigned int)) aa select rpad('abc', cast(5 as unsigned integer), 'x'); rpad('abc', cast(5 as unsigned integer), 'x') abcxx select lpad('abc', cast(5 as unsigned integer), 'x'); lpad('abc', cast(5 as unsigned integer), 'x') xxabc End of 5.0 tests