diff options
author | unknown <joerg@trift2.> | 2007-10-29 12:11:05 +0100 |
---|---|---|
committer | unknown <joerg@trift2.> | 2007-10-29 12:11:05 +0100 |
commit | b63ae73d505bf925a5b8cad5da043a10672fd8a8 (patch) | |
tree | 9f34ecf91ba5fb62a3896fe3002b3c5a6e8a8e14 | |
parent | 93265192ce0b8bb1576d4fb6b20897e61c6dda2d (diff) | |
parent | ddeec5ab8dcee15ccedf693b508d7ee9e7e857a9 (diff) | |
download | mariadb-git-b63ae73d505bf925a5b8cad5da043a10672fd8a8.tar.gz |
Merge trift2.:/MySQL/M50/clone-5.0
into trift2.:/MySQL/M50/push-5.0
mysql-test/r/derived.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/t/derived.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
mysql-test/r/type_date.result:
Null-merge 5.0.50 build clone:
The test for bug#31221 is already in the receiving tree.
mysql-test/t/type_date.test:
Null-merge 5.0.50 build clone:
The test for bug#31221 is already in the receiving tree.
-rw-r--r-- | sql/sql_cache.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 9a29350880e..8c868971911 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1032,12 +1032,14 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) Query_cache_block_table *block_table, *block_table_end; ulong tot_length; Query_cache_query_flags flags; +#ifndef __WIN__ const uint spin_treshold= 50000; const double lock_time_treshold= 0.1; /* Time in seconds */ uint spin_count= 0; int lock_status= 0; ulong new_time= 0; ulong stop_time= 0; +#endif DBUG_ENTER("Query_cache::send_result_to_client"); @@ -1085,6 +1087,9 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) } } +#ifdef __WIN__ + STRUCT_LOCK(&structure_guard_mutex); +#else stop_time= my_clock()+(ulong)lock_time_treshold*CLOCKS_PER_SEC; while ((lock_status= pthread_mutex_trylock(&structure_guard_mutex)) == EBUSY && spin_count < spin_treshold @@ -1107,6 +1112,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) thd->lex->safe_to_cache_query= FALSE; goto err; } +#endif if (query_cache_size == 0 || flush_in_progress) { |