Loading client/mysql.cc +4 −1 Original line number Diff line number Diff line Loading @@ -3113,7 +3113,10 @@ com_connect(String *buffer, char *line) Two null bytes are needed in the end of buff to allow get_arg to find end of string the second time it's called. */ strmake(buff, line, sizeof(buff)-2); tmp= strmake(buff, line, sizeof(buff)-2); #ifdef EXTRA_DEBUG tmp[1]= 0; #endif tmp= get_arg(buff, 0); if (tmp && *tmp) { Loading client/mysqldump.c +3 −1 Original line number Diff line number Diff line Loading @@ -590,7 +590,9 @@ static void write_header(FILE *sql_file, char *db_name) { if (opt_comments) { fprintf(sql_file, "-- MySQL dump %s\n--\n", DUMP_VERSION); fprintf(sql_file, "-- MySQL dump %s Distrib %s, for %s (%s)\n--\n", DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); fprintf(sql_file, "-- Host: %s Database: %s\n", current_host ? current_host : "localhost", db_name ? db_name : ""); Loading client/mysqltest.c +2 −2 Original line number Diff line number Diff line Loading @@ -3654,7 +3654,7 @@ void do_get_file_name(struct st_command *command, if (*p) *p++= 0; command->last_argument= p; strmake(dest, name, dest_max_len); strmake(dest, name, dest_max_len - 1); } Loading Loading @@ -6975,7 +6975,7 @@ int main(int argc, char **argv) if (save_file[0]) { strmake(command->require_file, save_file, sizeof(save_file)); strmake(command->require_file, save_file, sizeof(save_file) - 1); save_file[0]= 0; } run_query(cur_con, command, flags); Loading mysql-test/r/bdb_notembedded.result 0 → 100644 +35 −0 Original line number Diff line number Diff line set autocommit=1; reset master; create table bug16206 (a int); insert into bug16206 values(1); start transaction; insert into bug16206 values(2); commit; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 f n Query 1 n use `test`; create table bug16206 (a int) f n Query 1 n use `test`; insert into bug16206 values(1) f n Query 1 n use `test`; insert into bug16206 values(2) drop table bug16206; reset master; create table bug16206 (a int) engine= bdb; insert into bug16206 values(0); insert into bug16206 values(1); start transaction; insert into bug16206 values(2); commit; insert into bug16206 values(3); show binlog events; Log_name Pos Event_type Server_id End_log_pos Info f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb f n Query 1 n use `test`; insert into bug16206 values(0) f n Query 1 n use `test`; insert into bug16206 values(1) f n Query 1 n use `test`; BEGIN f n Query 1 n use `test`; insert into bug16206 values(2) f n Query 1 n use `test`; COMMIT f n Query 1 n use `test`; insert into bug16206 values(3) drop table bug16206; set autocommit=0; End of 5.0 tests mysql-test/r/func_gconcat.result +62 −1 Original line number Diff line number Diff line Loading @@ -271,7 +271,7 @@ group_concat(distinct s1 order by s2) c,b,a select group_concat(distinct s1 order by s2) from t1; group_concat(distinct s1 order by s2) c,b,a,c c,b,a drop table t1; create table t1 (a int, c int); insert into t1 values (1, 2), (2, 3), (2, 4), (3, 5); Loading Loading @@ -876,4 +876,65 @@ select group_concat(f1) from t1; group_concat(f1) , drop table t1; CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1, 1), (2, 2), (2, 3); SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1; GROUP_CONCAT(DISTINCT a ORDER BY b) 1,2 SELECT GROUP_CONCAT(DISTINCT a ORDER BY b DESC) FROM t1; GROUP_CONCAT(DISTINCT a ORDER BY b DESC) 2,1 SELECT GROUP_CONCAT(DISTINCT a) FROM t1; GROUP_CONCAT(DISTINCT a) 1,2 SELECT GROUP_CONCAT(DISTINCT a + 1 ORDER BY 3 - b) FROM t1; GROUP_CONCAT(DISTINCT a + 1 ORDER BY 3 - b) 3,2 SELECT GROUP_CONCAT(DISTINCT a + 1 ORDER BY b) FROM t1; GROUP_CONCAT(DISTINCT a + 1 ORDER BY b) 2,3 SELECT GROUP_CONCAT(a ORDER BY 3 - b) FROM t1; GROUP_CONCAT(a ORDER BY 3 - b) 2,2,1 CREATE TABLE t2 (a INT, b INT, c INT, d INT); INSERT INTO t2 VALUES (1,1, 1,1), (1,1, 2,2), (1,2, 2,1), (2,1, 1,2); SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY c, d) FROM t2; GROUP_CONCAT(DISTINCT a, b ORDER BY c, d) 11,21,12 SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY d, c) FROM t2; GROUP_CONCAT(DISTINCT a, b ORDER BY d, c) 11,12,21 CREATE TABLE t3 (a INT, b INT, c INT); INSERT INTO t3 VALUES (1, 1, 1), (2, 1, 2), (3, 2, 1); SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY b, c) FROM t3; GROUP_CONCAT(DISTINCT a, b ORDER BY b, c) 11,21,32 SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY c, b) FROM t3; GROUP_CONCAT(DISTINCT a, b ORDER BY c, b) 11,32,21 SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY a, b) FROM t1; GROUP_CONCAT(DISTINCT a, b ORDER BY a, b) 11,22,23 SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY a, b) FROM t1; GROUP_CONCAT(DISTINCT b, a ORDER BY a, b) 11,22,32 SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY b, a) FROM t1; GROUP_CONCAT(DISTINCT a, b ORDER BY b, a) 11,22,23 SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY a, b) FROM t1; GROUP_CONCAT(DISTINCT b, a ORDER BY a, b) 11,22,32 SELECT GROUP_CONCAT(DISTINCT a ORDER BY a, b) FROM t1; GROUP_CONCAT(DISTINCT a ORDER BY a, b) 1,2 SELECT GROUP_CONCAT(DISTINCT b ORDER BY b, a) FROM t1; GROUP_CONCAT(DISTINCT b ORDER BY b, a) 1,2,3 SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY a) FROM t1; GROUP_CONCAT(DISTINCT a, b ORDER BY a) 11,23,22 SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1; GROUP_CONCAT(DISTINCT b, a ORDER BY b) 11,22,32 DROP TABLE t1, t2, t3; End of 5.0 tests Loading
client/mysql.cc +4 −1 Original line number Diff line number Diff line Loading @@ -3113,7 +3113,10 @@ com_connect(String *buffer, char *line) Two null bytes are needed in the end of buff to allow get_arg to find end of string the second time it's called. */ strmake(buff, line, sizeof(buff)-2); tmp= strmake(buff, line, sizeof(buff)-2); #ifdef EXTRA_DEBUG tmp[1]= 0; #endif tmp= get_arg(buff, 0); if (tmp && *tmp) { Loading
client/mysqldump.c +3 −1 Original line number Diff line number Diff line Loading @@ -590,7 +590,9 @@ static void write_header(FILE *sql_file, char *db_name) { if (opt_comments) { fprintf(sql_file, "-- MySQL dump %s\n--\n", DUMP_VERSION); fprintf(sql_file, "-- MySQL dump %s Distrib %s, for %s (%s)\n--\n", DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); fprintf(sql_file, "-- Host: %s Database: %s\n", current_host ? current_host : "localhost", db_name ? db_name : ""); Loading
client/mysqltest.c +2 −2 Original line number Diff line number Diff line Loading @@ -3654,7 +3654,7 @@ void do_get_file_name(struct st_command *command, if (*p) *p++= 0; command->last_argument= p; strmake(dest, name, dest_max_len); strmake(dest, name, dest_max_len - 1); } Loading Loading @@ -6975,7 +6975,7 @@ int main(int argc, char **argv) if (save_file[0]) { strmake(command->require_file, save_file, sizeof(save_file)); strmake(command->require_file, save_file, sizeof(save_file) - 1); save_file[0]= 0; } run_query(cur_con, command, flags); Loading
mysql-test/r/bdb_notembedded.result 0 → 100644 +35 −0 Original line number Diff line number Diff line set autocommit=1; reset master; create table bug16206 (a int); insert into bug16206 values(1); start transaction; insert into bug16206 values(2); commit; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 f n Query 1 n use `test`; create table bug16206 (a int) f n Query 1 n use `test`; insert into bug16206 values(1) f n Query 1 n use `test`; insert into bug16206 values(2) drop table bug16206; reset master; create table bug16206 (a int) engine= bdb; insert into bug16206 values(0); insert into bug16206 values(1); start transaction; insert into bug16206 values(2); commit; insert into bug16206 values(3); show binlog events; Log_name Pos Event_type Server_id End_log_pos Info f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb f n Query 1 n use `test`; insert into bug16206 values(0) f n Query 1 n use `test`; insert into bug16206 values(1) f n Query 1 n use `test`; BEGIN f n Query 1 n use `test`; insert into bug16206 values(2) f n Query 1 n use `test`; COMMIT f n Query 1 n use `test`; insert into bug16206 values(3) drop table bug16206; set autocommit=0; End of 5.0 tests
mysql-test/r/func_gconcat.result +62 −1 Original line number Diff line number Diff line Loading @@ -271,7 +271,7 @@ group_concat(distinct s1 order by s2) c,b,a select group_concat(distinct s1 order by s2) from t1; group_concat(distinct s1 order by s2) c,b,a,c c,b,a drop table t1; create table t1 (a int, c int); insert into t1 values (1, 2), (2, 3), (2, 4), (3, 5); Loading Loading @@ -876,4 +876,65 @@ select group_concat(f1) from t1; group_concat(f1) , drop table t1; CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1, 1), (2, 2), (2, 3); SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1; GROUP_CONCAT(DISTINCT a ORDER BY b) 1,2 SELECT GROUP_CONCAT(DISTINCT a ORDER BY b DESC) FROM t1; GROUP_CONCAT(DISTINCT a ORDER BY b DESC) 2,1 SELECT GROUP_CONCAT(DISTINCT a) FROM t1; GROUP_CONCAT(DISTINCT a) 1,2 SELECT GROUP_CONCAT(DISTINCT a + 1 ORDER BY 3 - b) FROM t1; GROUP_CONCAT(DISTINCT a + 1 ORDER BY 3 - b) 3,2 SELECT GROUP_CONCAT(DISTINCT a + 1 ORDER BY b) FROM t1; GROUP_CONCAT(DISTINCT a + 1 ORDER BY b) 2,3 SELECT GROUP_CONCAT(a ORDER BY 3 - b) FROM t1; GROUP_CONCAT(a ORDER BY 3 - b) 2,2,1 CREATE TABLE t2 (a INT, b INT, c INT, d INT); INSERT INTO t2 VALUES (1,1, 1,1), (1,1, 2,2), (1,2, 2,1), (2,1, 1,2); SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY c, d) FROM t2; GROUP_CONCAT(DISTINCT a, b ORDER BY c, d) 11,21,12 SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY d, c) FROM t2; GROUP_CONCAT(DISTINCT a, b ORDER BY d, c) 11,12,21 CREATE TABLE t3 (a INT, b INT, c INT); INSERT INTO t3 VALUES (1, 1, 1), (2, 1, 2), (3, 2, 1); SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY b, c) FROM t3; GROUP_CONCAT(DISTINCT a, b ORDER BY b, c) 11,21,32 SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY c, b) FROM t3; GROUP_CONCAT(DISTINCT a, b ORDER BY c, b) 11,32,21 SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY a, b) FROM t1; GROUP_CONCAT(DISTINCT a, b ORDER BY a, b) 11,22,23 SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY a, b) FROM t1; GROUP_CONCAT(DISTINCT b, a ORDER BY a, b) 11,22,32 SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY b, a) FROM t1; GROUP_CONCAT(DISTINCT a, b ORDER BY b, a) 11,22,23 SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY a, b) FROM t1; GROUP_CONCAT(DISTINCT b, a ORDER BY a, b) 11,22,32 SELECT GROUP_CONCAT(DISTINCT a ORDER BY a, b) FROM t1; GROUP_CONCAT(DISTINCT a ORDER BY a, b) 1,2 SELECT GROUP_CONCAT(DISTINCT b ORDER BY b, a) FROM t1; GROUP_CONCAT(DISTINCT b ORDER BY b, a) 1,2,3 SELECT GROUP_CONCAT(DISTINCT a, b ORDER BY a) FROM t1; GROUP_CONCAT(DISTINCT a, b ORDER BY a) 11,23,22 SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1; GROUP_CONCAT(DISTINCT b, a ORDER BY b) 11,22,32 DROP TABLE t1, t2, t3; End of 5.0 tests