fec844aca88e1c6b9c36bb0b811e92d9d023ffb9
diff --git a/include/my_base.h b/include/my_base.h
index 1317639..af05336 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -499,7 +499,18 @@ enum ha_base_keytype {
 #define HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE 191 /* Too many words in a phrase */
 #define HA_ERR_DECRYPTION_FAILED  192 /* Table encrypted but
 						decypt failed */
-#define HA_ERR_LAST               192    /* Copy of last error nr */
+#define HA_ERR_FK_DEPTH_EXCEEDED  193 /* FK cascade depth exceeded */
+#define HA_MISSING_CREATE_OPTION       194  /* Option Missing during Create */
+#define HA_ERR_SE_OUT_OF_MEMORY        195  /* Out of memory in storage engine */
+#define HA_ERR_TABLE_CORRUPT           196  /* Table/Clustered index is corrupted. */
+#define HA_ERR_QUERY_INTERRUPTED       197  /* The query was interrupted */
+#define HA_ERR_TABLESPACE_MISSING      198  /* Missing Tablespace */
+#define HA_ERR_TABLESPACE_IS_NOT_EMPTY 199  /* Tablespace is not empty */
+#define HA_ERR_WRONG_FILE_NAME         200  /* Invalid Filename */
+#define HA_ERR_NOT_ALLOWED_COMMAND     201  /* Operation is not allowed */
+#define HA_ERR_COMPUTE_FAILED          202  /* Compute generated column value failed */
+#define HA_ERR_INNODB_READ_ONLY        203  /* InnoDB is in read only mode */
+#define HA_ERR_LAST                    203  /* Copy of last error nr * */
 
 /* Number of different errors */
 #define HA_ERR_ERRORS            (HA_ERR_LAST - HA_ERR_FIRST + 1)
diff --git a/include/my_handler_errors.h b/include/my_handler_errors.h
index 5af6a35..3d05fb7 100644
--- a/include/my_handler_errors.h
+++ b/include/my_handler_errors.h
@@ -95,7 +95,18 @@ static const char *handler_error_messages[]=
   "Disk full",
   "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this",
   "Too many words in a FTS phrase or proximity search",
-  "Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match."
+  "Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.",
+  "Foreign key cascade delete/update exceeds max depth",
+  "Table storage engine found required create option missing",
+  "Out of memory in storage engine",
+  "Operation cannot be performed. The table is missing, corrupt or contains bad data.",
+  "Query execution was interrupted",
+  "Tablespace is missing for table",
+  "Tablespace is not empty",
+  "Incorrect File Name",
+  "Table storage engine found required create option missing",
+  "Compute virtual column value failed",
+  "InnoDB is in read only mode"
 };
 
 #endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
diff --git a/sql/handler.cc b/sql/handler.cc
index 3fbd1b3..6e9d8dc 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,    "Table upgrade required. Please do \"REPAIR TABLE %`\" or dump/reload to fix it");
+  SETMSG(HA_ERR_TABLE_NEEDS_UPGRADE,    ER_DEFAULT(ER_TABLE_NEEDS_UPGRADE));
   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));
@@ -370,6 +370,17 @@ int ha_init_errors(void)
   SETMSG(HA_ERR_TABLE_IN_FK_CHECK,	ER_DEFAULT(ER_TABLE_IN_FK_CHECK));
   SETMSG(HA_ERR_DISK_FULL,              ER_DEFAULT(ER_DISK_FULL));
   SETMSG(HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE,  "Too many words in a FTS phrase or proximity search");
+  SETMSG(HA_ERR_FK_DEPTH_EXCEEDED,      ER_DEFAULT(ER_FK_DEPTH_EXCEEDED));
+  SETMSG(HA_MISSING_CREATE_OPTION,      ER_DEFAULT(ER_MISSING_HA_CREATE_OPTION));
+  SETMSG(HA_ERR_SE_OUT_OF_MEMORY,       ER_DEFAULT(ER_ENGINE_OUT_OF_MEMORY));
+  SETMSG(HA_ERR_TABLE_CORRUPT,          ER_DEFAULT(ER_TABLE_CORRUPT));
+  SETMSG(HA_ERR_QUERY_INTERRUPTED,      ER_DEFAULT(ER_QUERY_INTERRUPTED));
+  SETMSG(HA_ERR_TABLESPACE_MISSING,     ER_DEFAULT(ER_TABLESPACE_MISSING));
+  SETMSG(HA_ERR_TABLESPACE_IS_NOT_EMPTY,ER_DEFAULT(ER_TABLESPACE_IS_NOT_EMPTY));
+  SETMSG(HA_ERR_WRONG_FILE_NAME,        ER_DEFAULT(ER_WRONG_FILE_NAME));
+  SETMSG(HA_ERR_NOT_ALLOWED_COMMAND,    ER_DEFAULT(ER_NOT_ALLOWED_COMMAND));
+  SETMSG(HA_ERR_COMPUTE_FAILED,         "Compute virtual column value failed");
+  SETMSG(HA_ERR_INNODB_READ_ONLY,       ER_DEFAULT(ER_INNODB_READ_ONLY));
 
   /* Register the error messages for use with my_error(). */
   return my_error_register(get_handler_errmsgs, HA_ERR_FIRST, HA_ERR_LAST);
@@ -3525,9 +3536,10 @@ 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;
+    DBUG_VOID_RETURN;
   case HA_ERR_NO_PARTITION_FOUND:
     textno=ER_WRONG_PARTITION_NAME;
     break;
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index 8dfa519..7c3c4ab 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -7214,3 +7214,21 @@ ER_CALCULATING_DEFAULT_VALUE
         eng "Got an error when calculating default value for %`s"
 ER_EXPRESSION_REFERS_TO_UNINIT_FIELD 01000
         eng "Expression for field %`-.64s is refering to uninitialized field %`s"
+ER_BUFPOOL_RESIZE_INPROGRESS
+        eng "Another buffer pool resize is already in progress."
+ER_CANNOT_DISCARD_TEMPORARY_TABLE
+        eng "Cannot DISCARD/IMPORT tablespace associated with temporary table"
+ER_FK_DEPTH_EXCEEDED
+        eng "Foreign key cascade delete/update exceeds max depth of %d."
+ER_INNODB_FORCED_RECOVERY
+        eng "Operation not allowed when innodb_forced_recovery > 0."
+ER_TABLE_REFERENCED
+        eng "Cannot complete the operation because table is referenced by another connection."
+ER_TABLESPACE_IS_NOT_EMPTY
+        eng "Tablespace `%-.192s` is not empty."
+ER_MISSING_HA_CREATE_OPTION
+        eng "Table storage engine '%-.64s' found required create option missing"
+ER_ENGINE_OUT_OF_MEMORY
+        eng "Out of memory in storage engine '%-.64s'."
+ER_WRONG_FILE_NAME
+        eng "Incorrect File Name '%s'."
