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
parent f78adcc2
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