Commit 10445057 authored by unknown's avatar unknown

Fixed a bug that allowed:

SET @foo=bar;

This would cause a deadlock in mysqld, it now generates the error:
ER_SET_CONSTANTS_ONLY as follows:

mysql> set @foo=bar;
ERROR 1204: You may only use constant expressions with SET


include/mysqld_error.h:
  Added a new error message for SET
sql/share/czech/errmsg.txt:
  Added a new error message for SET
sql/share/danish/errmsg.txt:
  Added a new error message for SET
sql/share/dutch/errmsg.txt:
  Added a new error message for SET
sql/share/english/errmsg.txt:
  Added a new error message for SET
sql/share/estonian/errmsg.txt:
  Added a new error message for SET
sql/share/french/errmsg.txt:
  Added a new error message for SET
sql/share/german/errmsg.txt:
  Added a new error message for SET
sql/share/greek/errmsg.txt:
  Added a new error message for SET
sql/share/hungarian/errmsg.txt:
  Added a new error message for SET
sql/share/italian/errmsg.txt:
  Added a new error message for SET
sql/share/japanese/errmsg.txt:
  Added a new error message for SET
sql/share/korean/errmsg.txt:
  Added a new error message for SET
sql/share/norwegian-ny/errmsg.txt:
  Added a new error message for SET
sql/share/norwegian/errmsg.txt:
  Added a new error message for SET
sql/share/polish/errmsg.txt:
  Added a new error message for SET
sql/share/portuguese/errmsg.txt:
  Added a new error message for SET
sql/share/romanian/errmsg.txt:
  Added a new error message for SET
sql/share/russian/errmsg.txt:
  Added a new error message for SET
sql/share/slovak/errmsg.txt:
  Added a new error message for SET
sql/share/spanish/errmsg.txt:
  Added a new error message for SET
sql/share/swedish/errmsg.txt:
  Added a new error message for SET
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
parent 8727a06b
mwagner@evoq.mwagner.org mwagner@evoq.mwagner.org
heikki@donna.mysql.fi heikki@donna.mysql.fi
jcole@tetra.spaceapes.com
...@@ -204,4 +204,5 @@ ...@@ -204,4 +204,5 @@
#define ER_MASTER_INFO 1201 #define ER_MASTER_INFO 1201
#define ER_SLAVE_THREAD 1202 #define ER_SLAVE_THREAD 1202
#define ER_TOO_MANY_USER_CONNECTIONS 1203 #define ER_TOO_MANY_USER_CONNECTIONS 1203
#define ER_ERROR_MESSAGES 204 #define ER_SET_CONSTANTS_ONLY 1204
#define ER_ERROR_MESSAGES 205
...@@ -214,3 +214,4 @@ ...@@ -214,3 +214,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -208,3 +208,4 @@ ...@@ -208,3 +208,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -205,3 +205,4 @@ ...@@ -205,3 +205,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -205,3 +205,4 @@ ...@@ -205,3 +205,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -209,3 +209,4 @@ ...@@ -209,3 +209,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -205,3 +205,4 @@ ...@@ -205,3 +205,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -208,3 +208,4 @@ ...@@ -208,3 +208,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -205,3 +205,4 @@ ...@@ -205,3 +205,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -207,3 +207,4 @@ ...@@ -207,3 +207,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -205,3 +205,4 @@ ...@@ -205,3 +205,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -207,3 +207,4 @@ ...@@ -207,3 +207,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -205,3 +205,4 @@ ...@@ -205,3 +205,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -207,3 +207,4 @@ ...@@ -207,3 +207,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -207,3 +207,4 @@ ...@@ -207,3 +207,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -209,3 +209,4 @@ ...@@ -209,3 +209,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -205,3 +205,4 @@ ...@@ -205,3 +205,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -209,3 +209,4 @@ ...@@ -209,3 +209,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -208,3 +208,4 @@ ...@@ -208,3 +208,4 @@
" master info, persmissions master.info", " master info, persmissions master.info",
" SLAVE, ", " SLAVE, ",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -213,3 +213,4 @@ ...@@ -213,3 +213,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -206,3 +206,4 @@ ...@@ -206,3 +206,4 @@
"Could not initialize master info structure, check permisions on master.info", "Could not initialize master info structure, check permisions on master.info",
"Could not create slave thread, check system resources", "Could not create slave thread, check system resources",
"User %-.64s has already more than 'max_user_connections' active connections", "User %-.64s has already more than 'max_user_connections' active connections",
"You may only use constant expressions with SET",
...@@ -205,3 +205,4 @@ ...@@ -205,3 +205,4 @@
"Kunde inte initializera replications-strukturerna. Kontrollera privilegerna för 'master.info'", "Kunde inte initializera replications-strukturerna. Kontrollera privilegerna för 'master.info'",
"Kunde inte starta en tråd för replikering", "Kunde inte starta en tråd för replikering",
"Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar", "Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar",
"You may only use constant expressions with SET",
...@@ -2666,7 +2666,7 @@ option_value: ...@@ -2666,7 +2666,7 @@ option_value:
{ {
Item_func_set_user_var *item = new Item_func_set_user_var($2,$4); Item_func_set_user_var *item = new Item_func_set_user_var($2,$4);
if (item->fix_fields(current_thd,0) || item->update()) if (item->fix_fields(current_thd,0) || item->update())
YYABORT; send_error(&current_thd->net, ER_SET_CONSTANTS_ONLY);
} }
| SQL_SLAVE_SKIP_COUNTER equal ULONG_NUM | SQL_SLAVE_SKIP_COUNTER equal ULONG_NUM
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment