diff options
author | unknown <msvensson@neptunus.(none)> | 2006-10-26 19:51:29 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-10-26 19:51:29 +0200 |
commit | 08d43705a6ab99779cab4fa281b45e00017f59b8 (patch) | |
tree | 6d4ad7881ef9fcf045e91dd90490348169253055 /mysql-test/r/mysql.result | |
parent | 060f4196afec7a0ae9138549e5bb96d76a33eb54 (diff) | |
download | mariadb-git-08d43705a6ab99779cab4fa281b45e00017f59b8.tar.gz |
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
Diffstat (limited to 'mysql-test/r/mysql.result')
-rw-r--r-- | mysql-test/r/mysql.result | 17 |
1 files changed, 17 insertions, 0 deletions
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 |