Yet another after merge fix.

Now max_user_connections is 36th field in mysql.user table
(two new SP-related privileges were added).
parent 2f8dcec0
...@@ -348,7 +348,7 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables) ...@@ -348,7 +348,7 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
user.user_resource.conn_per_hour) user.user_resource.conn_per_hour)
mqh_used=1; mqh_used=1;
if (table->fields >= 34) if (table->fields >= 36)
{ {
/* Starting from 5.0.3 we have max_user_connections field */ /* Starting from 5.0.3 we have max_user_connections field */
ptr= get_field(&mem, table->field[next_field++]); ptr= get_field(&mem, table->field[next_field++]);
...@@ -1702,7 +1702,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo, ...@@ -1702,7 +1702,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
table->field[29]->store((longlong) mqh.updates); table->field[29]->store((longlong) mqh.updates);
if (mqh.specified_limits & USER_RESOURCES::CONNECTIONS_PER_HOUR) if (mqh.specified_limits & USER_RESOURCES::CONNECTIONS_PER_HOUR)
table->field[30]->store((longlong) mqh.conn_per_hour); table->field[30]->store((longlong) mqh.conn_per_hour);
if (table->fields >= 34 && if (table->fields >= 36 &&
(mqh.specified_limits & USER_RESOURCES::USER_CONNECTIONS)) (mqh.specified_limits & USER_RESOURCES::USER_CONNECTIONS))
table->field[33]->store((longlong) mqh.user_conn); table->field[33]->store((longlong) mqh.user_conn);
mqh_used= mqh_used || mqh.questions || mqh.updates || mqh.conn_per_hour; mqh_used= mqh_used || mqh.questions || mqh.updates || mqh.conn_per_hour;
......
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