mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
93c360e3a5
use_stat_tables= PREFERABLY optimizer_use_condition_selectivity= 4
28 lines
1.1 KiB
Text
28 lines
1.1 KiB
Text
CREATE TABLE bug53046_1 (c1 INT PRIMARY KEY) ENGINE=INNODB;
|
|
CREATE TABLE bug53046_2 (c2 INT PRIMARY KEY,
|
|
FOREIGN KEY (c2) REFERENCES bug53046_1(c1)
|
|
ON UPDATE CASCADE ON DELETE CASCADE) ENGINE=INNODB;
|
|
INSERT INTO bug53046_1 VALUES (1);
|
|
INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
|
FROM bug53046_1;
|
|
INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
|
FROM bug53046_1;
|
|
INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
|
FROM bug53046_1;
|
|
INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
|
FROM bug53046_1;
|
|
INSERT INTO bug53046_1 SELECT c1+(SELECT MAX(c1) FROM bug53046_1)
|
|
FROM bug53046_1;
|
|
INSERT INTO bug53046_2 VALUES (1), (2);
|
|
ANALYZE TABLE bug53046_1;
|
|
Table Op Msg_type Msg_text
|
|
test.bug53046_1 analyze status Engine-independent statistics collected
|
|
test.bug53046_1 analyze status OK
|
|
SHOW TABLE STATUS LIKE 'bug53046_1';
|
|
UPDATE bug53046_1 SET c1 = c1 - 1;
|
|
DELETE FROM bug53046_1;
|
|
INSERT INTO bug53046_1 VALUES (1);
|
|
INSERT INTO bug53046_2 VALUES (1);
|
|
TRUNCATE TABLE bug53046_2;
|
|
DROP TABLE bug53046_2;
|
|
DROP TABLE bug53046_1;
|