MySQL Forums :: Utilities :: Error while creating a shard


Advanced Search

Error while creating a shard
Posted by: Shantanu Bansal ()
Date: May 28, 2016 12:11AM

Whenever I execute:


mysqlfabric sharding add_table 1 employees.employees emp_no



I get the following error:




DatabaseError: Command (INSERT INTO shard_tables(shard_mapping_id, table_name, column_name) VALUES(%s, %s, %s), ('1', 'employees.employees', 'emp_no')) failed accessing (127.0.0.1:3306). 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`fabric`.`shard_tables`, CONSTRAINT `fk_shard_mapping_id` FOREIGN KEY (`shard_mapping_id`) REFERENCES `shard_maps` (`shard_mapping_id`)).

Options: ReplyQuote


Subject Views Written By Posted
Error while creating a shard 1050 Shantanu Bansal 05/28/2016 12:11AM
Re: Error while creating a shard 403 Rick James 05/31/2016 09:51PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.