Skip to content

Commit

Permalink
Merge 11.1 into 11.2
Browse files Browse the repository at this point in the history
Fix old_mode flags conflict between OLD_MODE_NO_NULL_COLLATION_IDS
and OLD_MODE_LOCK_ALTER_TABLE_COPY.

Both flags used to be 1 << 6, now OLD_MODE_LOCK_ALTER_TABLE_COPY changed
to be 1 << 7
  • Loading branch information
vaintroub committed Nov 30, 2023
2 parents 2d6c2f2 + 2b40f8d commit 96250c8
Show file tree
Hide file tree
Showing 47 changed files with 525 additions and 211 deletions.
58 changes: 58 additions & 0 deletions mysql-test/main/mysql_connector_net.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
$assembly = [system.reflection.Assembly]::LoadWithPartialName("MySql.Data")
if ($assembly -eq $null)
{
"Can't load assembly MySql.Data"
exit 100
}

try
{
$connectionString =[string]::Format("server=127.0.0.1;uid=root;port={0};Connection Reset=true;",$Env:MASTER_MYPORT)
$connection = [MySql.Data.MySqlClient.MySqlConnection]@{ConnectionString=$connectionString}
$connection.Open()

# Test ExecuteReader()
$command = New-Object MySql.Data.MySqlClient.MySqlCommand
$command.Connection = $connection
$command.CommandText = "SELECT @@old_mode"
$reader = $command.ExecuteReader()
$reader.GetName(0)
while ($reader.Read())
{
$reader.GetValue(0)
}

# Test connection reset
$connection.Close()
$connection.Open()
# Test ExecuteNonQuery()
$command.CommandText="do 1";
$affected_rows = $command.ExecuteNonQuery()
if ($affected_rows -ne 0)
{
"Expected affected rows 0, actual $affected_rows"
exit 1
}
# Test Prepared Statement
$command.CommandText = "SELECT @var";
[void]$command.Parameters.AddWithValue("@var", 1);
$command.Prepare();
$out = $command.ExecuteScalar();
if ($out -ne 1)
{
"Expected output 1, actual $out"
exit 1
}
$connection.Close()
}
catch
{
# Dump exception
$_
$inner = $PSItem.Exception.InnerException
if ($inner -ne $null)
{
$PSItem.Exception.InnerException.Message
$PSItem.Exception.InnerException.StackTrace
}
}
2 changes: 2 additions & 0 deletions mysql-test/main/mysql_connector_net.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@@old_mode
UTF8_IS_UTF8MB3,NO_NULL_COLLATION_IDS
11 changes: 11 additions & 0 deletions mysql-test/main/mysql_connector_net.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--source include/windows.inc
let $sys_errno=0;

