Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6.16, 10.4(EOL), 10.5, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL)
Description
10.5.23 |
MariaDB [testdb]> CREATE TABLE data ENGINE=SPIDER COMMENT='host "node1", user "monitor", password "password", port "3306"';
|
Query OK, 0 rows affected (0.014 sec)
|
|
MariaDB [testdb]> show create table data\G
|
*************************** 1. row ***************************
|
Table: data
|
Create Table: CREATE TABLE `data` (
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`code` varchar(10) DEFAULT NULL,
|
PRIMARY KEY (`id`)
|
) ENGINE=SPIDER DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='host "node1", user "monitor", password "password", port "3306"'
|
1 row in set (0.002 sec)
|
10.6.16 |
MariaDB [testdb]> CREATE TABLE data ENGINE=SPIDER COMMENT='host "node1", user "monitor", password "password", port "3306"';
|
ERROR 12500 (HY000): unknown
|
Behaviour also exists in 10.11 using SERVERs;
10.11.6 |
MariaDB [testdb]> select * from mysql.servers;
|
+-------------+-------+--------+----------+----------+------+--------+---------+-------+
|
| Server_name | Host | Db | Username | Password | Port | Socket | Wrapper | Owner |
|
+-------------+-------+--------+----------+----------+------+--------+---------+-------+
|
| node1 | node1 | testdb | monitor | password | 3306 | | mariadb | |
|
+-------------+-------+--------+----------+----------+------+--------+---------+-------+
|
1 row in set (0.001 sec)
|
|
MariaDB [testdb]> CREATE TABLE remote_node1 ENGINE=SPIDER REMOTE_SERVER="node1" REMOTE_TABLE="data"
|
-> ;
|
ERROR 12500 (HY000): unknown
|
Hi holyfoot, ptal thanks:
bb-10.4-mdev-33008 2be37ada436c403acc70f77ca2f5738a44846dd7
MDEV-33008 Fix spider table discovery
A new column was introduced to the show index output in 10.6 in
f691d9865becfd242ba44cc632034433336af1e7
Thus we update the check of the number of columns to be at least 13,
rather than exactly 13.
Also backport an err number and format from 10.5 for better error
messages when the column number is wrong.
Note that this has to be applied from 10.4 up because a 10.4 spider node could connect to a 10.6+ data node.