diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-06-01 16:01:23 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-06-01 16:01:23 +0200 |
commit | fce4ab0ab405e112035bda98176c5834200d26df (patch) | |
tree | 97ccac45b59d1523c22408427f701353284d66ec /sql/handler.cc | |
parent | 5091a4ba755250ed8e35f4f5a39a118d476cd8f1 (diff) | |
download | mariadb-git-fce4ab0ab405e112035bda98176c5834200d26df.tar.gz |
generalize ER_TABLE_NEEDS_UPGRADE to work for views too
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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; |