-
Nischal Tonthanahal authored
PROBLEM ======== While upgrading a table using generated columns from 5.7 to 8.x, if the column expression is invalid, e.g due to deprecated functions such as password() or des_encrypt(), the error message mentions only the table name. It would be more useful to also mention the column name and the expression used. ANALYSIS ======== The error was being logged in migrate_table_to_dd() after returning from the call to fix_generated_columns_for_upgrade(). In order to determine the exact column and expression for which it failed, the error should be logged within fix_generated_columns_for_upgrade() instead. However, in order to avoid changing the existing error message, a new log error message should be created for this requirement. FIX ======== This patch adds a new error log message on the server which includes both the column (field_name) and the expression (expr_str) of the generated column for which the upgrade failed. To get this information, the LogErr() function call was added to the point at which the upgrade fails, i.e. within fix_generated_columns_for_upgrade(). Change-Id: Ib8d35e9f28d5735edca7baeb98103b8063266ec4
Nischal Tonthanahal authoredPROBLEM ======== While upgrading a table using generated columns from 5.7 to 8.x, if the column expression is invalid, e.g due to deprecated functions such as password() or des_encrypt(), the error message mentions only the table name. It would be more useful to also mention the column name and the expression used. ANALYSIS ======== The error was being logged in migrate_table_to_dd() after returning from the call to fix_generated_columns_for_upgrade(). In order to determine the exact column and expression for which it failed, the error should be logged within fix_generated_columns_for_upgrade() instead. However, in order to avoid changing the existing error message, a new log error message should be created for this requirement. FIX ======== This patch adds a new error log message on the server which includes both the column (field_name) and the expression (expr_str) of the generated column for which the upgrade failed. To get this information, the LogErr() function call was added to the point at which the upgrade fails, i.e. within fix_generated_columns_for_upgrade(). Change-Id: Ib8d35e9f28d5735edca7baeb98103b8063266ec4
Loading