# -- Check that we allow one extra SUPER-user connection.
# -- Connecting super (1)...
# -- Establishing connection 'con_super_1' (user: root)...
# -- Connection 'con_super_1' has been established.
# -- Connecting super (2) [should fail]...
# -- Establishing connection 'con_super_2' (user: root)...
# -- Error: can not establish connection 'con_super_2'.
# -- Ensure that we have Event Scheduler thread, 3 ordinary user
# -- connections and one extra super-user connection.
SELECT user FROM information_schema.processlist ORDER BY id;
user
event_scheduler
mysqltest_u1
mysqltest_u1
mysqltest_u1
mysqltest_u1
mysqltest_u1
mysqltest_u1
mysqltest_u1
mysqltest_u1
mysqltest_u1
mysqltest_u1
root
# -- Resetting variables... SET GLOBAL max_connections = #max_connections#;
# -- Stopping Event Scheduler... SET GLOBAL event_scheduler = OFF;
# -- Bug#35074: max_used_connections is not correct.
FLUSH GLOBAL STATUS;
SHOW STATUS LIKE 'max_used_connections';
Variable_name Value
Max_used_connections 1
# -- Starting Event Scheduler... SET GLOBAL event_scheduler = ON;
# -- Waiting for Event Scheduler to start...
# -- Opening a new connection to check max_used_connections...
connect con_1,localhost,root;
# -- Check that max_used_connections hasn't changed.
SHOW STATUS LIKE 'max_used_connections';
Variable_name Value
Max_used_connections 2
# -- Closing new connection...
disconnect con_1;
connection default;
# -- Stopping Event Scheduler... SET GLOBAL event_scheduler = OFF;
# -- Waiting for Event Scheduler to stop...
# -- End of Bug#35074.
connect extracon,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,;
SELECT 'Connection on extra port ok';
Connection on extra port ok
Connection on extra port ok
connect extracon2,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,;
SELECT 'Connection on extra port 2 ok';
Connection on extra port 2 ok
Connection on extra port 2 ok
# -- Success: more than --extra-max-connections + 1 normal connections not possible
#
# -- Bug#49752: 2469.126.2 unintentionally breaks authentication
# against MySQL 5.1 server
#
GRANT ALL ON test.* TO 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567'@'localhost' IDENTIFIED BY 'test123';
FLUSH PRIVILEGES;
connect con1,localhost, O1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567x,test123,test;
disconnect con1;
connection default;
DROP USER 'O1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567'@'localhost';
FLUSH PRIVILEGES;
#
# -- End of Bug#49752
#
# ------------------------------------------------------------------
# -- End of 5.1 tests
# ------------------------------------------------------------------
disconnect extracon;
disconnect extracon2;
connection default;
CREATE USER mysqltest_up1 IDENTIFIED VIA mysql_native_password using '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB';
connect(localhost,mysqltest_up1,foo,test,MASTER_PORT,MASTER_SOCKET);
connect pcon1,localhost,mysqltest_up1,foo,,$MASTER_MYPORT,; ERROR28000: Access denied for user 'mysqltest_up1'@'localhost' (using password: YES)
connect pcon2,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,;
select user(), current_user();
user() current_user()
mysqltest_up1@localhost mysqltest_up1@%
disconnect pcon2;
connect(localhost,mysqltest_nouser,newpw,test,MASTER_PORT,MASTER_SOCKET);
connect pcon5,localhost,mysqltest_nouser,newpw,,$MASTER_MYPORT,; ERROR28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: YES)
connect(localhost,mysqltest_nouser,,test,MASTER_PORT,MASTER_SOCKET);
connect pcon5,localhost,mysqltest_nouser,,,$MASTER_MYPORT,; ERROR28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: NO)
connection default;
# switching from mysql.global_priv to mysql.user
update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1';
select user, password, plugin, authentication_string from mysql.user
where user like 'mysqltest_up_';
user password plugin authentication_string
mysqltest_up1 *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
flush privileges;
connect pcon6,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,;
select user(), current_user();
user() current_user()
mysqltest_up1@localhost mysqltest_up1@%
disconnect pcon6;
connection default;
# switching back from mysql.user to mysql.global_priv
DROP USER mysqltest_up1@'%';
#
# BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
#
create table t1 (via int);
alter table t1 add key(via);
drop table t1;
create table t1 (col1 int);
alter table t1 add via int not null;
drop table t1;
create procedure p1(x int)
foo: loop if x = 0 then
leave foo;
end if;
select 'test'; set x = x-1;
end loop foo|
call p1(2);
test
test
test
test
drop procedure p1;
#
# MDEV-19282: Log more specific warning with log_warnings=2if
# connection is aborted prior to authentication
# MDEV-19277: Add status variable that gets incremented if
# connection is aborted prior to authentication
#
flush global status;
SHOW GLOBAL STATUS LIKE 'Aborted_connects%';
Variable_name Value
Aborted_connects 0
Aborted_connects_preauth 0 SET GLOBAL log_warnings=2; NOT FOUND /This connection closed normally without authentication/ in mysqld.1.err
# let tcp to detect disconnect
select sleep(1);
sleep(1) 0
SHOW GLOBAL STATUS LIKE 'Aborted_connects%';
Variable_name Value
Aborted_connects 1
Aborted_connects_preauth 1
FOUND 1 /This connection closed normally without authentication/ in mysqld.1.err SET @save_connect_timeout= @@connect_timeout; SET GLOBAL connect_timeout=2;
SHOW GLOBAL STATUS LIKE 'Aborted_connects%';
Variable_name Value
Aborted_connects 2
Aborted_connects_preauth 2
FOUND 2 /This connection closed normally without authentication/ in mysqld.1.err SET GLOBAL log_warnings=default; SET GLOBAL connect_timeout= @save_connect_timeout;
# End of 10.4 tests
#
# MDEV-33990: SHOW STATUS counts ER_CON_COUNT_ERROR as
# Connection_errors_internal
#
flush status;
show global status like 'Connection_errors%';
Variable_name Value
Connection_errors_accept 0
Connection_errors_internal 0
Connection_errors_max_connections 0
Connection_errors_peer_address 0
Connection_errors_select 0
Connection_errors_tcpwrap 0
show global status like 'Threads_connected';
Variable_name Value
Threads_connected 1 set @max_con.save= @@max_connections; set global max_connections= 10;
# ERROR1040
# ERROR1040
show global status like 'Connection_errors%';
Variable_name Value
Connection_errors_accept 0
Connection_errors_internal 0
Connection_errors_max_connections 2
Connection_errors_peer_address 0
Connection_errors_select 0
Connection_errors_tcpwrap 0 set global max_connections= @max_con.save;
# End of 10.5 tests
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.