Details
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.
Attachments
Issue Links
- is caused by
-
MDEV-10075 Provide index of error causing error in array INSERT
-
- Closed
-
- relates to
-
MDEV-26635 ROW_NUMBER is not 0 for errors not caused because of rows
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Description |
_Maybe it should go to documentation as a limitation_
{code:sql} values (1),(2),(3,'foo'); set @n= null, @m= null; get diagnostics condition 1 @n = error_index, @m = message_text; select @n, @m; {code} {code:sql|title=10.7 d552e092c9} +------+-------------------------------------------------------------------+ | @n | @m | +------+-------------------------------------------------------------------+ | 1 | The used table value constructor has a different number of values | +------+-------------------------------------------------------------------+ 1 row in set (0.000 sec) {code} Same for {code:sql} create or replace table t values (1),(2),(3,'foo'); {code} |
_Maybe it should go to documentation as a limitation_
{code:sql} CREATE OR REPLACE TABLE t (a CHAR(1)) VALUES ('a'),('b'),('foo'); {code} {code:sql|title=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 {code} Consequently, ERROR_INDEX from |
Description |
_Maybe it should go to documentation as a limitation_
{code:sql} CREATE OR REPLACE TABLE t (a CHAR(1)) VALUES ('a'),('b'),('foo'); {code} {code:sql|title=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 {code} Consequently, ERROR_INDEX from |
_Maybe it should go to documentation as a limitation_
{code:sql} CREATE OR REPLACE TABLE t (a CHAR(1)) VALUES ('a'),('b'),('foo'); {code} {code:sql|title=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 {code} Consequently, ERROR_INDEX from 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. |
Summary | Number of an invalid value row is not calculated for table value constructor | Number of an invalid row is not calculated for table value constructor |
Fix Version/s | 10.7 [ 24805 ] |
Description |
_Maybe it should go to documentation as a limitation_
{code:sql} CREATE OR REPLACE TABLE t (a CHAR(1)) VALUES ('a'),('b'),('foo'); {code} {code:sql|title=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 {code} Consequently, ERROR_INDEX from 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. |
_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._
{code:sql} CREATE OR REPLACE TABLE t (a CHAR(1)) VALUES ('a'),('b'),('foo'); {code} {code:sql|title=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 {code} Consequently, ERROR_INDEX from 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. |
Assignee | Rucha Deodhar [ rucha174 ] | Sergei Golubchik [ serg ] |
Assignee | Sergei Golubchik [ serg ] | Rucha Deodhar [ rucha174 ] |
Link |
This issue is caused by |
Link |
This issue relates to |
Link |
This issue relates to |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Status | Confirmed [ 10101 ] | Open [ 1 ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Assignee | Rucha Deodhar [ rucha174 ] | Sergei Golubchik [ serg ] |
Status | Confirmed [ 10101 ] | In Review [ 10002 ] |
Workflow | MariaDB v3 [ 125533 ] | MariaDB v4 [ 143803 ] |
Assignee | Sergei Golubchik [ serg ] | Rucha Deodhar [ rucha174 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Rucha Deodhar [ rucha174 ] | Sergei Golubchik [ serg ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Rucha Deodhar [ rucha174 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Rucha Deodhar [ rucha174 ] | Sergei Golubchik [ serg ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Rucha Deodhar [ rucha174 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.3.35 [ 27512 ] | |
Fix Version/s | 10.4.25 [ 27510 ] | |
Fix Version/s | 10.5.16 [ 27508 ] | |
Fix Version/s | 10.6.8 [ 27506 ] | |
Fix Version/s | 10.7.4 [ 27504 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
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