diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2011-02-10 09:34:22 +0200 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2011-02-10 09:34:22 +0200 |
commit | b2b69699ef0b222b53f79a22a17d5d4a06c97663 (patch) | |
tree | 1906695b4daec01353d8e92d1cadc6f4e7cfc789 /mysql-test/t/variables.test | |
parent | 7d88b552e2cceddc0b86dff69a12528481e9be1d (diff) | |
download | mariadb-git-b2b69699ef0b222b53f79a22a17d5d4a06c97663.tar.gz |
Bug #59884: setting charset to 2048 crashes
The retrieval of a charset by number was not
doing bounds checking before accessing the internal
character sets array.
Added checks for valid charset number.
Added asserts for valid charset number to some of
the internal functions.
Removed one superfluous check for charset_number 0
(since the all_charsets_array[0] is set to 0 anyway) for
uniformity.
Test suite added.
Diffstat (limited to 'mysql-test/t/variables.test')
-rw-r--r-- | mysql-test/t/variables.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index b766c1c7dc6..2b20bbdc13b 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -1476,3 +1476,29 @@ drop function t1_max; ########################################################################### + + +--echo # +--echo # Bug #59884: setting charset to 2048 crashes +--echo # + +--error ER_UNKNOWN_CHARACTER_SET +set session character_set_results = 2048; +--error ER_UNKNOWN_CHARACTER_SET +set session character_set_client=2048; +--error ER_UNKNOWN_CHARACTER_SET +set session character_set_connection=2048; +--error ER_UNKNOWN_CHARACTER_SET +set session character_set_server=2048; +--error ER_UNKNOWN_COLLATION +set session collation_server=2048; +--error ER_UNKNOWN_CHARACTER_SET +set session character_set_filesystem=2048; +--error ER_UNKNOWN_CHARACTER_SET +set session character_set_database=2048; +--error ER_UNKNOWN_COLLATION +set session collation_connection=2048; +--error ER_UNKNOWN_COLLATION +set session collation_database=2048; + +--echo End of 5.5 tests |