diff options
author | unknown <bar@mysql.com> | 2005-06-02 17:13:37 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-06-02 17:13:37 +0500 |
commit | a6cf849e0def7f612a2ccb2e2ce281287db3f6e5 (patch) | |
tree | a6e3b4f6b2d3a6d452f1c8514517691d02bfcfbd | |
parent | 198550e39b8741cccca0e936f608ca6b1c8dd70a (diff) | |
parent | 17678a7b885beb59fa808b7ace5cee4a0e21667d (diff) | |
download | mariadb-git-a6cf849e0def7f612a2ccb2e2ce281287db3f6e5.tar.gz |
Merge mysql.com:/usr/home/bar/mysql-4.1.sysvar
into mysql.com:/usr/home/bar/mysql-5.0
mysql-test/r/variables.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/set_var.cc:
Auto merged
-rw-r--r-- | mysql-test/r/variables.result | 6 | ||||
-rw-r--r-- | mysql-test/t/variables.test | 7 | ||||
-rw-r--r-- | sql/item_func.cc | 2 | ||||
-rw-r--r-- | sql/set_var.cc | 3 |
4 files changed, 16 insertions, 2 deletions
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index c7f980df350..99b4f0529e6 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -236,6 +236,12 @@ query_prealloc_size 8192 range_alloc_block_size 2048 transaction_alloc_block_size 8192 transaction_prealloc_size 4096 +SELECT @@version LIKE 'non-existent'; +@@version LIKE 'non-existent' +0 +SELECT @@version_compile_os LIKE 'non-existent'; +@@version_compile_os LIKE 'non-existent' +0 set big_tables=OFFF; ERROR 42000: Variable 'big_tables' can't be set to the value of 'OFFF' set big_tables="OFFF"; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 9e8a7a1b56f..f8d833b6b73 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -130,6 +130,13 @@ set @@query_alloc_block_size=default, @@query_prealloc_size=default; set transaction_alloc_block_size=default, @@transaction_prealloc_size=default; show variables like '%alloc%'; +# +# Bug #10904 Illegal mix of collations between +# a system variable and a constant +# +SELECT @@version LIKE 'non-existent'; +SELECT @@version_compile_os LIKE 'non-existent'; + # The following should give errors --error 1231 diff --git a/sql/item_func.cc b/sql/item_func.cc index 3767844e200..92c51553644 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4509,7 +4509,7 @@ Item *get_system_var(THD *thd, enum_var_type var_type, LEX_STRING name, !my_strcasecmp(system_charset_info, name.str, "VERSION")) return new Item_string("@@VERSION", server_version, (uint) strlen(server_version), - system_charset_info); + system_charset_info, DERIVATION_SYSCONST); Item *item; sys_var *var; diff --git a/sql/set_var.cc b/sql/set_var.cc index 5f0db0bd2d5..0d743f99b73 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1715,7 +1715,8 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base) Item_string *tmp; pthread_mutex_lock(&LOCK_global_system_variables); char *str= (char*) value_ptr(thd, var_type, base); - tmp= new Item_string(str, strlen(str), system_charset_info); + tmp= new Item_string(str, strlen(str), + system_charset_info, DERIVATION_SYSCONST); pthread_mutex_unlock(&LOCK_global_system_variables); return tmp; } |