mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-26841: ROW_NUMBER is not set and differs from the message upon
ER_WRONG_VALUE_COUNT_ON_ROW for the 1st row Analysis: Current row for warning does not increment for prepare phase Fix: Increment current row for warning if number of fields in the table and row values dont match and number of values in rows is greater than number of fields
This commit is contained in:
committed by
Sergei Golubchik
parent
635be990ca
commit
797bd73cfa
@ -1632,3 +1632,24 @@ GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER, @m= MESSAGE_TEXT;
|
||||
SELECT @n, @m;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26841: ROW_NUMBER is not set and differs from the message upon
|
||||
--echo # ER_WRONG_VALUE_COUNT_ON_ROW for the 1st row
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
|
||||
--error ER_WRONG_VALUE_COUNT_ON_ROW
|
||||
INSERT INTO t1 VALUES (1,2),(3);
|
||||
|
||||
GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER, @m= MESSAGE_TEXT;
|
||||
SELECT @n, @m;
|
||||
|
||||
--error ER_WRONG_VALUE_COUNT_ON_ROW
|
||||
INSERT INTO t1(a) VALUES(1,2), (3);
|
||||
|
||||
GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER, @m= MESSAGE_TEXT;
|
||||
SELECT @n, @m;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user