Skip to content

Commit 75dd024

Browse files
Daniele Sciasciasysprg
authored andcommitted
Remove error handling from wsrep_sync_wait()
Let the wsrep-lib error be set/overriden at the end of dispatch_command(). Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
1 parent d72c5d1 commit 75dd024

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

sql/wsrep_mysqld.cc

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,35 +1231,7 @@ bool wsrep_sync_wait (THD* thd, uint mask)
12311231
This allows autocommit SELECTs and a first SELECT after SET AUTOCOMMIT=0
12321232
TODO: modify to check if thd has locked any rows.
12331233
*/
1234-
if (thd->wsrep_cs().sync_wait(-1))
1235-
{
1236-
const char* msg;
1237-
int err;
1238-
1239-
/*
1240-
Possibly relevant error codes:
1241-
ER_CHECKREAD, ER_ERROR_ON_READ, ER_INVALID_DEFAULT, ER_EMPTY_QUERY,
1242-
ER_FUNCTION_NOT_DEFINED, ER_NOT_ALLOWED_COMMAND, ER_NOT_SUPPORTED_YET,
1243-
ER_FEATURE_DISABLED, ER_QUERY_INTERRUPTED
1244-
*/
1245-
1246-
switch (thd->wsrep_cs().current_error())
1247-
{
1248-
case wsrep::e_not_supported_error:
1249-
msg= "synchronous reads by wsrep backend. "
1250-
"Please unset wsrep_causal_reads variable.";
1251-
err= ER_NOT_SUPPORTED_YET;
1252-
break;
1253-
default:
1254-
msg= "Synchronous wait failed.";
1255-
err= ER_LOCK_WAIT_TIMEOUT; // NOTE: the above msg won't be displayed
1256-
// with ER_LOCK_WAIT_TIMEOUT
1257-
}
1258-
1259-
my_error(err, MYF(0), msg);
1260-
1261-
return true;
1262-
}
1234+
return thd->wsrep_cs().sync_wait(-1);
12631235
}
12641236

12651237
return false;

0 commit comments

Comments
 (0)