From d45841b9be6fe069383cc05405f747ae36d08362 Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Tue, 26 Apr 2022 12:58:48 +0530 Subject: MDEV-26695: Number of an invalid row is not calculated for table value constructor Analysis: counter does not increment while sending rows for table value constructor and so row_number assumes the default value (0 in this case). Fix: Increment the counter to avoid counter using default value. --- mysql-test/main/get_diagnostics.result | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mysql-test/main/get_diagnostics.result') diff --git a/mysql-test/main/get_diagnostics.result b/mysql-test/main/get_diagnostics.result index 6944103c805..41511d8a521 100644 --- a/mysql-test/main/get_diagnostics.result +++ b/mysql-test/main/get_diagnostics.result @@ -790,3 +790,13 @@ GET DIAGNOSTICS @var1 = NUMBER; SHOW STATUS LIKE 'Com%get_diagnostics'; Variable_name Value Com_get_diagnostics 1 +# +# MDEV-26695: Number of an invalid row is not calculated for table value constructor +# +CREATE TABLE t1 (a CHAR(1)) VALUES ('a'),('b'),('foo'); +Warnings: +Warning 1406 Data too long for column 'a' at row 3 +CREATE TABLE t2 (a char(1)) VALUES ('a'),('b') UNION VALUES ('foo'); +Warnings: +Warning 1406 Data too long for column 'a' at row 3 +DROP TABLE t1, t2; -- cgit v1.2.1