Skip to content

Commit 4686023

Browse files
author
Nisha Gopalakrishnan
committed
BUG#25846957: MYSQL STARTUP BLOCKED FOR 20 MINUTES
ON PARTITION-ENGINE-CHECK. Analysis: ========= From MySQL-5.7.17, during the server start up, a check is performed to list the tables which uses non native paritioning. This helps users to prepare for upgrade to 8.0 where the support for non native partitioning is removed. For large databases with many such tables, this check consumed a lot of time since a SELECT on I_S is performed to fetch the information. By default, the variable 'disable-partition-engine-check' is disabled, which triggers the check for tables using non-native partitioning at startup. Fix: ==== The variable 'disable-partition-engine-check' is enabled by default. Hence the check for non native partitioned tables is skipped during the start up unless it is explicitly disabled.
1 parent 1fde42d commit 4686023

File tree

6 files changed

+58
-53
lines changed

6 files changed

+58
-53
lines changed

mysql-test/r/mysqld--help-notwin.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ The following options may be given as the first argument:
218218
Skip the check for non-natively partitioned tables during
219219
bootstrap. This option is deprecated along with the
220220
partition engine.
221+
(Defaults to on; use --skip-disable-partition-engine-check to disable.)
221222
--disabled-storage-engines=name
222223
Limit CREATE TABLE for the storage engines listed
223224
--disconnect-on-expired-password
@@ -1294,7 +1295,7 @@ delay-key-write ON
12941295
delayed-insert-limit 100
12951296
delayed-insert-timeout 300
12961297
delayed-queue-size 1000
1297-
disable-partition-engine-check FALSE
1298+
disable-partition-engine-check TRUE
12981299
disabled-storage-engines
12991300
disconnect-on-expired-password TRUE
13001301
disconnect-slave-event-count 0

mysql-test/r/mysqld--help-win.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ The following options may be given as the first argument:
217217
Skip the check for non-natively partitioned tables during
218218
bootstrap. This option is deprecated along with the
219219
partition engine.
220+
(Defaults to on; use --skip-disable-partition-engine-check to disable.)
220221
--disabled-storage-engines=name
221222
Limit CREATE TABLE for the storage engines listed
222223
--disconnect-on-expired-password
@@ -1292,7 +1293,7 @@ delay-key-write ON
12921293
delayed-insert-limit 100
12931294
delayed-insert-timeout 300
12941295
delayed-queue-size 1000
1295-
disable-partition-engine-check FALSE
1296+
disable-partition-engine-check TRUE
12961297
disabled-storage-engines
12971298
disconnect-on-expired-password TRUE
12981299
disconnect-slave-event-count 0

mysql-test/r/partition_deprecation.result

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@ TABLE_SCHEMA TABLE_NAME
9292
test t1
9393
Warnings:
9494
Warning 1287 The partition engine, used by table 'test.t1', is deprecated and will be removed in a future release. Please use native partitioning instead.
95-
# Verify that the startup option --disable-partition-engine-check skips the I_S query.
96-
# restart: --disable-partition-engine-check --no-console --log-error=LOG_FILE
97-
# No deprecation warning found.
98-
# Verify that the I_S query on bootstrap prints warnings in the error log.
95+
# Verify that the startup by default skips the I_S query, since the
96+
# option --disable-partition-engine-check defaults to TRUE.
9997
# restart: --no-console --log-error=LOG_FILE
98+
# No deprecation warning found.
99+
# Verify that the I_S query on bootstrap prints warnings in the error log
100+
# when '--disable-partition-engine-check=0'.
101+
# restart: --disable-partition-engine-check=0 --no-console --log-error=LOG_FILE
100102
# Deprecation warning found.
101103
# Restart the server without additional options.
102104
# restart:

mysql-test/suite/test_service_sql_api/r/test_session_info.result

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ Session 2 : srv_session_info_get_thd and srv_session_info_get_session_id
3030
============================================================================================
3131
Thread handler id IS equal to session id returned by srv_session_info_get_session_id(Session_2)
3232

