Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 10.4
-
Labels:None
Description
Note: Quite possibly related to MDEV-21658.
--source include/have_innodb.inc
|
|
--connect (con1,localhost,root,,test)
|
|
--connection default
|
CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB; |
ALTER TABLE t1 DROP COLUMN a; |
INSERT INTO t1 (b) VALUES (NULL); |
SET SQL_MODE= ''; |
|
--send
|
ALTER TABLE t1 ADD PRIMARY KEY (b) ; |
--connection con1
|
PREPARE stmt FROM "UPDATE t1 SET b = 1"; |
EXECUTE stmt; |
|
# Cleanup
|
--disconnect con1
|
--connection default
|
--reap
|
DROP TABLE t1; |
10.4 574354a6 |
mysqltest: At line 20: query 'reap' failed: 1138: Invalid use of NULL value
|
Reproducible on 10.4, 10.5.
Not reproducible on 10.3.
Not reproducible with MyISAM.
Not reproducible if UPDATE is executed without a prepared statement.
Not reproducible without ALTER which drops a column.
Not reproducible if ALTER .. DROP is run with ALGORITHM=COPY.
In all "not reproducible" variations above ALTER .. ADD PRIMARY KEY produces a warning Data truncated for column 'b' at row 1 which I think is expected.
Attachments
Issue Links
- duplicates
-
MDEV-21658 Error on online ADD PRIMARY KEY after instant DROP/reorder
-
- Closed
-