mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
Add explicit column aliases to SELECT statements in slave_parallel_threads_basic to ensure consistent column names across both normal and view-protocol modes. The test sys_vars.slave_parallel_threads_basic.test was failing in view-protocol mode due to different column naming behavior. Without an explicit column alias, view-protocol mode generates an automatic name (Name_exp_1) while normal mode uses the full expression as the column name. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
23 lines
1.0 KiB
Plaintext
23 lines
1.0 KiB
Plaintext
SET @save_slave_parallel_threads= @@GLOBAL.slave_parallel_threads;
|
|
SELECT IF(COUNT(*) < 20, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) AS ProcessCheck FROM information_schema.processlist WHERE user = "system user";
|
|
ProcessCheck
|
|
OK
|
|
SELECT @@GLOBAL.slave_parallel_threads as 'must be 20 because of .cnf';
|
|
must be 20 because of .cnf
|
|
20
|
|
SELECT @@SESSION.slave_parallel_threads as 'no session var';
|
|
ERROR HY000: Variable 'slave_parallel_threads' is a GLOBAL variable
|
|
SET GLOBAL slave_parallel_threads= 0;
|
|
SET GLOBAL slave_parallel_threads= DEFAULT;
|
|
SELECT @@GLOBAL.slave_parallel_threads as 'must be 0 because of default';
|
|
must be 0 because of default
|
|
0
|
|
SET GLOBAL slave_parallel_threads= 10;
|
|
SELECT @@GLOBAL.slave_parallel_threads;
|
|
@@GLOBAL.slave_parallel_threads
|
|
10
|
|
SELECT IF(COUNT(*) < 10, "OK", CONCAT("Found too many system user processes: ", COUNT(*))) AS ProcessCheck FROM information_schema.processlist WHERE user = "system user";
|
|
ProcessCheck
|
|
OK
|
|
SET GLOBAL slave_parallel_threads = @save_slave_parallel_threads;
|