-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-24715 Assertion !node->table->skip_alter_undo in CREATE...REPLAC…
…E SELECT In commit 3cef4f8 (MDEV-515) we inadvertently broke CREATE TABLE...REPLACE SELECT statements by wrongly disabling row-level undo logging. select_create::prepare(): Only invoke extra(HA_EXTRA_BEGIN_ALTER_COPY) if no special treatment of duplicates is needed.
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# | ||
# MDEV-24715 Assertion !node->table->skip_alter_undo | ||
# | ||
CREATE TABLE t (a INT UNIQUE) ENGINE=InnoDB | ||
REPLACE SELECT 1 AS a, 2 AS b UNION SELECT 1 AS a, 3 AS c; | ||
SELECT * FROM t; | ||
a b | ||
1 3 | ||
DROP TABLE t; | ||
CREATE TEMPORARY TABLE t (a INT UNIQUE) ENGINE=InnoDB | ||
REPLACE SELECT 1 AS a, 2 AS b UNION SELECT 1 AS a, 3 AS c; | ||
SELECT * FROM t; | ||
a b | ||
1 3 | ||
DROP TEMPORARY TABLE t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--source include/have_innodb.inc | ||
|
||
--echo # | ||
--echo # MDEV-24715 Assertion !node->table->skip_alter_undo | ||
--echo # | ||
CREATE TABLE t (a INT UNIQUE) ENGINE=InnoDB | ||
REPLACE SELECT 1 AS a, 2 AS b UNION SELECT 1 AS a, 3 AS c; | ||
SELECT * FROM t; | ||
DROP TABLE t; | ||
|
||
CREATE TEMPORARY TABLE t (a INT UNIQUE) ENGINE=InnoDB | ||
REPLACE SELECT 1 AS a, 2 AS b UNION SELECT 1 AS a, 3 AS c; | ||
SELECT * FROM t; | ||
DROP TEMPORARY TABLE t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters