From fce4ab0ab405e112035bda98176c5834200d26df Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 1 Jun 2015 16:01:23 +0200 Subject: generalize ER_TABLE_NEEDS_UPGRADE to work for views too --- sql/handler.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sql/handler.cc') diff --git a/sql/handler.cc b/sql/handler.cc index 3ca9ec335cd..8d69a93c2c1 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -359,7 +359,7 @@ int ha_init_errors(void) SETMSG(HA_ERR_NO_CONNECTION, "Could not connect to storage engine"); SETMSG(HA_ERR_TABLE_DEF_CHANGED, ER_DEFAULT(ER_TABLE_DEF_CHANGED)); SETMSG(HA_ERR_FOREIGN_DUPLICATE_KEY, "FK constraint would lead to duplicate key"); - SETMSG(HA_ERR_TABLE_NEEDS_UPGRADE, ER_DEFAULT(ER_TABLE_NEEDS_UPGRADE)); + SETMSG(HA_ERR_TABLE_NEEDS_UPGRADE, "Table upgrade required. Please do \"REPAIR TABLE %`\" or dump/reload to fix it"); SETMSG(HA_ERR_TABLE_READONLY, ER_DEFAULT(ER_OPEN_AS_READONLY)); SETMSG(HA_ERR_AUTOINC_READ_FAILED, ER_DEFAULT(ER_AUTOINC_READ_FAILED)); SETMSG(HA_ERR_AUTOINC_ERANGE, ER_DEFAULT(ER_WARN_DATA_OUT_OF_RANGE)); @@ -3537,7 +3537,8 @@ void handler::print_error(int error, myf errflag) DBUG_VOID_RETURN; } case HA_ERR_TABLE_NEEDS_UPGRADE: - textno=ER_TABLE_NEEDS_UPGRADE; + my_error(ER_TABLE_NEEDS_UPGRADE, errflag, + "TABLE", table_share->table_name.str); break; case HA_ERR_NO_PARTITION_FOUND: textno=ER_WRONG_PARTITION_NAME; -- cgit v1.2.1