diff options
-rw-r--r-- | include/my_base.h | 3 | ||||
-rw-r--r-- | mysys/my_handler_errors.h | 3 | ||||
-rw-r--r-- | sql/handler.cc | 4 | ||||
-rw-r--r-- | sql/share/errmsg.txt | 2 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 12 |
5 files changed, 11 insertions, 13 deletions
diff --git a/include/my_base.h b/include/my_base.h index 22f518b0f9a..a01b2ec9b82 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -441,7 +441,8 @@ enum ha_base_keytype { #define HA_ERR_INITIALIZATION 174 /* Error during initialization */ #define HA_ERR_FILE_TOO_SHORT 175 /* File too short */ #define HA_ERR_WRONG_CRC 176 /* Wrong CRC on page */ -#define HA_ERR_LAST 176 /* Copy of last error nr */ +#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177 /*Too many active concurrent transactions */ +#define HA_ERR_LAST 177 /* Copy of last error nr */ /* Number of different errors */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) diff --git a/mysys/my_handler_errors.h b/mysys/my_handler_errors.h index e360af8c57e..c239cabb168 100644 --- a/mysys/my_handler_errors.h +++ b/mysys/my_handler_errors.h @@ -62,6 +62,7 @@ static const char *handler_error_messages[]= "The event could not be processed no other hanlder error happened", "Got a fatal error during initialzaction of handler", "File to short; Expected more data in file", - "Read page with wrong checksum" + "Read page with wrong checksum", + "Too many active concurrent transactions" }; diff --git a/sql/handler.cc b/sql/handler.cc index e65ceba4181..d9e8f5614f2 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -342,6 +342,7 @@ int ha_init_errors(void) SETMSG(HA_ERR_TABLE_READONLY, ER(ER_OPEN_AS_READONLY)); SETMSG(HA_ERR_AUTOINC_READ_FAILED, ER(ER_AUTOINC_READ_FAILED)); SETMSG(HA_ERR_AUTOINC_ERANGE, ER(ER_WARN_DATA_OUT_OF_RANGE)); + SETMSG(HA_ERR_TOO_MANY_CONCURRENT_TRXS, ER(ER_TOO_MANY_CONCURRENT_TRXS)); /* Register the error messages for use with my_error(). */ return my_error_register(errmsgs, HA_ERR_FIRST, HA_ERR_LAST); @@ -2747,6 +2748,9 @@ void handler::print_error(int error, myf errflag) case HA_ERR_AUTOINC_ERANGE: textno= ER_WARN_DATA_OUT_OF_RANGE; break; + case HA_ERR_TOO_MANY_CONCURRENT_TRXS: + textno= ER_TOO_MANY_CONCURRENT_TRXS; + break; default: { /* The error was "unknown" to this function. diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 42bca02984d..8cf2fa2463d 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -6201,3 +6201,5 @@ ER_TEMPORARY_NAME ER_RENAMED_NAME eng "Renamed" swe "Namnändrad" +ER_TOO_MANY_CONCURRENT_TRXS + eng "Too many active concurrent transactions" diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 2f29ca62000..a39857c0f05 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -734,17 +734,7 @@ convert_error_code_to_mysql( return(HA_ERR_LOCK_TABLE_FULL); } else if (error == DB_TOO_MANY_CONCURRENT_TRXS) { - /* Once MySQL add the appropriate code to errmsg.txt then - we can get rid of this #ifdef. NOTE: The code checked by - the #ifdef is the suggested name for the error condition - and the actual error code name could very well be different. - This will require some monitoring, ie. the status - of this request on our part.*/ -#ifdef ER_TOO_MANY_CONCURRENT_TRXS - return(ER_TOO_MANY_CONCURRENT_TRXS); -#else - return(HA_ERR_RECORD_FILE_FULL); -#endif + return(HA_ERR_TOO_MANY_CONCURRENT_TRXS); } else if (error == DB_UNSUPPORTED) { |