Created
December 28, 2019 23:11
-
-
Save metaskills/3752c66ed2b50599e4b66b7664f1d856 to your computer and use it in GitHub Desktop.
ActiveRecord Aurora Serverless - Foreign Key Check Debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXECUTE: SELECT 1 70195508832200 | |
EXECUTE: SELECT @@FOREIGN_KEY_CHECKS 70195508832200 | |
(26.8ms) SELECT @@FOREIGN_KEY_CHECKS | |
EXECUTE: SET FOREIGN_KEY_CHECKS = 0 70195508832200 | |
(26.3ms) SET FOREIGN_KEY_CHECKS = 0 | |
BEGIN AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
EXECUTE: DELETE FROM `topics` AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
Fixtures Load (27.2ms) DELETE FROM `topics` | |
EXECUTE: DELETE FROM `developers` AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
Fixtures Load (27.7ms) DELETE FROM `developers` | |
EXECUTE: DELETE FROM `computers_developers` AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
Fixtures Load (27.0ms) DELETE FROM `computers_developers` | |
EXECUTE: DELETE FROM `authors` AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
Fixtures Load (25.2ms) DELETE FROM `authors` | |
EXECUTE: DELETE FROM `author_addresses` AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
Fixtures Load (25.5ms) DELETE FROM `author_addresses` | |
EXECUTE: DELETE FROM `posts` AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
Fixtures Load (27.2ms) DELETE FROM `posts` | |
EXECUTE: INSERT INTO `topics` (`id`, `title`, `author_name`, `author_email_address`, `written_on`, `bonus_time`, `last_read`, `content`, `important`, `approved`, `replies_count`, `unique_replies_count`, `parent_id`, `parent_title`, `type`, `group`, `created_at`, `updated_at`) VALUES (1, 'The First Topic', 'David', 'david@loudthinking.com', '2003-07-16 14:28:11.223300', '14:28:00', '2004-04-15', '--- Have a nice day\n...\n', DEFAULT, FALSE, 1, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220146', '2019-12-26 15:09:43.220146'), (2, 'The Second Topic of the day', 'Mary', DEFAULT, '2004-07-15 14:28:00.009900', DEFAULT, DEFAULT, '--- Have a nice day\n...\n', DEFAULT, TRUE, 0, DEFAULT, 1, DEFAULT, 'Reply', DEFAULT, '2019-12-26 15:09:43.220146', '2019-12-26 15:09:43.220146'), (3, 'The Third Topic of the day', 'Carl', DEFAULT, '2012-08-12 20:24:22.129346', DEFAULT, DEFAULT, '--- I\'m a troll\n...\n', DEFAULT, TRUE, 1, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220146', '2019-12-26 15:09:43.220146'), (4, 'The Fourth Topic of the day', 'Carl', DEFAULT, '2006-07-15 14:28:00.009900', DEFAULT, DEFAULT, '--- Why not?\n...\n', DEFAULT, TRUE, DEFAULT, DEFAULT, 3, DEFAULT, 'Reply', DEFAULT, '2019-12-26 15:09:43.220146', '2019-12-26 15:09:43.220146'), (5, 'The Fifth Topic of the day', 'Jason', DEFAULT, '2013-07-13 11:11:00.009900', DEFAULT, DEFAULT, '--- Omakase\n...\n', DEFAULT, TRUE, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220146', '2019-12-26 15:09:43.220146') AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
Fixtures Load (28.7ms) INSERT INTO `topics` (`id`, `title`, `author_name`, `author_email_address`, `written_on`, `bonus_time`, `last_read`, `content`, `important`, `approved`, `replies_count`, `unique_replies_count`, `parent_id`, `parent_title`, `type`, `group`, `created_at`, `updated_at`) VALUES (1, 'The First Topic', 'David', 'david@loudthinking.com', '2003-07-16 14:28:11.223300', '14:28:00', '2004-04-15', '--- Have a nice day\n...\n', DEFAULT, FALSE, 1, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220146', '2019-12-26 15:09:43.220146'), (2, 'The Second Topic of the day', 'Mary', DEFAULT, '2004-07-15 14:28:00.009900', DEFAULT, DEFAULT, '--- Have a nice day\n...\n', DEFAULT, TRUE, 0, DEFAULT, 1, DEFAULT, 'Reply', DEFAULT, '2019-12-26 15:09:43.220146', '2019-12-26 15:09:43.220146'), (3, 'The Third Topic of the day', 'Carl', DEFAULT, '2012-08-12 20:24:22.129346', DEFAULT, DEFAULT, '--- I\'m a troll\n...\n', DEFAULT, TRUE, 1, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220146', '2019-12-26 15:09:43.220146'), (4, 'The Fourth Topic of the day', 'Carl', DEFAULT, '2006-07-15 14:28:00.009900', DEFAULT, DEFAULT, '--- Why not?\n...\n', DEFAULT, TRUE, DEFAULT, DEFAULT, 3, DEFAULT, 'Reply', DEFAULT, '2019-12-26 15:09:43.220146', '2019-12-26 15:09:43.220146'), (5, 'The Fifth Topic of the day', 'Jason', DEFAULT, '2013-07-13 11:11:00.009900', DEFAULT, DEFAULT, '--- Omakase\n...\n', DEFAULT, TRUE, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220146', '2019-12-26 15:09:43.220146') | |
EXECUTE: INSERT INTO `developers` (`id`, `name`, `first_name`, `salary`, `firm_id`, `mentor_id`, `created_at`, `updated_at`, `created_on`, `updated_on`) VALUES (1, 'David', DEFAULT, 80000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (2, 'Jamis', DEFAULT, 150000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (3, 'fixture_3', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (4, 'fixture_4', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (5, 'fixture_5', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (6, 'fixture_6', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (7, 'fixture_7', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (8, 'fixture_8', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (9, 'fixture_9', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (10, 'fixture_10', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (11, 'Jamis', DEFAULT, 9000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275') AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
Fixtures Load (27.4ms) INSERT INTO `developers` (`id`, `name`, `first_name`, `salary`, `firm_id`, `mentor_id`, `created_at`, `updated_at`, `created_on`, `updated_on`) VALUES (1, 'David', DEFAULT, 80000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (2, 'Jamis', DEFAULT, 150000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (3, 'fixture_3', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (4, 'fixture_4', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (5, 'fixture_5', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (6, 'fixture_6', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (7, 'fixture_7', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (8, 'fixture_8', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (9, 'fixture_9', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (10, 'fixture_10', DEFAULT, 100000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275'), (11, 'Jamis', DEFAULT, 9000, DEFAULT, DEFAULT, '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275', '2019-12-26 15:09:43.220275') | |
EXECUTE: INSERT INTO `computers_developers` (`computer_id`, `developer_id`) VALUES (536958526, 1) AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
Fixtures Load (25.8ms) INSERT INTO `computers_developers` (`computer_id`, `developer_id`) VALUES (536958526, 1) | |
EXECUTE: INSERT INTO `authors` (`id`, `name`, `author_address_id`, `author_address_extra_id`, `organization_id`, `owned_essay_id`) VALUES (1, 'David', 1, 2, 'No Such Agency', 'A Modest Proposal'), (2, 'Mary', 3, DEFAULT, DEFAULT, DEFAULT), (3, 'Bob', 4, DEFAULT, DEFAULT, DEFAULT) AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
Fixtures Load (30.5ms) INSERT INTO `authors` (`id`, `name`, `author_address_id`, `author_address_extra_id`, `organization_id`, `owned_essay_id`) VALUES (1, 'David', 1, 2, 'No Such Agency', 'A Modest Proposal'), (2, 'Mary', 3, DEFAULT, DEFAULT, DEFAULT), (3, 'Bob', 4, DEFAULT, DEFAULT, DEFAULT) | |
[MinitestRetry] retry 'test_callback_rollback_in_create_with_record_invalid_exception' count: 1, msg: ActiveRecord::InvalidForeignKey: Cannot add or update a child row: a foreign key constraint fails (`activerecord_unittest`.`authors`, CONSTRAINT `fk_rails_94423a17a3` FOREIGN KEY (`author_address_id`) REFERENCES `author_addresses` (`id`)) | |
ROLLBACK AXicEuEN5ZSHrKMjPizpveE6eyVxSEAFGWl7G4+IL5btSET5zr1f99MtCpfIr0d7nPp3gXTUyMmuo5lVen73a8FDDAZvwQPZL6AQCIs851e1jczSJEOQjPo/ZIAG2tveP2YSzlmhWGPZrmmBRZhjBi5KA8z3wZ1Ma4FJ8KcBtvNtu3nq/TV0cj0= 70195508832200 | |
EXECUTE: SET FOREIGN_KEY_CHECKS = 1 70195508832200 | |
(116.4ms) SET FOREIGN_KEY_CHECKS = 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment