summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorJimmy Yang <jimmy.yang@oracle.com>2011-08-16 18:07:59 -0700
committerJimmy Yang <jimmy.yang@oracle.com>2011-08-16 18:07:59 -0700
commit177d8b0c125b841c0650d27d735e3b87509dc286 (patch)
treef35296e1cd9a625708ab194372e0944f1309f78c /sql
parent049225eb575ff88477a1d40bbe5a279c990accc6 (diff)
downloadmariadb-git-177d8b0c125b841c0650d27d735e3b87509dc286.tar.gz
Fix bug #11830883, SUPPORT "CORRUPTED" BIT FOR INNODB TABLES AND INDEXES.
Also addressed issues in bug #11745133, where we could mark a table corrupted instead of crashing the server when found a corrupted buffer/page if the table created with innodb_file_per_table on.
Diffstat (limited to 'sql')
-rw-r--r--sql/handler.cc4
-rw-r--r--sql/share/errmsg-utf8.txt2
2 files changed, 6 insertions, 0 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 580677242bd..db1eea6484b 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -358,6 +358,7 @@ int ha_init_errors(void)
SETMSG(HA_ERR_AUTOINC_ERANGE, ER_DEFAULT(ER_WARN_DATA_OUT_OF_RANGE));
SETMSG(HA_ERR_TOO_MANY_CONCURRENT_TRXS, ER_DEFAULT(ER_TOO_MANY_CONCURRENT_TRXS));
SETMSG(HA_ERR_INDEX_COL_TOO_LONG, ER_DEFAULT(ER_INDEX_COLUMN_TOO_LONG));
+ SETMSG(HA_ERR_INDEX_CORRUPT, ER_DEFAULT(ER_INDEX_CORRUPT));
/* Register the error messages for use with my_error(). */
return my_error_register(get_handler_errmsgs, HA_ERR_FIRST, HA_ERR_LAST);
@@ -2865,6 +2866,9 @@ void handler::print_error(int error, myf errflag)
case HA_ERR_INDEX_COL_TOO_LONG:
textno= ER_INDEX_COLUMN_TOO_LONG;
break;
+ case HA_ERR_INDEX_CORRUPT:
+ textno= ER_INDEX_CORRUPT;
+ break;
default:
{
/* The error was "unknown" to this function.
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index b8f46f090ab..519d693f96d 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -6415,3 +6415,5 @@ ER_ERROR_IN_TRIGGER_BODY
ER_ERROR_IN_UNKNOWN_TRIGGER_BODY
eng "Unknown trigger has an error in its body: '%-.256s'"
+ER_INDEX_CORRUPT
+ eng "Index %s is corrupted"