summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mysqld_error.h3
-rw-r--r--mysql-test/r/variables.result6
-rw-r--r--mysql-test/t/variables.test7
-rw-r--r--sql/set_var.cc5
-rw-r--r--sql/share/czech/errmsg.txt1
-rw-r--r--sql/share/danish/errmsg.txt1
-rw-r--r--sql/share/dutch/errmsg.txt1
-rw-r--r--sql/share/english/errmsg.txt1
-rw-r--r--sql/share/estonian/errmsg.txt1
-rw-r--r--sql/share/french/errmsg.txt1
-rw-r--r--sql/share/german/errmsg.txt1
-rw-r--r--sql/share/greek/errmsg.txt1
-rw-r--r--sql/share/hungarian/errmsg.txt1
-rw-r--r--sql/share/italian/errmsg.txt1
-rw-r--r--sql/share/japanese/errmsg.txt1
-rw-r--r--sql/share/korean/errmsg.txt1
-rw-r--r--sql/share/norwegian-ny/errmsg.txt1
-rw-r--r--sql/share/norwegian/errmsg.txt1
-rw-r--r--sql/share/polish/errmsg.txt1
-rw-r--r--sql/share/portuguese/errmsg.txt1
-rw-r--r--sql/share/romanian/errmsg.txt1
-rw-r--r--sql/share/russian/errmsg.txt1
-rw-r--r--sql/share/slovak/errmsg.txt1
-rw-r--r--sql/share/spanish/errmsg.txt1
-rw-r--r--sql/share/swedish/errmsg.txt1
-rw-r--r--sql/share/ukrainian/errmsg.txt1
26 files changed, 35 insertions, 8 deletions
diff --git a/include/mysqld_error.h b/include/mysqld_error.h
index 9d3197c0bd4..acc9b5961c6 100644
--- a/include/mysqld_error.h
+++ b/include/mysqld_error.h
@@ -254,4 +254,5 @@
#define ER_NOT_SUPPORTED_YET 1235
#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
#define ER_SLAVE_IGNORED_TABLE 1237 /* only the slave SQL thread can be sent this */
-#define ER_ERROR_MESSAGES 238
+#define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238
+#define ER_ERROR_MESSAGES 239
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index 8afdced206b..b4a607cb174 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -231,7 +231,7 @@ Wrong argument type to variable 'convert_character_set'
set global autocommit=1;
Variable 'autocommit' is a LOCAL variable and can't be used with SET GLOBAL
select @@global.timestamp;
-Variable 'timestamp' is a LOCAL variable and can't be used with SET GLOBAL
+Variable 'timestamp' is a LOCAL variable
set @@version='';
Unknown system variable 'version'
set @@concurrent_insert=1;
@@ -239,7 +239,7 @@ Variable 'concurrent_insert' is a GLOBAL variable and should be set with SET GLO
set @@global.sql_auto_is_null=1;
Variable 'sql_auto_is_null' is a LOCAL variable and can't be used with SET GLOBAL
select @@global.sql_auto_is_null;
-Variable 'sql_auto_is_null' is a LOCAL variable and can't be used with SET GLOBAL
+Variable 'sql_auto_is_null' is a LOCAL variable
set myisam_max_sort_file_size=100;
Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL
set myisam_max_extra_sort_file_size=100;
@@ -375,3 +375,5 @@ Unknown system variable 'xxxxxxxxxx'
select 1;
1
1
+select @@session.key_buffer_size;
+Variable 'key_buffer_size' is a GLOBAL variable
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 8e38160c60b..ec86a763023 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -139,7 +139,7 @@ set character set unknown;
set character set 0;
--error 1228
set global autocommit=1;
---error 1228
+--error 1238
select @@global.timestamp;
--error 1193
set @@version='';
@@ -147,7 +147,7 @@ set @@version='';
set @@concurrent_insert=1;
--error 1228
set @@global.sql_auto_is_null=1;
---error 1228
+--error 1238
select @@global.sql_auto_is_null;
--error 1229
set myisam_max_sort_file_size=100;
@@ -266,3 +266,6 @@ drop table t1,t2;
--error 1193
select @@xxxxxxxxxx;
select 1;
+
+--error 1238
+select @@session.key_buffer_size; \ No newline at end of file
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 4aea611e401..4e22d7983dd 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -1032,9 +1032,8 @@ Item *sys_var::item(THD *thd, enum_var_type var_type)
{
if (var_type != OPT_DEFAULT)
{
- net_printf(&thd->net,
- var_type == OPT_GLOBAL ? ER_LOCAL_VARIABLE :
- ER_GLOBAL_VARIABLE, name);
+ net_printf(&thd->net,ER_INCORRECT_GLOBAL_LOCAL_VAR,
+ name, var_type == OPT_GLOBAL ? "LOCAL" : "GLOBAL");
return 0;
}
/* As there was no local variable, return the global value */
diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt
index 069ee4540a3..e36475d7803 100644
--- a/sql/share/czech/errmsg.txt
+++ b/sql/share/czech/errmsg.txt
@@ -248,3 +248,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt
index f59abfeb6da..fe2cedb69bb 100644
--- a/sql/share/danish/errmsg.txt
+++ b/sql/share/danish/errmsg.txt
@@ -242,3 +242,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt
index 974b4601ac8..e2e5bd6839c 100644
--- a/sql/share/dutch/errmsg.txt
+++ b/sql/share/dutch/errmsg.txt
@@ -250,3 +250,4 @@
"Deze versie van MySQL ondersteunt nog geen '%s'",
"Kreeg fatale fout %d: '%-.128s' van master tijdens lezen van data uit binaire log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt
index 195ea4b0d00..7104eb64d56 100644
--- a/sql/share/english/errmsg.txt
+++ b/sql/share/english/errmsg.txt
@@ -239,3 +239,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt
index 6acb6a2ee77..f583568193f 100644
--- a/sql/share/estonian/errmsg.txt
+++ b/sql/share/estonian/errmsg.txt
@@ -244,3 +244,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt
index e53352472b9..cabb22a6494 100644
--- a/sql/share/french/errmsg.txt
+++ b/sql/share/french/errmsg.txt
@@ -239,3 +239,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt
index cdeab579eca..6258171e34e 100644
--- a/sql/share/german/errmsg.txt
+++ b/sql/share/german/errmsg.txt
@@ -242,3 +242,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt
index c7575277508..d993d80dcc1 100644
--- a/sql/share/greek/errmsg.txt
+++ b/sql/share/greek/errmsg.txt
@@ -239,3 +239,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt
index 7b65da7a03f..4a65e735ef9 100644
--- a/sql/share/hungarian/errmsg.txt
+++ b/sql/share/hungarian/errmsg.txt
@@ -241,3 +241,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt
index 3be8058661a..cf094da76d2 100644
--- a/sql/share/italian/errmsg.txt
+++ b/sql/share/italian/errmsg.txt
@@ -239,3 +239,4 @@
"Questa versione di MySQL non supporta ancora '%s'",
"Errore fatale %d: '%-.128s' dal master leggendo i dati dal log binario",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt
index bfd9d607806..c384c4bded4 100644
--- a/sql/share/japanese/errmsg.txt
+++ b/sql/share/japanese/errmsg.txt
@@ -241,3 +241,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt
index 7a384bb7a6f..b706069b495 100644
--- a/sql/share/korean/errmsg.txt
+++ b/sql/share/korean/errmsg.txt
@@ -239,3 +239,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt
index 1bee058a50b..2c1deead312 100644
--- a/sql/share/norwegian-ny/errmsg.txt
+++ b/sql/share/norwegian-ny/errmsg.txt
@@ -241,3 +241,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt
index 6b92a6da2c4..42b35c18cfc 100644
--- a/sql/share/norwegian/errmsg.txt
+++ b/sql/share/norwegian/errmsg.txt
@@ -241,3 +241,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt
index e963a655245..d8e84b08a9a 100644
--- a/sql/share/polish/errmsg.txt
+++ b/sql/share/polish/errmsg.txt
@@ -243,3 +243,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt
index 89af701f21a..bdb721d9e94 100644
--- a/sql/share/portuguese/errmsg.txt
+++ b/sql/share/portuguese/errmsg.txt
@@ -239,3 +239,4 @@
"Esta versão de MySQL não suporta ainda '%s'",
"Obteve fatal erro %d: '%-.128s' do master quando lendo dados do binary log",
"Slave SQL thread ignorado a consulta devido às normas de replicação-*-tabela"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt
index 436f7395556..44e8b9fa8de 100644
--- a/sql/share/romanian/errmsg.txt
+++ b/sql/share/romanian/errmsg.txt
@@ -243,3 +243,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt
index 03964efb26b..03e6874549e 100644
--- a/sql/share/russian/errmsg.txt
+++ b/sql/share/russian/errmsg.txt
@@ -241,3 +241,4 @@
"üÔÁ ×ÅÒÓÉÑ MySQL ÐÏËÁ ÅÝÅ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ '%s'",
"ðÏÌÕÞÅÎÁ ÎÅÉÓÐÒÁ×ÉÍÁÑ ÏÛÉÂËÁ %d: '%-.128s' ÏÔ ÇÏÌÏ×ÎÏÇÏ ÓÅÒ×ÅÒÁ × ÐÒÏÃÅÓÓÅ ×ÙÂÏÒËÉ ÄÁÎÎÙÈ ÉÚ Ä×ÏÉÞÎÏÇÏ ÖÕÒÎÁÌÁ",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt
index 28e4ca9ddca..411f93b97da 100644
--- a/sql/share/slovak/errmsg.txt
+++ b/sql/share/slovak/errmsg.txt
@@ -247,3 +247,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt
index acb0b9fd2ab..0068b3a6e12 100644
--- a/sql/share/spanish/errmsg.txt
+++ b/sql/share/spanish/errmsg.txt
@@ -240,3 +240,4 @@
"Esta versión de MySQL no soporta todavia '%s'",
"Recibió fatal error %d: '%-.128s' del master cuando leyendo datos del binary log",
"Slave SQL thread ignorado el query debido a las reglas de replicación-*-tabla"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt
index 32eec834ed1..5ecb7962aed 100644
--- a/sql/share/swedish/errmsg.txt
+++ b/sql/share/swedish/errmsg.txt
@@ -239,3 +239,4 @@
"Denna version av MySQL kan ännu inte utföra '%s'",
"Fick fatalt fel %d: '%-.128s' från master vid läsning av binärloggen"
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"
diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt
index c0931ab9f02..a5f94e90d6a 100644
--- a/sql/share/ukrainian/errmsg.txt
+++ b/sql/share/ukrainian/errmsg.txt
@@ -244,3 +244,4 @@
"This version of MySQL doesn't yet support '%s'",
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
"Slave SQL thread ignored the query because of replicate-*-table rules"
+"Variable '%-.64s' is a %s variable"