-
Nisha Gopalakrishnan authored
Analysis -------- When an ALTER TABLE operation is performed with an invalid foreign key constraint, the error reported is ER_CANT_CREATE_TABLE(Cannot create the table). The ALTER TABLE operation is performed on a copy of the original table, the original table is later deleted and the copy is renamed to the original table name. The error reported contains the temporary table name which is of the format 'database_ name.#sql-[0-9_a-f-]*'. Fix: --- print_error() which maps the handler error to a SQL error has been used to report the error. This has helped in reporting more specific errors instead of the previously reported generic error ER_CANT_CREATE_TABLE (Cannot create the table) in most of the error scenarios. For the case of invalid foreign key constraint, the error that will be reported is: ER_CANNOT_ADD_FOREIGN- Cannot add foreign key constraint.
Nisha Gopalakrishnan authoredAnalysis -------- When an ALTER TABLE operation is performed with an invalid foreign key constraint, the error reported is ER_CANT_CREATE_TABLE(Cannot create the table). The ALTER TABLE operation is performed on a copy of the original table, the original table is later deleted and the copy is renamed to the original table name. The error reported contains the temporary table name which is of the format 'database_ name.#sql-[0-9_a-f-]*'. Fix: --- print_error() which maps the handler error to a SQL error has been used to report the error. This has helped in reporting more specific errors instead of the previously reported generic error ER_CANT_CREATE_TABLE (Cannot create the table) in most of the error scenarios. For the case of invalid foreign key constraint, the error that will be reported is: ER_CANNOT_ADD_FOREIGN- Cannot add foreign key constraint.
Loading