summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_innodb.cc12
-rw-r--r--sql/handler.cc4
-rw-r--r--sql/share/errmsg.txt2
3 files changed, 7 insertions, 11 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 7eb6ef05d9c..4bd54805a95 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -526,17 +526,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) {
diff --git a/sql/handler.cc b/sql/handler.cc
index 2840037024b..e2941bfaecf 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -426,6 +426,7 @@ static 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);
@@ -1927,6 +1928,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 c688ba88b7b..2b43ba099e3 100644
--- a/sql/share/errmsg.txt
+++ b/sql/share/errmsg.txt
@@ -5649,3 +5649,5 @@ ER_XA_RBTIMEOUT XA106
eng "XA_RBTIMEOUT: Transaction branch was rolled back: took too long"
ER_XA_RBDEADLOCK XA102
eng "XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected"
+ER_TOO_MANY_CONCURRENT_TRXS
+ eng "Too many active concurrent transactions"