Loading .bzrignore +1 −0 Original line number Diff line number Diff line Loading @@ -1285,3 +1285,4 @@ vio/viotest-sslconnect.cpp vio/viotest.cpp zlib/*.ds? zlib/*.vcproj BitKeeper/etc/RESYNC_TREE client/mysqldump.c +20 −1 Original line number Diff line number Diff line Loading @@ -1503,9 +1503,15 @@ static uint get_table_structure(char *table, char *db, char *table_type, field= mysql_fetch_field_direct(result, 0); if (strcmp(field->name, "View") == 0) { char *scv_buff = NULL; if (verbose) fprintf(stderr, "-- It's a view, create dummy table for view\n"); /* save "show create" statement for later */ if ((row= mysql_fetch_row(result)) && (scv_buff=row[1])) scv_buff= my_strdup(scv_buff, MYF(0)); mysql_free_result(result); /* Loading @@ -1523,9 +1529,22 @@ static uint get_table_structure(char *table, char *db, char *table_type, "SHOW FIELDS FROM %s", result_table); if (mysql_query_with_error_report(sock, 0, query_buff)) { /* View references invalid or privileged table/col/fun (err 1356), so we cannot create a stand-in table. Be defensive and dump a comment with the view's 'show create' statement. (Bug #17371) */ if (mysql_errno(sock) == ER_VIEW_INVALID) fprintf(sql_file, "\n-- failed on view %s: %s\n\n", result_table, scv_buff ? scv_buff : ""); my_free(scv_buff, MYF(MY_ALLOW_ZERO_PTR)); safe_exit(EX_MYSQLERR); DBUG_RETURN(0); } else my_free(scv_buff, MYF(MY_ALLOW_ZERO_PTR)); if ((result= mysql_store_result(sock))) { Loading mysql-test/r/bdb.result +34 −0 Original line number Diff line number Diff line Loading @@ -1928,4 +1928,38 @@ create table t1 (a int) engine=bdb; commit; alter table t1 add primary key(a); drop table t1; set autocommit=1; reset master; create table bug16206 (a int) engine= blackhole; 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) engine= blackhole 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_time.result +2 −0 Original line number Diff line number Diff line drop table if exists t1,t2,t3; set time_zone="+03:00"; select from_days(to_days("960101")),to_days(960201)-to_days("19960101"),to_days(date_add(curdate(), interval 1 day))-to_days(curdate()),weekday("1997-11-29"); from_days(to_days("960101")) to_days(960201)-to_days("19960101") to_days(date_add(curdate(), interval 1 day))-to_days(curdate()) weekday("1997-11-29") 1996-01-01 31 1 5 Loading Loading @@ -945,3 +946,4 @@ id day id day 1 2005-06-01 3 2005-07-15 3 2005-07-01 3 2005-07-15 DROP TABLE t1,t2; set time_zone= @@global.time_zone; mysql-test/r/func_timestamp.result +2 −0 Original line number Diff line number Diff line drop table if exists t1; set time_zone="+03:00"; create table t1 (Zeit time, Tag tinyint not null, Monat tinyint not null, Jahr smallint not null, index(Tag), index(Monat), index(Jahr) ); insert into t1 values ("09:26:00",16,9,1998),("09:26:00",16,9,1998); Loading @@ -9,3 +10,4 @@ Date Unix 1998-9-16 09:26:00 905927160 1998-9-16 09:26:00 905927160 drop table t1; set time_zone= @@global.time_zone; Loading
.bzrignore +1 −0 Original line number Diff line number Diff line Loading @@ -1285,3 +1285,4 @@ vio/viotest-sslconnect.cpp vio/viotest.cpp zlib/*.ds? zlib/*.vcproj BitKeeper/etc/RESYNC_TREE
client/mysqldump.c +20 −1 Original line number Diff line number Diff line Loading @@ -1503,9 +1503,15 @@ static uint get_table_structure(char *table, char *db, char *table_type, field= mysql_fetch_field_direct(result, 0); if (strcmp(field->name, "View") == 0) { char *scv_buff = NULL; if (verbose) fprintf(stderr, "-- It's a view, create dummy table for view\n"); /* save "show create" statement for later */ if ((row= mysql_fetch_row(result)) && (scv_buff=row[1])) scv_buff= my_strdup(scv_buff, MYF(0)); mysql_free_result(result); /* Loading @@ -1523,9 +1529,22 @@ static uint get_table_structure(char *table, char *db, char *table_type, "SHOW FIELDS FROM %s", result_table); if (mysql_query_with_error_report(sock, 0, query_buff)) { /* View references invalid or privileged table/col/fun (err 1356), so we cannot create a stand-in table. Be defensive and dump a comment with the view's 'show create' statement. (Bug #17371) */ if (mysql_errno(sock) == ER_VIEW_INVALID) fprintf(sql_file, "\n-- failed on view %s: %s\n\n", result_table, scv_buff ? scv_buff : ""); my_free(scv_buff, MYF(MY_ALLOW_ZERO_PTR)); safe_exit(EX_MYSQLERR); DBUG_RETURN(0); } else my_free(scv_buff, MYF(MY_ALLOW_ZERO_PTR)); if ((result= mysql_store_result(sock))) { Loading
mysql-test/r/bdb.result +34 −0 Original line number Diff line number Diff line Loading @@ -1928,4 +1928,38 @@ create table t1 (a int) engine=bdb; commit; alter table t1 add primary key(a); drop table t1; set autocommit=1; reset master; create table bug16206 (a int) engine= blackhole; 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) engine= blackhole 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_time.result +2 −0 Original line number Diff line number Diff line drop table if exists t1,t2,t3; set time_zone="+03:00"; select from_days(to_days("960101")),to_days(960201)-to_days("19960101"),to_days(date_add(curdate(), interval 1 day))-to_days(curdate()),weekday("1997-11-29"); from_days(to_days("960101")) to_days(960201)-to_days("19960101") to_days(date_add(curdate(), interval 1 day))-to_days(curdate()) weekday("1997-11-29") 1996-01-01 31 1 5 Loading Loading @@ -945,3 +946,4 @@ id day id day 1 2005-06-01 3 2005-07-15 3 2005-07-01 3 2005-07-15 DROP TABLE t1,t2; set time_zone= @@global.time_zone;
mysql-test/r/func_timestamp.result +2 −0 Original line number Diff line number Diff line drop table if exists t1; set time_zone="+03:00"; create table t1 (Zeit time, Tag tinyint not null, Monat tinyint not null, Jahr smallint not null, index(Tag), index(Monat), index(Jahr) ); insert into t1 values ("09:26:00",16,9,1998),("09:26:00",16,9,1998); Loading @@ -9,3 +10,4 @@ Date Unix 1998-9-16 09:26:00 905927160 1998-9-16 09:26:00 905927160 drop table t1; set time_zone= @@global.time_zone;