Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Duplicate
-
10.0.22
-
None
Description
Mariadb version: 10.0.22
Desc: When I execute the following SQL:
EXPLAIN
INSERT INTO `table_test`(
`id`,
`status`
)
SELECT
id,
status
FROM
table_test
WHERE
id NOT IN (SELECT id FROM table_testwhere id < 10)
the server return a error which states 'Column count doesn't match value count at row 1'.
but I can execute that SQL correctly without 'EXPLAIN'.
Attachments
Issue Links
- duplicates
-
MDEV-7215 EXPLAIN REPLACE produces an error: Column count doesn't match value count
-
- Closed
-
Thanks! It was fixed by Oleksandr Byelkin (commit 6eb86763619be92) (
MDEV-7215)MariaDB [test]> create table t1 (i int,j int) engine=innodb;
MariaDB [test]> insert into t1 values (1,1),(2,2),(5,5),(10,10),(7,7);
Query OK, 5 rows affected (0.00 sec)
Records: 5 Duplicates: 0 Warnings: 0
MariaDB [test]> EXPLAIN
-> INSERT INTO `t1`(`i`, `j`)
-> SELECT i, j FROM t1
-> WHERE i NOT IN (SELECT i FROM t1 where i< 10);
+------+--------------+-------+------+---------------+------+---------+------+------+------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+--------------+-------+------+---------------+------+---------+------+------+------------------------------+
| 1 | PRIMARY | t1 | ALL | NULL | NULL | NULL | NULL | 5 | Using where; Using temporary |
| 2 | MATERIALIZED | t1 | ALL | NULL | NULL | NULL | NULL | 5 | Using where |
+------+--------------+-------+------+---------------+------+---------+------+------+------------------------------+
2 rows in set (0.00 sec)
MariaDB [test]> select version();
+-----------------+
| version() |
+-----------------+
| 10.0.23-MariaDB |
+-----------------+
1 row in set (0.00 sec)