1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fix insert delated + query cache.

Fix pthread_mutex_trylock on HPUX (needed for query cache).
This commit is contained in:
monty@hundin.mysql.fi
2001-12-20 06:14:11 +02:00
parent b1291364cb
commit 0eb46e4256
7 changed files with 80 additions and 9 deletions

View File

@ -674,9 +674,9 @@ manager_term()
ident=$1
shift
if [ $USE_MANAGER = 0 ] ; then
$MYSQLADMIN --no-defaults -uroot --socket=$MYSQL_TMP_DIR/$ident.sock -O \
connect_timeout=5 -O shutdown_timeout=20 shutdown >/dev/null 2>&1
return
$MYSQLADMIN --no-defaults -uroot --socket=$MYSQL_TMP_DIR/$ident.sock -O \
connect_timeout=5 -O shutdown_timeout=20 shutdown >/dev/null 2>&1
return
fi
$MYSQL_MANAGER_CLIENT $MANAGER_QUIET_OPT --user=$MYSQL_MANAGER_USER \
--password=$MYSQL_MANAGER_PW --port=$MYSQL_MANAGER_PORT <<EOF
@ -774,7 +774,7 @@ EOF
else
manager_launch master $MYSQLD $master_args
fi
sleep_until_file_exists $MASTER_MYSOCK $wait_for_master
sleep_until_file_exists $MASTER_MYPID $wait_for_master
wait_for_master=$SLEEP_TIME_FOR_SECOND_MASTER
MASTER_RUNNING=1
}
@ -874,7 +874,7 @@ start_slave()
manager_launch $slave_ident $SLAVE_MYSQLD $slave_args
fi
eval "SLAVE$1_RUNNING=1"
sleep_until_file_exists $slave_sock $wait_for_slave
sleep_until_file_exists $slave_pid $wait_for_slave
wait_for_slave=$SLEEP_TIME_FOR_SECOND_SLAVE
}

View File

@ -376,3 +376,34 @@ show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 2
drop table t1;
flush query cache;
reset query cache;
create table t1 (a int not null);
insert into t1 values (1),(2),(3);
select * from t1;
a
1
2
3
select * from t1;
a
1
2
3
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
insert delayed into t1 values (4);
select a from t1;
a
1
2
3
4
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
drop table t1;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0

View File

@ -247,6 +247,7 @@ select * from foo.t1;
show status like "Qcache_queries_in_cache";
drop database foo;
show status like "Qcache_queries_in_cache";
#
# Charset convertion (cp1251_koi8 always present)
#
@ -263,3 +264,22 @@ drop table t1;
# machines :(
#show variables like "query_cache_size";
#show status like "Qcache_free_memory";
#
# Test insert delayed
#
flush query cache;
reset query cache;
create table t1 (a int not null);
insert into t1 values (1),(2),(3);
select * from t1;
select * from t1;
show status like "Qcache_queries_in_cache";
insert delayed into t1 values (4);
--sleep 5 # Wait for insert delayed to be executed.
select a from t1;
show status like "Qcache_queries_in_cache";
drop table t1;
show status like "Qcache_queries_in_cache";