1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge branch '10.0-galera' into bb-10.1-serg

This commit is contained in:
Nirbhay Choubey
2016-02-24 01:21:40 -05:00
71 changed files with 1574 additions and 127 deletions

View File

@ -1933,6 +1933,13 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
(int)flags.autocommit));
memcpy((uchar *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)),
(uchar*) &flags, QUERY_CACHE_FLAGS_SIZE);
#ifdef WITH_WSREP
bool once_more;
once_more= true;
lookup:
#endif /* WITH_WSREP */
query_block = (Query_cache_block *) my_hash_search(&queries, (uchar*) sql,
tot_length);
/* Quick abort on unlocked data */
@ -1945,6 +1952,19 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
}
DBUG_PRINT("qcache", ("Query in query hash 0x%lx", (ulong)query_block));
#ifdef WITH_WSREP
if (once_more && WSREP_CLIENT(thd) && wsrep_must_sync_wait(thd))
{
unlock();
if (wsrep_sync_wait(thd))
goto err;
if (try_lock(thd, Query_cache::TIMEOUT))
goto err;
once_more= false;
goto lookup;
}
#endif /* WITH_WSREP */
/* Now lock and test that nothing changed while blocks was unlocked */
BLOCK_LOCK_RD(query_block);