From 6c91170e3f90b73298d40286cdb84e47d8d31c8a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Oct 2006 18:50:12 -0400 Subject: Bug#17583: mysql drops connection when stdout is not writable Porting forward tests to replacement files. mysql-test/r/mysql.result: Ported changes from previous commit to new file. mysql-test/t/mysql.test: Ported changes from previous commit to new file. --- mysql-test/r/mysql.result | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mysql-test/r/mysql.result') diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index 7dbff4beca5..c8dcafe4a47 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -139,4 +139,17 @@ ERROR at line 1: USE must be followed by a database name \\ '; '; +create table t17583 (a int); +insert into t17583 (a) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +insert into t17583 select a from t17583; +insert into t17583 select a from t17583; +insert into t17583 select a from t17583; +insert into t17583 select a from t17583; +insert into t17583 select a from t17583; +insert into t17583 select a from t17583; +insert into t17583 select a from t17583; +select count(*) from t17583; +count(*) +1280 +drop table t17583; End of 5.0 tests -- cgit v1.2.1 From 08d43705a6ab99779cab4fa281b45e00017f59b8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Oct 2006 19:51:29 +0200 Subject: Bug#20894 Reproducible MySQL client segmentation fault - Add two null bytes in "buff" variable allowing us to call get_arg two times also for strings longer than sizeof(buff) client/mysql.cc: Make sure there are _two_ zero bytes at the end of buff, to allow 'get_arg' to be called twice on long strings. The first time it will mark end of string with a zero and the second time it will "skip ahead" to the first zero, and the find the second one indicating end of buff. mysql-test/r/mysql.result: Update test results mysql-test/t/mysql.test: Add tests for "com_connect" function in mysql Add test reported in bug --- mysql-test/r/mysql.result | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mysql-test/r/mysql.result') diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index 86ac7a8d72d..9115f9a9628 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -162,4 +162,21 @@ select count(*) from t17583; count(*) 1280 drop table t17583; +Test connect without db- or host-name => reconnect +Test connect with dbname only => new dbname, old hostname +ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'connecttest' at line 1 +Test connect with _invalid_ dbname only => new invalid dbname, old hostname +ERROR 1049 (42000) at line 1: Unknown database 'invalid' +ERROR 1049 (42000) at line 1: Unknown database 'invalid' +Test connect with dbname + hostname +Test connect with dbname + _invalid_ hostname +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) +The commands reported in the bug report +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) +Too long dbname +ERROR 1049 (42000) at line 1: Unknown database 'test_really_long_dbnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' +Too long hostname +ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) End of 5.0 tests -- cgit v1.2.1 From cb404c2dcfd7da9bc83ed1c037b12904c3ff9e22 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Nov 2006 13:12:16 +0100 Subject: Use lowercase for "Too long dbname" test as it will be put ot lower on some platforms and we don't wan't to test that. --- mysql-test/r/mysql.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r/mysql.result') diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index 9115f9a9628..8e0a7adcebb 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -176,7 +176,7 @@ The commands reported in the bug report ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) Too long dbname -ERROR 1049 (42000) at line 1: Unknown database 'test_really_long_dbnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' +ERROR 1049 (42000) at line 1: Unknown database 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' Too long hostname ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) End of 5.0 tests -- cgit v1.2.1 From 52f70ab8762c73abf8874c1f0440501de70d30b9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 3 Nov 2006 16:09:16 +0100 Subject: Fix problem with mysql.test relying on "echo" behaviour mysql-test/r/mysql.result: Update test result after commenting out the test mysql-test/t/mysql.test: Rewrite the test commands so they don't depend on "echo" behaviour Comment out one as it's a duplicate --- mysql-test/r/mysql.result | 1 - 1 file changed, 1 deletion(-) (limited to 'mysql-test/r/mysql.result') diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index 8e0a7adcebb..14267afc27e 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -174,7 +174,6 @@ ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errn ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno) The commands reported in the bug report ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) -ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) Too long dbname ERROR 1049 (42000) at line 1: Unknown database 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' Too long hostname -- cgit v1.2.1