Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.4, 11.8, 12.3, 13.0, 13.1
-
None
-
Can result in unexpected behaviour
Description
SET column on ENGINE=DuckDB silently drops any member at ordinal position 9 or higher
INSTALL SONAME 'ha_duckdb'; |
CREATE TABLE t1 (id INT PRIMARY KEY, s SET('a','b','c','d','e','f','g','h','i','k')) ENGINE=DuckDB; |
INSERT INTO t1 VALUES (1,'h'), (2,'i'),( 3, 'k'); |
SELECT id, s FROM t1 ORDER BY id; |
SELECT id, CAST(s AS CHAR) FROM t1 ORDER BY id; -- id=2 correctly shows 'i' |
SELECT id FROM t1 WHERE s = 'i'; -- correctly matches id=2 |
CLI Output
13.1.0-opt>INSTALL SONAME 'ha_duckdb'; |
Query OK, 0 rows affected (0.076 sec) |
|
|
13.1.0-opt>CREATE TABLE t1 (id INT PRIMARY KEY, s SET('a','b','c','d','e','f','g','h','i','k')) ENGINE=DuckDB; |
Query OK, 0 rows affected (0.008 sec) |
|
|
13.1.0-opt>
|
13.1.0-opt>SELECT id, s FROM t1 ORDER BY id; |
Empty set (0.003 sec) |
|
|
13.1.0-opt>INSERT INTO t1 VALUES (1,'h'), (2,'i'), (3, 'k'); |
Query OK, 3 rows affected (0.005 sec) |
Records: 3 Duplicates: 0 Warnings: 0
|
|
|
13.1.0-opt>SELECT id, s FROM t1 ORDER BY id; |
+----+------+ |
| id | s |
|
+----+------+ |
| 1 | h |
|
| 2 | |
|
| 3 | |
|
+----+------+ |
3 rows in set (0.002 sec) |
|
|
13.1.0-opt>
|
InnoDB works fine
13.1.0-opt>CREATE TABLE t2 (id INT PRIMARY KEY, s SET('a','b','c','d','e','f','g','h','i')); |
Query OK, 0 rows affected (0.010 sec) |
|
|
13.1.0-opt>INSERT INTO t2 VALUES (1,'i'); -- fine on InnoDB |
Query OK, 1 row affected (0.001 sec)
|
|
|
13.1.0-opt>SELECT id, s FROM t2; |
+----+------+ |
| id | s |
|
+----+------+ |
| 1 | i |
|
+----+------+ |
1 row in set (0.000 sec) |
|
|
13.1.0-opt>
|
13.1.0-opt>INSTALL SONAME 'ha_duckdb'; |
Query OK, 0 rows affected (0.072 sec) |
|
|
13.1.0-opt>ALTER TABLE t2 ENGINE=DuckDB; |
Query OK, 1 row affected (0.016 sec)
|
Records: 1 Duplicates: 0 Warnings: 0
|
|
|
13.1.0-opt>SELECT id, s FROM t2; |
+----+------+ |
| id | s |
|
+----+------+ |
| 1 | |
|
+----+------+ |
1 row in set (0.003 sec) |
|
|
13.1.0-opt>
|
Attachments
Issue Links
- blocks
-
MDEV-40015 Transition DuckDB engine to gamma
-
- Open
-