Details
-
Type:
Task
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: Admin statements
-
Labels:None
Description
The attached statement runs fine on MySQL, but not on MariaDB per this commit in 2011: https://github.com/MariaDB/server/commit/7800d93bc3caca0143334941f626dc6aa3ff2b26
MariaDB [(none)]> SET GLOBAL max_user_connections = 100; ERROR 1290 (HY000): The MariaDB server is running with the --max-user-connections=0 option so it cannot execute this statement
The process doesn't have such an option as shown by ps:
mysql 17199 102 53.0 28224164 16560828 ? Sl May07 28884:15 /usr/sbin/mysqld --basedir=/usr --datadir=/opt/data --plugin-dir=/usr/lib/mysql/plugin --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
MariaDB [(none)]> SELECT @@version; +------------------------------+ | @@version | +------------------------------+ | 10.0.14-MariaDB-1~wheezy-log | +------------------------------+
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
This is done to fix the following bug: in MySQL if you set max_user_connections run-time, then existing connections won't be counted. You can set it to 10, but a user can already have a thousand of connections and he'll be able to open ten more.
A possible fix would be always to count user connections, but it would introduce an overhead for those many users, who don't use connection limits. MariaDB has implemented a different fix — don't count connections if started with max_user_connections=0, but don't allow max_user_connections to be set to non-zero value, because a correct connection counting in that case cannot be guaranteed.
There are other ways to fix this bug, we can consider them.