33-
SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 4
33+
SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 3
3434
name type processlist_id processlist_user processlist_host processlist_db processlist_command processlist_state processlist_info role instrumented history connection_type
35-
thread/sql/one_connection FOREGROUND 4 root localhost test Query Sending data SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 4 [NULL] YES YES Plugin
35+
thread/sql/one_connection FOREGROUND 3 root localhost test Query Sending data SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 3 [NULL] YES YES Plugin
3636

3737
num_cols : 13
3838
nb rows : 1
3939
affected rows : 0
4040
server status : 34
4141
warn count : 0
4242

43-
SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 5
43+
SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 4
4444
name type processlist_id processlist_user processlist_host processlist_db processlist_command processlist_state processlist_info role instrumented history connection_type
45-
thread/sql/one_connection FOREGROUND 5 root localhost test Query Sending data SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 5 [NULL] YES YES Plugin
45+
thread/sql/one_connection FOREGROUND 4 root localhost test Query Sending data SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 4 [NULL] YES YES Plugin
4646

4747
num_cols : 13
4848
nb rows : 1
@@ -201,7 +201,7 @@ warn count : 0
201201
Session 1 : srv_session_info_set_connection_type
202202
============================================================================================
203203
Session 1's view
204-
SELECT CONNECTION_TYPE, CONNECTION_TYPE IS NULL FROM performance_schema.threads WHERE PROCESSLIST_ID = 4 /*session_1_id*/
204+
SELECT CONNECTION_TYPE, CONNECTION_TYPE IS NULL FROM performance_schema.threads WHERE PROCESSLIST_ID = 3 /*session_1_id*/
205205
CONNECTION_TYPE CONNECTION_TYPE IS NULL
206206
Plugin 0
207207

@@ -213,7 +213,7 @@ warn count : 0
213213

214214
Setting NO_VIO_TYPE on session_1
215215
Session 1's view
216-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 4 /*session_1_id*/
216+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 3 /*session_1_id*/
217217
CONNECTION_TYPE
218218
Plugin
219219

@@ -225,7 +225,7 @@ warn count : 0
225225

226226
Setting VIO_TYPE_TCPIP on session_1
227227
Session 1's view
228-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 4 /*session_1_id*/
228+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 3 /*session_1_id*/
229229
CONNECTION_TYPE
230230
TCP/IP
231231

@@ -237,7 +237,7 @@ warn count : 0
237237

238238
Setting VIO_TYPE_NAMEDPIPE on session_1
239239
Session 1's view
240-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 4 /*session_1_id*/
240+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 3 /*session_1_id*/
241241
CONNECTION_TYPE
242242
Named Pipe
243243

@@ -251,7 +251,7 @@ warn count : 0
251251
Session 2 : srv_session_info_set_connection_type
252252
============================================================================================
253253
Session 2's view
254-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 5 /*session_2_id*/
254+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 4 /*session_2_id*/
255255
CONNECTION_TYPE
256256
Plugin
257257

@@ -264,7 +264,7 @@ warn count : 0
264264
Setting VIO_TYPE_SSL on session_2
265265
Setting VIO_TYPE_TCPIP on session_1
266266
Session 2's view
267-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 5 /*session_2_id*/
267+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 4 /*session_2_id*/
268268
CONNECTION_TYPE
269269
SSL/TLS
270270

@@ -275,7 +275,7 @@ server status : 34
275275
warn count : 0
276276

277277
Session 2's view
278-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 5 /*session_2_id*/
278+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 4 /*session_2_id*/
279279
CONNECTION_TYPE
280280
Shared Memory
281281

@@ -290,8 +290,8 @@ BEFORE kill of Session 1
290290
============================================================================================
291291
SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
292292
ID USER HOST DB COMMAND INFO
293-
4 root localhost:100 test Query PLUGIN: SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
294-
5 root localhost:200 test Sleep PLUGIN
293+
3 root localhost:100 test Query PLUGIN: SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
294+
4 root localhost:200 test Sleep PLUGIN
295295

