Details
-
Type:
Bug
-
Status: Confirmed
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 10.1, 10.0, 5.5
-
Fix Version/s: 10.1
-
Component/s: Storage Engine - Federated
-
Labels:
-
Environment:Windows 8.1 64 Bit
Description
Inserts into a Federated table with a auto increment column causes the insertion of 0's into the auto column and if you have sqlmode set to 'no autoincrement on zero' you get duplicate insert errors. Even if specifically pass a null value to the auto column this occurs.
I think the engine is setting defaults for any missing/invalid columns before passing to host and autoinc columns are not null so defualt is 0.
I have worked around it by removing the sqlmode (it was a legacy setting)
I have been using Mysql for some time and I am now trying MariaDB (I hade hoped this bug was fixed!)
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Stephen McGarry,
Could you please provide a complete test case and the output from the client?
I either cannot understand what exactly you mean, or cannot repeat it.
MariaDB [test]> DROP TABLE IF EXISTS federated_table, test_table; Query OK, 0 rows affected (0.00 sec) MariaDB [test]> CREATE TABLE test_table (pk INT NOT NULL AUTO_INCREMENT PRIMARY KEY, i INT) ENGINE=MyISAM; Query OK, 0 rows affected (0.19 sec) MariaDB [test]> MariaDB [test]> CREATE TABLE federated_table (pk INT NOT NULL AUTO_INCREMENT PRIMARY KEY, i INT) -> ENGINE=FEDERATED CONNECTION='mysql://root@localhost:3306/test/test_table'; Query OK, 0 rows affected (0.20 sec) MariaDB [test]> MariaDB [test]> insert into federated_table (i) values (1),(2); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0