Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.3, 10.4
-
None
Description
It is very well possible that the change in behavior between 10.2 and 10.3 was intentional and correct, but I would want to make sure.
UPDATE in the test case below has a value of a wrong type in WHERE clause.
On 10.2, it produces an error if the column has a key on it, and works without warnings or errors if there is no key.
On 10.3 and later, it works regardless of the key, without a warning or error.
However, if we attempt to INSERT such record into the table, it causes an error on all versions, regardless the key.
sql_mode doesn't seem to anyhow affect it.
Note: All comparison was made on non-debug builds, because the debug version of 10.2 aborts with an assertion failure, filed separately as MDEV-21635.
With key |
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (f POINT, KEY(f)); |
INSERT INTO t1 VALUES (ST_PointFromText('POINT(1 1)')),(ST_PointFromText('POINT(2 2)')); |
UPDATE t1 SET f = NULL WHERE f IN ( 'x', ST_PointFromText('POINT(1 1)') ); |
Without key |
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (f POINT); |
INSERT INTO t1 VALUES (ST_PointFromText('POINT(1 1)')),(ST_PointFromText('POINT(2 2)')); |
UPDATE t1 SET f = NULL WHERE f IN ( 'x', ST_PointFromText('POINT(1 1)') ); |
10.2 256994ef |
MariaDB [test]> DROP TABLE IF EXISTS t1; |
Query OK, 0 rows affected (0.137 sec) |
|
MariaDB [test]> CREATE TABLE t1 (f POINT, KEY(f)); |
Query OK, 0 rows affected (0.201 sec) |
|
MariaDB [test]> INSERT INTO t1 VALUES (ST_PointFromText('POINT(1 1)')),(ST_PointFromText('POINT(2 2)')); |
Query OK, 2 rows affected (0.037 sec) |
Records: 2 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> UPDATE t1 SET f = NULL WHERE f IN ( 'x', ST_PointFromText('POINT(1 1)') ); |
ERROR 1416 (22003): Cannot get geometry object from data you send to the GEOMETRY field |
|
MariaDB [test]> CREATE TABLE t1 (f POINT); |
Query OK, 0 rows affected (0.184 sec) |
|
MariaDB [test]> INSERT INTO t1 VALUES (ST_PointFromText('POINT(1 1)')),(ST_PointFromText('POINT(2 2)')); |
Query OK, 2 rows affected (0.037 sec) |
Records: 2 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> UPDATE t1 SET f = NULL WHERE f IN ( 'x', ST_PointFromText('POINT(1 1)') ); |
Query OK, 1 row affected (0.066 sec)
|
Rows matched: 1 Changed: 1 Warnings: 0 |
10.3 c8bd8d5c |
MariaDB [test]> DROP TABLE IF EXISTS t1; |
Query OK, 0 rows affected (0.135 sec) |
|
MariaDB [test]> CREATE TABLE t1 (f POINT, KEY(f)); |
Query OK, 0 rows affected (0.209 sec) |
|
MariaDB [test]> INSERT INTO t1 VALUES (ST_PointFromText('POINT(1 1)')),(ST_PointFromText('POINT(2 2)')); |
Query OK, 2 rows affected (0.038 sec) |
Records: 2 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> UPDATE t1 SET f = NULL WHERE f IN ( 'x', ST_PointFromText('POINT(1 1)') ); |
Query OK, 1 row affected (0.064 sec)
|
Rows matched: 1 Changed: 1 Warnings: 0 |
|
MariaDB [test]> DROP TABLE IF EXISTS t1; |
Query OK, 0 rows affected (0.138 sec) |
|
MariaDB [test]> CREATE TABLE t1 (f POINT); |
Query OK, 0 rows affected (0.192 sec) |
|
MariaDB [test]> INSERT INTO t1 VALUES (ST_PointFromText('POINT(1 1)')),(ST_PointFromText('POINT(2 2)')); |
Query OK, 2 rows affected (0.037 sec) |
Records: 2 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> UPDATE t1 SET f = NULL WHERE f IN ( 'x', ST_PointFromText('POINT(1 1)') ); |
Query OK, 1 row affected (0.065 sec)
|
Rows matched: 1 Changed: 1 Warnings: 0 |
Attachments
Issue Links
- relates to
-
MDEV-21635 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' or Assertion `! is_set()' failed upon UPDATE on a table with GIS column
- Closed