296296
num_cols : 6
297297
nb rows : 2
@@ -304,7 +304,7 @@ srv_session_info_killed(Session_1) : 0
304304
srv_session_info_killed(Session_2) : 0
305305
============================================================================================
306306
Killing Session 1
307-
KILL CONNECTION 4 /*session_1_id*/
307+
KILL CONNECTION 3 /*session_1_id*/
308308
affected rows : 0
309309
server status : 2
310310
warn count : 0
@@ -336,15 +336,15 @@ SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHE
336336
============================================================================================
337337
Perform KILL QUERY and suicide (KILL CONNECTION) on Session 2
338338
============================================================================================
339-
KILL QUERY 5 /*session_2_id*/
339+
KILL QUERY 4 /*session_2_id*/
340340
srv_session_info_killed(Session 2) : 0
341-
KILL CONNECTION 5 /*session_2_id*/
341+
KILL CONNECTION 4 /*session_2_id*/
342342
srv_session_info_killed(Session 2) : 1
343343
============================================================================================
344344
Get/Set session info with killed session(Session 2)
345345
============================================================================================
346346
srv_session_info_get_thd : 1
347-
srv_session_info_get_session_id : 5
347+
srv_session_info_get_session_id : 4
348348
srv_session_info_set_client_port : 0
349349
srv_session_info_get_client_port : 11111
350350
srv_session_info_get_current_db : test
@@ -355,8 +355,8 @@ Session 2 got killed but not closed, thus it will appear in the processlist as K
355355
============================================================================================
356356
/*Session 3*/SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
357357
ID USER HOST DB COMMAND INFO
358-
5 root localhost:11111 test Killed PLUGIN
359-
6 root localhost [NULL] Query PLUGIN: /*Session 3*/SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
358+
4 root localhost:11111 test Killed PLUGIN
359+
5 root localhost [NULL] Query PLUGIN: /*Session 3*/SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
360360

361361
num_cols : 6
362362
nb rows : 2
@@ -381,19 +381,19 @@ Session 2 : srv_session_info_get_thd and srv_session_info_get_session_id
381381
============================================================================================
382382
Thread handler id IS equal to session id returned by srv_session_info_get_session_id(Session_2)
383383

384-
SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 7
384+
SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 6
385385
name type processlist_id processlist_user processlist_host processlist_db processlist_command processlist_state processlist_info role instrumented history connection_type
386-
thread/test_service_sql/session_info FOREGROUND 7 root localhost [NULL] Query Sending data SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 7 [NULL] YES YES Plugin
386+
thread/test_service_sql/session_info FOREGROUND 6 root localhost [NULL] Query Sending data SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 6 [NULL] YES YES Plugin
387387

388388
num_cols : 13
389389
nb rows : 1
390390
affected rows : 0
391391
server status : 34
392392
warn count : 0
393393

394-
SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 8
394+
SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 7
395395
name type processlist_id processlist_user processlist_host processlist_db processlist_command processlist_state processlist_info role instrumented history connection_type
396-
thread/test_service_sql/session_info FOREGROUND 8 root localhost [NULL] Query Sending data SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 8 [NULL] YES YES Plugin
396+
thread/test_service_sql/session_info FOREGROUND 7 root localhost [NULL] Query Sending data SELECT name,type,processlist_id,processlist_user,processlist_host,processlist_db,processlist_command,processlist_state,processlist_info,role,instrumented,history,connection_type FROM performance_schema.threads WHERE processlist_id = 7 [NULL] YES YES Plugin
397397

398398
num_cols : 13
399399
nb rows : 1
@@ -552,7 +552,7 @@ warn count : 0
552552
Session 1 : srv_session_info_set_connection_type
553553
============================================================================================
554554
Session 1's view
555-
SELECT CONNECTION_TYPE, CONNECTION_TYPE IS NULL FROM performance_schema.threads WHERE PROCESSLIST_ID = 7 /*session_1_id*/
555+
SELECT CONNECTION_TYPE, CONNECTION_TYPE IS NULL FROM performance_schema.threads WHERE PROCESSLIST_ID = 6 /*session_1_id*/
556556
CONNECTION_TYPE CONNECTION_TYPE IS NULL
557557
Plugin 0
558558

@@ -564,7 +564,7 @@ warn count : 0
564564

565565
Setting NO_VIO_TYPE on session_1
566566
Session 1's view
567-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 7 /*session_1_id*/
567+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 6 /*session_1_id*/
568568
CONNECTION_TYPE
569569
Plugin
570570

