mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
14d43f4fa6
The crash happens because a double free in the case CREATE TABLE fails because there is a conflicting tables on disk. Fixed by ensuring that the double free can't happen.
77 lines
2.5 KiB
Text
77 lines
2.5 KiB
Text
CREATE OR REPLACE TABLE t1 (
|
|
f1 DECIMAL(43,0) NOT NULL,
|
|
f2 TIME(4) NULL,
|
|
f3 BINARY(101) NULL,
|
|
f4 TIMESTAMP(4) NULL,
|
|
f5 DATETIME(1) NULL,
|
|
f6 SET('a','b','c') NOT NULL DEFAULT 'a',
|
|
f7 VARBINARY(2332) NOT NULL DEFAULT '',
|
|
f8 DATE NULL,
|
|
f9 BLOB NULL,
|
|
f10 MEDIUMINT(45) NOT NULL DEFAULT 0,
|
|
f11 YEAR NULL,
|
|
f12 BIT(58) NULL,
|
|
v2 TIME(1) AS (f2) VIRTUAL,
|
|
v3 BINARY(115) AS (f3) VIRTUAL,
|
|
v4 TIMESTAMP(3) AS (f4) VIRTUAL,
|
|
v7 VARBINARY(658) AS (f7) PERSISTENT,
|
|
v8 DATE AS (f8) PERSISTENT,
|
|
v9 TINYTEXT AS (f9) PERSISTENT,
|
|
v11 YEAR AS (f11) VIRTUAL
|
|
) ENGINE=Aria;
|
|
INSERT IGNORE INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12) VALUES
|
|
(0.8,'16:01:46',NULL,'2006-03-01 12:44:34','2029-10-10 21:27:53','a','foo','1989-12-24','bar',9,1975,b'1');
|
|
Warnings:
|
|
Note 1265 Data truncated for column 'f1' at row 1
|
|
DROP TABLE t1;
|
|
CREATE OR REPLACE TABLE t1 (a INT(45));
|
|
INSERT IGNORE INTO t1 VALUES (1),(2);
|
|
CREATE OR REPLACE TABLE t2 ENGINE=Aria AS SELECT SUM(a) AS f1, IFNULL( 'qux', ExtractValue( 'foo', 'bar' ) ) AS f2 FROM t1;
|
|
select * from t2;
|
|
f1 f2
|
|
3 qux
|
|
DROP TABLE t1, t2;
|
|
#
|
|
# MDEV-23159 Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
|
# m_lock_type != 2' + SIGSEGV in trnman_can_read_from
|
|
# (on optimized builds)
|
|
#
|
|
SET @org_sql_mode=@@SQL_MODE;
|
|
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=Aria ROW_FORMAT=COMPRESSED;
|
|
INSERT INTO t1 VALUES(1);
|
|
CREATE TEMPORARY TABLE t2(b INT);
|
|
EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT MAX(a) FROM t2);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 PRIMARY t1 system NULL NULL NULL NULL 1 Using index
|
|
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
|
DROP TABLE t1,t2;
|
|
SET SQL_MODE='';
|
|
CREATE TABLE t1 (c INT PRIMARY KEY) ENGINE=Aria;
|
|
CREATE TABLE t2 (d INT);
|
|
INSERT INTO t1 VALUES (1);
|
|
SELECT c FROM t1 WHERE (c) IN (SELECT MIN(c) FROM t2);
|
|
c
|
|
DROP TABLE t1,t2;
|
|
USE test;
|
|
SET SQL_MODE='ONLY_FULL_GROUP_BY';
|
|
CREATE TABLE t3 (c1 DECIMAL(1,1) PRIMARY KEY,c2 DATE,c3 NUMERIC(10) UNSIGNED) ENGINE=Aria;
|
|
CREATE TABLE t2 (f1 INTEGER ) ENGINE=Aria;
|
|
INSERT INTO t3 VALUES (0,0,0);
|
|
SELECT c1 FROM t3 WHERE (c1) IN (SELECT MIN(DISTINCT c1) FROM t2);
|
|
c1
|
|
DROP TABLE t2,t3;
|
|
SET @@SQL_MODE=@org_sql_mode;
|
|
#
|
|
# MDEV-23222 SIGSEGV in maria_status | Assertion `(longlong)
|
|
# thd->status_var.local_memory_used >= 0
|
|
#
|
|
CREATE TABLE t1 (a INT);
|
|
INSERT INTO t1 VALUES (1);
|
|
CREATE TABLE MDEV_23222 (i INT) DATA DIRECTORY = 'MYSQL_TMP_DIR', ENGINE=Aria TRANSACTIONAL=1;;
|
|
flush tables;
|
|
CREATE TABLE MDEV_23222 (i INT) DATA DIRECTORY = 'MYSQL_TMP_DIR', ENGINE=Aria TRANSACTIONAL=1;;
|
|
Got one of the listed errors
|
|
DROP TABLE t1;
|
|
#
|
|
# End of 10.3 tests
|
|
#
|