# Error 100 is returned by the powershell script
# if MySql.Data is not installed
--error 0,100
--exec powershell -NoLogo -NoProfile -File main\mysql_connector_net.ps1
if ($sys_errno != 0)
{
--skip Connector/NET is not installed
}
20 changes: 11 additions & 9 deletions mysql-test/main/mysqld--help,win.rdiff
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
@@ -180,6 +180,7 @@
--- main/mysqld--help.result 2023-11-30 02:21:51.951132200 +0100
+++ main/mysqld--help,win.reject 2023-11-30 02:35:44.404612300 +0100
@@ -191,6 +191,7 @@
--console Write error output on screen; don't remove the console
window on windows.
--core-file Write core on crashes
+ (Defaults to on; use --skip-core-file to disable.)
-h, --datadir=name Path to the database root directory
--date-format=name The DATE format (ignored)
--datetime-format=name
@@ -650,6 +651,7 @@
@@ -696,6 +697,7 @@
Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME,
DATETIME, TIMESTAMP columns.
(Defaults to on; use --skip-mysql56-temporal-format to disable.)
+ --named-pipe Enable the named pipe (NT)
--net-buffer-length=#
Buffer length for TCP/IP and socket communication
--net-read-timeout=#
@@ -1327,6 +1328,10 @@
@@ -1351,6 +1353,10 @@
Alias for log_slow_query_file. Log slow queries to given
log file. Defaults logging to 'hostname'-slow.log. Must
be enabled to activate other slow log options
Expand All @@ -25,15 +27,15 @@
--socket=name Socket file to use for connection
--sort-buffer-size=#
Each thread that needs to do a sort allocates a buffer of
@@ -1351,6 +1356,7 @@
@@ -1376,6 +1382,7 @@
deleting or updating every row in a table.
--stack-trace Print a symbolic stack trace on failure
(Defaults to on; use --skip-stack-trace to disable.)
+ --standalone Dummy option to start as a standalone program (NT).
--standard-compliant-cte
Allow only CTEs compliant to SQL standard
(Defaults to on; use --skip-standard-compliant-cte to disable.)
@@ -1426,6 +1432,11 @@
@@ -1454,6 +1461,11 @@
--thread-pool-max-threads=#
Maximum allowed number of worker threads in the thread
pool
Expand All @@ -45,7 +47,7 @@
--thread-pool-oversubscribe=#
How many additional active worker threads in a group are
allowed.
@@ -1464,8 +1475,8 @@
@@ -1493,8 +1505,8 @@
automatically convert it to an on-disk MyISAM or Aria
table.
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
Expand All @@ -56,23 +58,23 @@
--transaction-alloc-block-size=#
Allocation block size for transactions to be stored in
binary log
@@ -1685,6 +1696,7 @@
@@ -1716,6 +1728,7 @@
myisam-stats-method NULLS_UNEQUAL
myisam-use-mmap FALSE
mysql56-temporal-format TRUE
+named-pipe FALSE
net-buffer-length 16384
net-read-timeout 30
net-retry-count 10
@@ -1841,6 +1853,7 @@
@@ -1874,6 +1887,7 @@
slave-type-conversions
slow-launch-time 2
slow-query-log FALSE
+slow-start-timeout 15000
sort-buffer-size 2097152
sql-mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sql-safe-updates FALSE
@@ -1867,6 +1880,8 @@
@@ -1901,6 +1915,8 @@
thread-pool-exact-stats FALSE
thread-pool-idle-timeout 60
thread-pool-max-threads 65536
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/main/mysqld--help.result
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ The following specify which files/extra groups are read (specified before remain
NO_DUP_KEY_WARNINGS_WITH_IGNORE, NO_PROGRESS_INFO,
ZERO_DATE_TIME_CAST, UTF8_IS_UTF8MB3,
IGNORE_INDEX_ONLY_FOR_JOIN, COMPAT_5_1_CHECKSUM,
LOCK_ALTER_TABLE_COPY
NO_NULL_COLLATION_IDS, LOCK_ALTER_TABLE_COPY
Use 'ALL' to set all combinations.
--old-passwords Use old password encryption method (needed for 4.0 and
older clients)
Expand Down
10 changes: 10 additions & 0 deletions mysql-test/main/old-mode.result
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,13 @@ Warning 1264 Out of range value for column 'a' at row 2
DROP TABLE t1;
SET @@time_zone=DEFAULT;
SET TIMESTAMP=DEFAULT;
#
# MDEV-31608 - Connector/NET fails to connect since 10.10
#
select count(*) > 0 from information_schema.collations where id IS NULL;
count(*) > 0
1
SET old_mode=no_null_collation_ids;
select count(*) > 0 from information_schema.collations where id IS NULL;
count(*) > 0
0
8 changes: 8 additions & 0 deletions mysql-test/main/old-mode.test
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,11 @@ DROP TABLE t1;

SET @@time_zone=DEFAULT;
SET TIMESTAMP=DEFAULT;

--echo #
--echo # MDEV-31608 - Connector/NET fails to connect since 10.10
--echo #
select count(*) > 0 from information_schema.collations where id IS NULL;
SET old_mode=no_null_collation_ids;
select count(*) > 0 from information_schema.collations where id IS NULL;

6 changes: 0 additions & 6 deletions mysql-test/suite/innodb/r/innodb-blob.result
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ a RIGHT(b,20)
2 bbbbbbbbbbbbbbbbbbbb
connection default;
SET DEBUG='+d,row_ins_extern_checkpoint';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC='before_row_ins_extern_latch SIGNAL rec_not_blob WAIT_FOR crash';
ROLLBACK;
BEGIN;
Expand Down Expand Up @@ -88,8 +86,6 @@ BEGIN;
INSERT INTO t2 VALUES (347);
connection default;
SET DEBUG='+d,row_upd_extern_checkpoint';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
UPDATE t3 SET c=REPEAT('i',3000) WHERE a=2;
connection con2;
Expand Down Expand Up @@ -126,8 +122,6 @@ BEGIN;
INSERT INTO t2 VALUES (33101);
connection default;
SET DEBUG='+d,row_upd_extern_checkpoint';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC='after_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
UPDATE t3 SET c=REPEAT('j',3000) WHERE a=2;
connection con2;
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/innodb/r/innodb-index-debug.result
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ ALTER TABLE t1 FORCE, ADD COLUMN k4 int;
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET debug = '+d,row_log_tmpfile_fail';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
INSERT INTO t1 select NULL,'aaa','bbb' from t480;
INSERT INTO t1 select NULL,'aaaa','bbbb' from t480;
SET DEBUG_SYNC= 'now SIGNAL flushed';
Expand Down
6 changes: 0 additions & 6 deletions mysql-test/suite/innodb/r/innodb-table-online.result
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,10 @@ SET DEBUG_DBUG = '+d,innodb_OOM_prepare_inplace_alter';
ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE;
ERROR HY000: Out of memory.
SET SESSION DEBUG = @saved_debug_dbug;
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET SESSION DEBUG = '+d,innodb_OOM_inplace_alter';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE;
ERROR HY000: Out of memory.
SET SESSION DEBUG = @saved_debug_dbug;
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ALGORITHM=INPLACE, LOCK=NONE;
connection default;
SHOW CREATE TABLE t1;
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/innodb/r/page_reorganize.result
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ SET @save_dbug = @@debug_dbug;
SET DEBUG_DBUG = '+d,do_page_reorganize,do_lock_reverse_page_reorganize';
insert into t1(f2) values (repeat('+', 100));
SET DEBUG = @save_dbug;
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
commit;
connection con1;
f1
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/innodb_fts/r/ft_result_cache_limit.result
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ END//
CALL populate_t1;
SET autocommit=1;
SET SESSION debug="+d,fts_instrument_result_cache_limit";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
ALTER TABLE t1 ADD FULLTEXT INDEX `text_content_idx` (`text_content`);
SELECT FTS_DOC_ID, text_content
FROM t1
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/innodb_gis/r/check_rtree.result
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
create table t1 (i int, g geometry not null, spatial index (g))engine=innodb;
SET SESSION debug="+d,rtree_test_check_count";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
insert into t1 values (1, POINT(1,1));
insert into t1 values (1, POINT(1.5,1.5));
insert into t1 values (1, POINT(3,3));
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/innodb_gis/r/rollback.result
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,6 @@ update t1 set a=point(5,5), b=point(5,5), c=5 where i < 3;
ERROR 23000: Duplicate entry '5' for key 'c'
rollback;
set session debug="+d,row_mysql_crash_if_error";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
update t1 set a=point(5,5), b=point(5,5), c=5 where i < 3;
ERROR HY000: Lost connection to server during query
insert into t1 values(5, point(5,5), point(5,5), 5);
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/innodb_gis/r/rtree_compress.result
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ count(*)
0
SET @saved_dbug = @@SESSION.debug_dbug;
SET DEBUG='+d,page_copy_rec_list_start_compress_fail';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
delete from t1;
select count(*) from t1 where MBRWithin(t1.c2, @g1);
count(*)
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/innodb_gis/r/rtree_create_inplace.result
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,5 @@ COUNT(*)
0
ALTER TABLE t1 DROP INDEX idx, ADD SPATIAL INDEX idx3(c2);
SET SESSION debug="+d,row_merge_instrument_log_check_flush";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
ALTER TABLE t1 DROP INDEX idx3, ADD SPATIAL INDEX idx4(c2), ADD SPATIAL INDEX idx5(c3);
DROP TABLE t1;
22 changes: 22 additions & 0 deletions mysql-test/suite/perfschema/r/sxlock_func,debug.rdiff
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@@ -7,7 +7,6 @@
WHERE name LIKE 'wait/synch/rwlock/innodb/%'
AND name!='wait/synch/rwlock/innodb/btr_search_latch' ORDER BY name;
name
-wait/synch/rwlock/innodb/dict_operation_lock
wait/synch/rwlock/innodb/fil_space_latch
wait/synch/rwlock/innodb/lock_latch
wait/synch/rwlock/innodb/trx_i_s_cache_lock
@@ -19,11 +18,13 @@
select name from performance_schema.setup_instruments
where name like "wait/synch/sxlock/%" order by name;
name
+wait/synch/sxlock/innodb/dict_operation_lock
wait/synch/sxlock/innodb/index_tree_rw_lock
SELECT DISTINCT name FROM performance_schema.rwlock_instances
WHERE name LIKE 'wait/synch/sxlock/innodb/%'
ORDER BY name;
name
+wait/synch/sxlock/innodb/dict_operation_lock
wait/synch/sxlock/innodb/index_tree_rw_lock
create table t1(a int) engine=innodb;
begin;
1 change: 1 addition & 0 deletions mysql-test/suite/perfschema/t/sxlock_func.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
--source include/have_innodb.inc
--source include/maybe_debug.inc

UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';

Expand Down
8 changes: 0 additions & 8 deletions mysql-test/suite/rpl/r/rpl_semisync_ali_issues.result
Original file line number Diff line number Diff line change
Expand Up @@ -270,25 +270,19 @@ Variable_name Value
Rpl_semi_sync_master_clients 1
# Test failure of select error .
SET GLOBAL debug = 'd,rpl_semisync_simulate_select_error';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
INSERT INTO t1 VALUES(3);
connection slave;
connection con1;
# Test failure of pthread_create
SET GLOBAL rpl_semi_sync_master_enabled = 0;
SET GLOBAL debug = 'd,rpl_semisync_simulate_create_thread_failure';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET GLOBAL rpl_semi_sync_master_enabled= ON;
# Test failure of pthread_join
SET GLOBAL rpl_semi_sync_master_enabled= OFF;
#
# Failure on registering semisync slave
#
SET GLOBAL debug= 'd,rpl_semisync_simulate_add_slave_failure';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET GLOBAL rpl_semi_sync_master_enabled= ON;
connection slave;
STOP SLAVE IO_THREAD;
Expand All @@ -297,8 +291,6 @@ START SLAVE IO_THREAD;
include/wait_for_slave_io_to_start.inc
connection con1;
SET GLOBAL debug='';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
connection slave;
START SLAVE IO_THREAD;
include/wait_for_slave_io_to_start.inc
Expand Down
2 changes: 0 additions & 2 deletions mysql-test/suite/sys_vars/r/debug_basic.result
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
set session debug="L";
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
select @@global.debug="1";
@@global.debug="1"
0
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/sys_vars/r/old_mode_basic.result
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ SET @@global.old_mode = 4;
SELECT @@global.old_mode;
@@global.old_mode
ZERO_DATE_TIME_CAST
SET @@global.old_mode = 128;
ERROR 42000: Variable 'old_mode' can't be set to the value of '128'
SET @@global.old_mode = 256;
ERROR 42000: Variable 'old_mode' can't be set to the value of '256'
SELECT @@global.old_mode;
@@global.old_mode
ZERO_DATE_TIME_CAST
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/sys_vars/r/sysvars_debug.result
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Built-in DBUG debugger
VARIABLE_COMMENT Built-in DBUG debugger. Alias for --debug
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
Original file line number Diff line number Diff line change
Expand Up @@ -2309,7 +2309,7 @@ VARIABLE_COMMENT Used to emulate old behavior from earlier MariaDB or MySQL vers
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NO_DUP_KEY_WARNINGS_WITH_IGNORE,NO_PROGRESS_INFO,ZERO_DATE_TIME_CAST,UTF8_IS_UTF8MB3,IGNORE_INDEX_ONLY_FOR_JOIN,COMPAT_5_1_CHECKSUM,LOCK_ALTER_TABLE_COPY
ENUM_VALUE_LIST NO_DUP_KEY_WARNINGS_WITH_IGNORE,NO_PROGRESS_INFO,ZERO_DATE_TIME_CAST,UTF8_IS_UTF8MB3,IGNORE_INDEX_ONLY_FOR_JOIN,COMPAT_5_1_CHECKSUM,NO_NULL_COLLATION_IDS,LOCK_ALTER_TABLE_COPY
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OLD_PASSWORDS
Expand Down

0 comments on commit 96250c8

Please sign in to comment.