@@ -576,7 +576,7 @@ warn count : 0
576576

577577
Setting VIO_TYPE_TCPIP on session_1
578578
Session 1's view
579-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 7 /*session_1_id*/
579+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 6 /*session_1_id*/
580580
CONNECTION_TYPE
581581
TCP/IP
582582

@@ -588,7 +588,7 @@ warn count : 0
588588

589589
Setting VIO_TYPE_NAMEDPIPE on session_1
590590
Session 1's view
591-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 7 /*session_1_id*/
591+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 6 /*session_1_id*/
592592
CONNECTION_TYPE
593593
Named Pipe
594594

@@ -602,7 +602,7 @@ warn count : 0
602602
Session 2 : srv_session_info_set_connection_type
603603
============================================================================================
604604
Session 2's view
605-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 8 /*session_2_id*/
605+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 7 /*session_2_id*/
606606
CONNECTION_TYPE
607607
Plugin
608608

@@ -615,7 +615,7 @@ warn count : 0
615615
Setting VIO_TYPE_SSL on session_2
616616
Setting VIO_TYPE_TCPIP on session_1
617617
Session 2's view
618-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 8 /*session_2_id*/
618+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 7 /*session_2_id*/
619619
CONNECTION_TYPE
620620
SSL/TLS
621621

@@ -626,7 +626,7 @@ server status : 34
626626
warn count : 0
627627

628628
Session 2's view
629-
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 8 /*session_2_id*/
629+
SELECT CONNECTION_TYPE FROM performance_schema.threads WHERE PROCESSLIST_ID = 7 /*session_2_id*/
630630
CONNECTION_TYPE
631631
Shared Memory
632632

@@ -641,8 +641,8 @@ BEFORE kill of Session 1
641641
============================================================================================
642642
SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
643643
ID USER HOST DB COMMAND INFO
644-
7 root localhost:100 test Query PLUGIN: SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
645-
8 root localhost:200 test Sleep PLUGIN
644+
6 root localhost:100 test Query PLUGIN: SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
645+
7 root localhost:200 test Sleep PLUGIN
646646

647647
num_cols : 6
648648
nb rows : 2
@@ -655,7 +655,7 @@ srv_session_info_killed(Session_1) : 0
655655
srv_session_info_killed(Session_2) : 0
656656
============================================================================================
657657
Killing Session 1
658-
KILL CONNECTION 7 /*session_1_id*/
658+
KILL CONNECTION 6 /*session_1_id*/
659659
affected rows : 0
660660
server status : 2
661661
warn count : 0
@@ -687,15 +687,15 @@ SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHE
687687
============================================================================================
688688
Perform KILL QUERY and suicide (KILL CONNECTION) on Session 2
689689
============================================================================================
690-
KILL QUERY 8 /*session_2_id*/
690+
KILL QUERY 7 /*session_2_id*/
691691
srv_session_info_killed(Session 2) : 0
692-
KILL CONNECTION 8 /*session_2_id*/
692+
KILL CONNECTION 7 /*session_2_id*/
693693
srv_session_info_killed(Session 2) : 1
694694
============================================================================================
695695
Get/Set session info with killed session(Session 2)
696696
============================================================================================
697697
srv_session_info_get_thd : 1
698-
srv_session_info_get_session_id : 8
698+
srv_session_info_get_session_id : 7
699699
srv_session_info_set_client_port : 0
700700
srv_session_info_get_client_port : 11111
701701
srv_session_info_get_current_db : test
@@ -706,8 +706,8 @@ Session 2 got killed but not closed, thus it will appear in the processlist as K
706706
============================================================================================
707707
/*Session 3*/SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
708708
ID USER HOST DB COMMAND INFO
709-
8 root localhost:11111 test Killed PLUGIN
710-
9 root localhost [NULL] Query PLUGIN: /*Session 3*/SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
709+
7 root localhost:11111 test Killed PLUGIN
710+
8 root localhost [NULL] Query PLUGIN: /*Session 3*/SELECT ID, USER, HOST, DB, COMMAND, INFO FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info LIKE 'PLUGIN%' ORDER BY id
711711

712712
num_cols : 6
713713
nb rows : 2

0 commit comments

Comments
 (0)