ERROR 1064 (HY000): childtable Multi Insert not provided

Source: Internet
Author: User
mysql> INSERT INTO User_info (user_id) VALUES (1), (2), (3);
ERROR 1064 (HY000): childtable Multi Insert not provided


The reason for the error is that multiple records are not supported in Mycat in a single table.


Split into two SQL statements to insert.
mysql> INSERT INTO User_info (user_id) VALUES (2), insert into User_info (user_id) values (3);
Query OK, 1 row affected (0.22 sec)
Query OK, 1 row affected (0.23 sec)




Similar errors occur when you insert data into a child table in an ER table in Mycat by using mysqldump exported SQL.
Because the default Mysqldump exported statement is to insert more than one record at a time.


If you want mysqldump exported SQL foot instincts to be inserted directly into the database via Mycat, the following parameters are recommended:
Mysqldump-uroot-p-h127.0.0.1-p3316 -c-t--skip-add-drop-table--extended-insert=falseSakila Actor>actor_extend_insert_false.sql


The exported SQL is a single insert and contains the full field name, which we can use to insert data directly into the mycat of the ER table in the form without special handling.
INSERT into ' actor ' (' actor_id ', ' first_name ', ' last_name ', ' last_update ') VALUES (186, ' JULIA ', ' ZELLWEGER ', ' 2006-02-15 12:34:33 ');


-C,--complete-insertSpecify column names when inserting
-T,--no-create-infoInformation to create tables is not exported. Don ' t write table creation info.
--add-drop-tableDo not add the Delete table information
Add a DROP TABLE before each create.
(Defaults to On; "--skip-add-drop-table to disable.)
-E,--extended-insertUse Multiple-row inserts syntax that include several VALUES lists. (Defaults to On; "--skip-extended-insert to disable.)







Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.