diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-02-03 14:34:31 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-02-03 14:34:31 +0200 |
commit | b0d9b338b78b408532ad63d379ae1f7dfe05e28f (patch) | |
tree | 39c0c2134e2fd406697e1bdc5586780483b351cc /sql/item_strfunc.cc | |
parent | 287c1db7867502348dcbc9ff7ccaae3d289cdbb1 (diff) | |
parent | fd6fff459738940d5dc134081a15de2a2af2278b (diff) | |
download | mariadb-git-bb-10.5-upto.tar.gz |
Merge branch 'codership-10.5-galera_sync_wait_upto' into 10.5bb-10.5-upto
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 82259cd6924..bee56a607f7 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -5297,6 +5297,7 @@ longlong Item_func_wsrep_sync_wait_upto::val_int() uint timeout; rpl_gtid *gtid_list; uint32 count; + int wait_gtid_ret= 0; int ret= 1; if (args[0]->null_value) @@ -5323,11 +5324,17 @@ longlong Item_func_wsrep_sync_wait_upto::val_int() if (wsrep_check_gtid_seqno(gtid_list[0].domain_id, gtid_list[0].server_id, gtid_list[0].seq_no)) { - if (wsrep_gtid_server.wait_gtid_upto(gtid_list[0].seq_no, timeout)) + wait_gtid_ret= wsrep_gtid_server.wait_gtid_upto(gtid_list[0].seq_no, timeout); + if ((wait_gtid_ret == ETIMEDOUT) || (wait_gtid_ret == ETIME)) { my_error(ER_LOCK_WAIT_TIMEOUT, MYF(0), func_name()); ret= 0; } + else if (wait_gtid_ret == ENOMEM) + { + my_error(ER_OUTOFMEMORY, MYF(0), func_name()); + ret= 0; + } } } else |