diff options
Diffstat (limited to 'mysql-test/main/get_diagnostics.result')
| -rw-r--r-- | mysql-test/main/get_diagnostics.result | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/get_diagnostics.result b/mysql-test/main/get_diagnostics.result index 2e749fa21d7..2606f6a90e0 100644 --- a/mysql-test/main/get_diagnostics.result +++ b/mysql-test/main/get_diagnostics.result @@ -1811,3 +1811,24 @@ SELECT @n; @n 4 DROP TABLE t; +# +# MDEV-26698: Incorrect row number upon INSERT .. SELECT from the same +# table: rows are counted twice +# +CREATE OR REPLACE TABLE t (a TINYINT); +INSERT INTO t VALUES (1),(100); +INSERT INTO t SELECT a*2 FROM t; +Warnings: +Warning 1264 Out of range value for column 'a' at row 2 +GET DIAGNOSTICS CONDITION 1 @err1 = ROW_NUMBER; +SELECT @err1; +@err1 +2 +GET DIAGNOSTICS CONDITION 2 @err2 = ROW_NUMBER; +Warnings: +Warning 1264 Out of range value for column 'a' at row 2 +Error 1758 Invalid condition number +SELECT @err2; +@err2 +NULL +DROP TABLE t; |
