diff options
Diffstat (limited to 'mysql-test/main/get_diagnostics.result')
-rw-r--r-- | mysql-test/main/get_diagnostics.result | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/main/get_diagnostics.result b/mysql-test/main/get_diagnostics.result index 2e749fa21d7..d923390b429 100644 --- a/mysql-test/main/get_diagnostics.result +++ b/mysql-test/main/get_diagnostics.result @@ -1811,3 +1811,21 @@ SELECT @n; @n 4 DROP TABLE t; +# +# MDEV-26878: Query failing with syntax error sets ROW_NUMBER to +# non-zero +# +CREATE TABLE t1 (id1 INT); +INSERT INTO t1 VALUES XXX (1),(2); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'XXX (1),(2)' at line 1 +GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER; +SELECT @n; +@n +0 +INSERT INTO t1 VALUES (1), (ALL); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ALL)' at line 1 +GET DIAGNOSTICS CONDITION 1 @num=ROW_NUMBER; +SELECT @num; +@num +2 +DROP TABLE t1; |