[MDEV-26695] Number of an invalid row is not calculated for table value constructor Created: 2021-09-27  Updated: 2022-04-26  Resolved: 2022-04-26

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7
Fix Version/s: 10.3.35, 10.4.25, 10.5.16, 10.6.8, 10.7.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Rucha Deodhar
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-10075 Provide index of error causing error ... Closed
Relates
relates to MDEV-26635 ROW_NUMBER is not 0 for errors not ca... Closed

 Description   

Maybe it should just go to documentation as a limitation. It is unfortunate however if it keeps returning "1" rather than some non-natural number.

CREATE OR REPLACE TABLE t (a CHAR(1)) VALUES ('a'),('b'),('foo');

10.4 69bd2c88

CREATE OR REPLACE TABLE t (a CHAR(1)) VALUES ('a'),('b'),('foo');
Warnings:
Warning	1406	Data too long for column 'a' at row 1

Consequently, ERROR_INDEX from MDEV-10075 is not calculated for table value constructors, either.

I"ve set affected versions to 10.3+ because that's where table value constructors were introduced, and surely the number is not calculated in 10.3 either; but the test case above is only applicable to 10.4+, 10.3 doesn't seem to allow to create table from a table value constructor.



 Comments   
Comment by Rucha Deodhar [ 2021-10-19 ]

Patch for 10.4: https://github.com/MariaDB/server/commit/d45841b9be6fe069383cc05405f747ae36d08362

Patch for 10.7 (added test for row_number and create...select) : https://github.com/MariaDB/server/commit/ee5966c75404fd4e35dde52f1ebb78e3e20ebf77

Comment by Rucha Deodhar [ 2022-04-26 ]

Reassigned to myself because discussed done on slack about adding one more test and then pushing.

Generated at Thu Feb 08 09:47:15 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.