1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.11 -> 11.4

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2024-12-05 11:01:42 +01:00
78 changed files with 1333 additions and 273 deletions

View File

@@ -1,8 +0,0 @@
CREATE TABLE t1 (a INT, b INT, c INT, vc INT AS (c), UNIQUE(a), UNIQUE(b)) WITH SYSTEM VERSIONING;
INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3);
SELECT a, b, c FROM t1 INTO OUTFILE '15330.data';
LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c);
Warnings:
Warning 1062 Duplicate entry '1' for key 'a'
LOAD DATA INFILE '15330.data' REPLACE INTO TABLE t1 (a,b,c);
DROP TABLE t1;

View File

@@ -61,3 +61,14 @@ connection con1;
replace into t1 values (1),(2);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
drop table t1;
#
# MDEV-15330 Server crash or assertion `table->insert_values' failure in write_record upon LOAD DATA
#
create table t1 (a int, b int, c int, vc int as (c), unique(a), unique(b)) with system versioning;
insert ignore into t1 (a,b,c) values (1,2,3);
select a, b, c into outfile '15330.data' from t1;
load data infile '15330.data' ignore into table t1 (a,b,c);
Warnings:
Warning 1062 Duplicate entry '1' for key 'a'
load data infile '15330.data' replace into table t1 (a,b,c);
drop table t1;

View File

@@ -1,20 +0,0 @@
#
# MDEV-15330 Server crash or assertion `table->insert_values' failure in write_record upon LOAD DATA
#
--let $datadir= `select @@datadir`
CREATE TABLE t1 (a INT, b INT, c INT, vc INT AS (c), UNIQUE(a), UNIQUE(b)) WITH SYSTEM VERSIONING;
INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3);
--disable_cursor_protocol
--enable_prepare_warnings
--disable_ps2_protocol
SELECT a, b, c FROM t1 INTO OUTFILE '15330.data';
--disable_prepare_warnings
--enable_ps2_protocol
--enable_cursor_protocol
LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c);
LOAD DATA INFILE '15330.data' REPLACE INTO TABLE t1 (a,b,c);
# Cleanup
DROP TABLE t1;
--remove_file $datadir/test/15330.data

View File

@@ -77,4 +77,32 @@ replace into t1 values (1),(2);
drop table t1;
--echo #
--echo # MDEV-15330 Server crash or assertion `table->insert_values' failure in write_record upon LOAD DATA
--echo #
if ($default_engine == MEMORY)
{
--disable_query_log
set default_storage_engine= myisam;
--enable_query_log
}
create table t1 (a int, b int, c int, vc int as (c), unique(a), unique(b)) with system versioning;
insert ignore into t1 (a,b,c) values (1,2,3);
--disable_cursor_protocol
--disable_ps2_protocol
select a, b, c into outfile '15330.data' from t1;
--enable_ps2_protocol
--enable_cursor_protocol
load data infile '15330.data' ignore into table t1 (a,b,c);
load data infile '15330.data' replace into table t1 (a,b,c);
--let $datadir=`select @@datadir`
--remove_file $datadir/test/15330.data
# cleanup
drop table t1;
--disable_query_log
eval set default_storage_engine= $default_engine;
--enable_query_log
--source suite/versioning/common_finish.inc