Loading client/mysql.cc +11 −0 Original line number Diff line number Diff line Loading @@ -2117,6 +2117,17 @@ com_go(String *buffer,char *line __attribute__((unused))) if (!mysql_num_rows(result) && ! quick && !info_flag) { strmov(buff, "Empty set"); if (opt_xml) { /* We must print XML header and footer to produce a well-formed XML even if the result set is empty (Bug#27608). */ init_pager(); print_table_data_xml(result); end_pager(); } } else { Loading mysql-test/r/client_xml.result +14 −0 Original line number Diff line number Diff line Loading @@ -71,4 +71,18 @@ insert into t1 values (1, 2, 'a&b a<b a>b'); <field name="NULL" xsi:nil="true" /> </row> </resultset> <?xml version="1.0"?> <resultset statement="select 1 limit 0 " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></resultset> -------------- select 1 limit 0 -------------- <?xml version="1.0"?> <resultset statement="select 1 limit 0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></resultset> Empty set Bye drop table t1; mysql-test/r/ctype_utf8.result +43 −0 Original line number Diff line number Diff line Loading @@ -1480,6 +1480,49 @@ aa xxx yyy DROP TABLE t1; create table t1 ( a varchar(26) not null ) default character set utf8; insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); select * from t1; a abcdefghijklmnopqrstuvwxyz alter table t1 change a a varchar(20) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmnopqrst alter table t1 change a a char(15) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmno alter table t1 change a a char(10) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghij alter table t1 change a a varchar(5) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcde drop table t1; create table t1 ( a varchar(4000) not null ) default character set utf8; insert into t1 values (repeat('a',4000)); alter table t1 change a a varchar(3000) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select length(a) from t1; length(a) 3000 drop table t1; set names utf8; select hex(char(1 using utf8)); hex(char(1 using utf8)) Loading mysql-test/r/rpl_critical_errors.result.txt 0 → 100644 +56 −0 Original line number Diff line number Diff line stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; CREATE TABLE t1 (data LONGBLOB) ENGINE=MYISAM; CREATE TABLE t2 (data LONGBLOB) ENGINE=MYISAM; INSERT INTO t1 (data) VALUES (repeat('a',1024*1024)); INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t2 SELECT * FROM t1; KILL QUERY 2; SELECT COUNT(*) FROM t2; COUNT(*) 0 SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1317 Last_Error # Skip_Counter 0 Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # mysql-test/r/variables.result +31 −0 Original line number Diff line number Diff line Loading @@ -637,6 +637,37 @@ set lc_time_names=0; select @@lc_time_names; @@lc_time_names en_US select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names en_US en_US set @@global.lc_time_names=fr_FR; select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names fr_FR en_US New connection select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names fr_FR fr_FR set @@lc_time_names=ru_RU; select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names fr_FR ru_RU Returnung to default connection select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names fr_FR en_US set lc_time_names=default; select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names fr_FR fr_FR set @@global.lc_time_names=default; select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names en_US fr_FR set @@lc_time_names=default; select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names en_US en_US set @test = @@query_prealloc_size; set @@query_prealloc_size = @test; select @@query_prealloc_size = @test; Loading Loading
client/mysql.cc +11 −0 Original line number Diff line number Diff line Loading @@ -2117,6 +2117,17 @@ com_go(String *buffer,char *line __attribute__((unused))) if (!mysql_num_rows(result) && ! quick && !info_flag) { strmov(buff, "Empty set"); if (opt_xml) { /* We must print XML header and footer to produce a well-formed XML even if the result set is empty (Bug#27608). */ init_pager(); print_table_data_xml(result); end_pager(); } } else { Loading
mysql-test/r/client_xml.result +14 −0 Original line number Diff line number Diff line Loading @@ -71,4 +71,18 @@ insert into t1 values (1, 2, 'a&b a<b a>b'); <field name="NULL" xsi:nil="true" /> </row> </resultset> <?xml version="1.0"?> <resultset statement="select 1 limit 0 " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></resultset> -------------- select 1 limit 0 -------------- <?xml version="1.0"?> <resultset statement="select 1 limit 0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></resultset> Empty set Bye drop table t1;
mysql-test/r/ctype_utf8.result +43 −0 Original line number Diff line number Diff line Loading @@ -1480,6 +1480,49 @@ aa xxx yyy DROP TABLE t1; create table t1 ( a varchar(26) not null ) default character set utf8; insert into t1 (a) values ('abcdefghijklmnopqrstuvwxyz'); select * from t1; a abcdefghijklmnopqrstuvwxyz alter table t1 change a a varchar(20) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmnopqrst alter table t1 change a a char(15) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghijklmno alter table t1 change a a char(10) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcdefghij alter table t1 change a a varchar(5) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a abcde drop table t1; create table t1 ( a varchar(4000) not null ) default character set utf8; insert into t1 values (repeat('a',4000)); alter table t1 change a a varchar(3000) character set utf8 not null; Warnings: Warning 1265 Data truncated for column 'a' at row 1 select length(a) from t1; length(a) 3000 drop table t1; set names utf8; select hex(char(1 using utf8)); hex(char(1 using utf8)) Loading
mysql-test/r/rpl_critical_errors.result.txt 0 → 100644 +56 −0 Original line number Diff line number Diff line stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; CREATE TABLE t1 (data LONGBLOB) ENGINE=MYISAM; CREATE TABLE t2 (data LONGBLOB) ENGINE=MYISAM; INSERT INTO t1 (data) VALUES (repeat('a',1024*1024)); INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t2 SELECT * FROM t1; KILL QUERY 2; SELECT COUNT(*) FROM t2; COUNT(*) 0 SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1317 Last_Error # Skip_Counter 0 Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master #
mysql-test/r/variables.result +31 −0 Original line number Diff line number Diff line Loading @@ -637,6 +637,37 @@ set lc_time_names=0; select @@lc_time_names; @@lc_time_names en_US select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names en_US en_US set @@global.lc_time_names=fr_FR; select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names fr_FR en_US New connection select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names fr_FR fr_FR set @@lc_time_names=ru_RU; select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names fr_FR ru_RU Returnung to default connection select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names fr_FR en_US set lc_time_names=default; select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names fr_FR fr_FR set @@global.lc_time_names=default; select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names en_US fr_FR set @@lc_time_names=default; select @@global.lc_time_names, @@lc_time_names; @@global.lc_time_names @@lc_time_names en_US en_US set @test = @@query_prealloc_size; set @@query_prealloc_size = @test; select @@query_prealloc_size = @test; Loading