1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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.
This commit is contained in:
Rucha Deodhar
2022-04-26 12:58:48 +05:30
parent 551e7814ed
commit d45841b9be
3 changed files with 21 additions and 0 deletions

View File

@ -851,3 +851,12 @@ FLUSH STATUS;
SHOW STATUS LIKE 'Com%get_diagnostics';
GET DIAGNOSTICS @var1 = NUMBER;
SHOW STATUS LIKE 'Com%get_diagnostics';
--echo #
--echo # MDEV-26695: Number of an invalid row is not calculated for table value constructor
--echo #
CREATE TABLE t1 (a CHAR(1)) VALUES ('a'),('b'),('foo');
CREATE TABLE t2 (a char(1)) VALUES ('a'),('b') UNION VALUES ('foo');
DROP TABLE t1, t2;