mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +01:00
Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.clean
This commit is contained in:
commit
570c754993
9 changed files with 176 additions and 141 deletions
|
@ -189,6 +189,13 @@ void STDCALL mysql_server_end()
|
||||||
finish_client_errs();
|
finish_client_errs();
|
||||||
free_charsets();
|
free_charsets();
|
||||||
mysql_client_init= org_my_init_done= 0;
|
mysql_client_init= org_my_init_done= 0;
|
||||||
|
#ifdef EMBEDDED_SERVER
|
||||||
|
if (stderror_file)
|
||||||
|
{
|
||||||
|
fclose(stderror_file);
|
||||||
|
stderror_file= 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static MYSQL_PARAMETERS mysql_internal_parameters=
|
static MYSQL_PARAMETERS mysql_internal_parameters=
|
||||||
|
|
|
@ -506,7 +506,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct
|
1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM;
|
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM;
|
||||||
ERROR 42000: This version of MySQL doesn't yet support 'RTREE INDEX'
|
Got one of the listed errors
|
||||||
create table t1 (a int, b varchar(200), c text not null) checksum=1;
|
create table t1 (a int, b varchar(200), c text not null) checksum=1;
|
||||||
create table t2 (a int, b varchar(200), c text not null) checksum=0;
|
create table t2 (a int, b varchar(200), c text not null) checksum=0;
|
||||||
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
|
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
|
||||||
|
|
|
@ -152,82 +152,6 @@ show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 0
|
Qcache_queries_in_cache 0
|
||||||
drop table t1, t2, t3;
|
drop table t1, t2, t3;
|
||||||
create table t1 (a int not null);
|
|
||||||
insert into t1 values (1),(2),(3);
|
|
||||||
create table t2 (a int not null);
|
|
||||||
insert into t2 values (1),(2),(3);
|
|
||||||
select * from t1;
|
|
||||||
a
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
select * from t2;
|
|
||||||
a
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
insert into t1 values (4);
|
|
||||||
show status like "Qcache_free_blocks";
|
|
||||||
Variable_name Value
|
|
||||||
Qcache_free_blocks 2
|
|
||||||
flush query cache;
|
|
||||||
show status like "Qcache_free_blocks";
|
|
||||||
Variable_name Value
|
|
||||||
Qcache_free_blocks 1
|
|
||||||
drop table t1, t2;
|
|
||||||
create table t1 (a text not null);
|
|
||||||
create table t11 (a text not null);
|
|
||||||
create table t2 (a text not null);
|
|
||||||
create table t21 (a text not null);
|
|
||||||
create table t3 (a text not null);
|
|
||||||
insert into t1 values("1111111111111111111111111111111111111111111111111111");
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t11 select * from t1;
|
|
||||||
insert into t21 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t3 select * from t1;
|
|
||||||
insert into t3 select * from t2;
|
|
||||||
insert into t3 select * from t1;
|
|
||||||
select * from t11;
|
|
||||||
select * from t21;
|
|
||||||
show status like "Qcache_total_blocks";
|
|
||||||
Variable_name Value
|
|
||||||
Qcache_total_blocks 7
|
|
||||||
show status like "Qcache_free_blocks";
|
|
||||||
Variable_name Value
|
|
||||||
Qcache_free_blocks 1
|
|
||||||
insert into t11 values("");
|
|
||||||
select * from t3;
|
|
||||||
show status like "Qcache_total_blocks";
|
|
||||||
Variable_name Value
|
|
||||||
Qcache_total_blocks 8
|
|
||||||
show status like "Qcache_free_blocks";
|
|
||||||
Variable_name Value
|
|
||||||
Qcache_free_blocks 1
|
|
||||||
flush query cache;
|
|
||||||
show status like "Qcache_total_blocks";
|
|
||||||
Variable_name Value
|
|
||||||
Qcache_total_blocks 7
|
|
||||||
show status like "Qcache_free_blocks";
|
|
||||||
Variable_name Value
|
|
||||||
Qcache_free_blocks 1
|
|
||||||
drop table t1, t2, t3, t11, t21;
|
|
||||||
set query_cache_type=demand;
|
set query_cache_type=demand;
|
||||||
create table t1 (a int not null);
|
create table t1 (a int not null);
|
||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
|
|
83
mysql-test/r/query_cache_notembedded.result
Normal file
83
mysql-test/r/query_cache_notembedded.result
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
set GLOBAL query_cache_size=1355776;
|
||||||
|
flush query cache;
|
||||||
|
flush query cache;
|
||||||
|
reset query cache;
|
||||||
|
flush status;
|
||||||
|
drop table if exists t1, t2, t3, t11, t21;
|
||||||
|
create table t1 (a int not null);
|
||||||
|
insert into t1 values (1),(2),(3);
|
||||||
|
create table t2 (a int not null);
|
||||||
|
insert into t2 values (1),(2),(3);
|
||||||
|
select * from t1;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
select * from t2;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
insert into t1 values (4);
|
||||||
|
show status like "Qcache_free_blocks";
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_free_blocks 2
|
||||||
|
flush query cache;
|
||||||
|
show status like "Qcache_free_blocks";
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_free_blocks 1
|
||||||
|
drop table t1, t2;
|
||||||
|
create table t1 (a text not null);
|
||||||
|
create table t11 (a text not null);
|
||||||
|
create table t2 (a text not null);
|
||||||
|
create table t21 (a text not null);
|
||||||
|
create table t3 (a text not null);
|
||||||
|
insert into t1 values("1111111111111111111111111111111111111111111111111111");
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t11 select * from t1;
|
||||||
|
insert into t21 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t3 select * from t1;
|
||||||
|
insert into t3 select * from t2;
|
||||||
|
insert into t3 select * from t1;
|
||||||
|
select * from t11;
|
||||||
|
select * from t21;
|
||||||
|
show status like "Qcache_total_blocks";
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_total_blocks 7
|
||||||
|
show status like "Qcache_free_blocks";
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_free_blocks 1
|
||||||
|
insert into t11 values("");
|
||||||
|
select * from t3;
|
||||||
|
show status like "Qcache_total_blocks";
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_total_blocks 8
|
||||||
|
show status like "Qcache_free_blocks";
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_free_blocks 1
|
||||||
|
flush query cache;
|
||||||
|
show status like "Qcache_total_blocks";
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_total_blocks 7
|
||||||
|
show status like "Qcache_free_blocks";
|
||||||
|
Variable_name Value
|
||||||
|
Qcache_free_blocks 1
|
||||||
|
drop table t1, t2, t3, t11, t21;
|
||||||
|
set GLOBAL query_cache_size=0;
|
|
@ -479,7 +479,7 @@ drop table t1,t2;
|
||||||
#
|
#
|
||||||
# Test RTREE index
|
# Test RTREE index
|
||||||
#
|
#
|
||||||
--error 1235
|
--error 1235, 1289
|
||||||
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM;
|
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM;
|
||||||
# INSERT INTO t1 VALUES (1,1),(1,1);
|
# INSERT INTO t1 VALUES (1,1),(1,1);
|
||||||
# DELETE FROM rt WHERE a<1;
|
# DELETE FROM rt WHERE a<1;
|
||||||
|
|
|
@ -79,68 +79,6 @@ delete from t3 where a=10;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
drop table t1, t2, t3;
|
drop table t1, t2, t3;
|
||||||
#
|
#
|
||||||
# FLUSH QUERY CACHE
|
|
||||||
#
|
|
||||||
create table t1 (a int not null);
|
|
||||||
insert into t1 values (1),(2),(3);
|
|
||||||
create table t2 (a int not null);
|
|
||||||
insert into t2 values (1),(2),(3);
|
|
||||||
select * from t1;
|
|
||||||
select * from t2;
|
|
||||||
insert into t1 values (4);
|
|
||||||
show status like "Qcache_free_blocks";
|
|
||||||
flush query cache;
|
|
||||||
show status like "Qcache_free_blocks";
|
|
||||||
drop table t1, t2;
|
|
||||||
# With join results...
|
|
||||||
create table t1 (a text not null);
|
|
||||||
create table t11 (a text not null);
|
|
||||||
create table t2 (a text not null);
|
|
||||||
create table t21 (a text not null);
|
|
||||||
create table t3 (a text not null);
|
|
||||||
insert into t1 values("1111111111111111111111111111111111111111111111111111");
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
# t11 and t21 must be over 4Kb (QUERY_CACHE_MIN_RESULT_DATA_SIZE)
|
|
||||||
insert into t11 select * from t1;
|
|
||||||
insert into t21 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
insert into t1 select * from t2;
|
|
||||||
#results of t3 must be > 0.5Mb
|
|
||||||
insert into t3 select * from t1;
|
|
||||||
insert into t3 select * from t2;
|
|
||||||
insert into t3 select * from t1;
|
|
||||||
disable_result_log;
|
|
||||||
select * from t11;
|
|
||||||
select * from t21;
|
|
||||||
enable_result_log;
|
|
||||||
show status like "Qcache_total_blocks";
|
|
||||||
show status like "Qcache_free_blocks";
|
|
||||||
disable_result_log;
|
|
||||||
insert into t11 values("");
|
|
||||||
select * from t3;
|
|
||||||
enable_result_log;
|
|
||||||
show status like "Qcache_total_blocks";
|
|
||||||
show status like "Qcache_free_blocks";
|
|
||||||
flush query cache;
|
|
||||||
show status like "Qcache_total_blocks";
|
|
||||||
show status like "Qcache_free_blocks";
|
|
||||||
drop table t1, t2, t3, t11, t21;
|
|
||||||
#
|
|
||||||
# SELECT SQL_CACHE ...
|
# SELECT SQL_CACHE ...
|
||||||
#
|
#
|
||||||
set query_cache_type=demand;
|
set query_cache_type=demand;
|
||||||
|
|
81
mysql-test/t/query_cache_notembedded.test
Normal file
81
mysql-test/t/query_cache_notembedded.test
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
-- source include/have_query_cache.inc
|
||||||
|
-- source include/not_embedded.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Tests with query cache
|
||||||
|
#
|
||||||
|
set GLOBAL query_cache_size=1355776;
|
||||||
|
|
||||||
|
# Reset query cache variables.
|
||||||
|
|
||||||
|
flush query cache; # This crashed in some versions
|
||||||
|
flush query cache; # This crashed in some versions
|
||||||
|
reset query cache;
|
||||||
|
flush status;
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t1, t2, t3, t11, t21;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
# FLUSH QUERY CACHE
|
||||||
|
#
|
||||||
|
create table t1 (a int not null);
|
||||||
|
insert into t1 values (1),(2),(3);
|
||||||
|
create table t2 (a int not null);
|
||||||
|
insert into t2 values (1),(2),(3);
|
||||||
|
select * from t1;
|
||||||
|
select * from t2;
|
||||||
|
insert into t1 values (4);
|
||||||
|
show status like "Qcache_free_blocks";
|
||||||
|
flush query cache;
|
||||||
|
show status like "Qcache_free_blocks";
|
||||||
|
drop table t1, t2;
|
||||||
|
# With join results...
|
||||||
|
create table t1 (a text not null);
|
||||||
|
create table t11 (a text not null);
|
||||||
|
create table t2 (a text not null);
|
||||||
|
create table t21 (a text not null);
|
||||||
|
create table t3 (a text not null);
|
||||||
|
insert into t1 values("1111111111111111111111111111111111111111111111111111");
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
# t11 and t21 must be over 4Kb (QUERY_CACHE_MIN_RESULT_DATA_SIZE)
|
||||||
|
insert into t11 select * from t1;
|
||||||
|
insert into t21 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
insert into t1 select * from t2;
|
||||||
|
#results of t3 must be > 0.5Mb
|
||||||
|
insert into t3 select * from t1;
|
||||||
|
insert into t3 select * from t2;
|
||||||
|
insert into t3 select * from t1;
|
||||||
|
disable_result_log;
|
||||||
|
select * from t11;
|
||||||
|
select * from t21;
|
||||||
|
enable_result_log;
|
||||||
|
show status like "Qcache_total_blocks";
|
||||||
|
show status like "Qcache_free_blocks";
|
||||||
|
disable_result_log;
|
||||||
|
insert into t11 values("");
|
||||||
|
select * from t3;
|
||||||
|
enable_result_log;
|
||||||
|
show status like "Qcache_total_blocks";
|
||||||
|
show status like "Qcache_free_blocks";
|
||||||
|
flush query cache;
|
||||||
|
show status like "Qcache_total_blocks";
|
||||||
|
show status like "Qcache_free_blocks";
|
||||||
|
drop table t1, t2, t3, t11, t21;
|
||||||
|
|
||||||
|
set GLOBAL query_cache_size=0;
|
|
@ -1156,6 +1156,7 @@ extern uint opt_large_page_size;
|
||||||
extern MYSQL_LOG mysql_log,mysql_slow_log,mysql_bin_log;
|
extern MYSQL_LOG mysql_log,mysql_slow_log,mysql_bin_log;
|
||||||
extern FILE *bootstrap_file;
|
extern FILE *bootstrap_file;
|
||||||
extern int bootstrap_error;
|
extern int bootstrap_error;
|
||||||
|
extern FILE *stderror_file;
|
||||||
extern pthread_key(MEM_ROOT**,THR_MALLOC);
|
extern pthread_key(MEM_ROOT**,THR_MALLOC);
|
||||||
extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open,
|
extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open,
|
||||||
LOCK_thread_count,LOCK_mapped_file,LOCK_user_locks, LOCK_status,
|
LOCK_thread_count,LOCK_mapped_file,LOCK_user_locks, LOCK_status,
|
||||||
|
|
|
@ -447,6 +447,7 @@ Le_creator le_creator;
|
||||||
|
|
||||||
FILE *bootstrap_file;
|
FILE *bootstrap_file;
|
||||||
int bootstrap_error;
|
int bootstrap_error;
|
||||||
|
FILE *stderror_file=0;
|
||||||
|
|
||||||
I_List<i_string_pair> replicate_rewrite_db;
|
I_List<i_string_pair> replicate_rewrite_db;
|
||||||
I_List<i_string> replicate_do_db, replicate_ignore_db;
|
I_List<i_string> replicate_do_db, replicate_ignore_db;
|
||||||
|
@ -2878,7 +2879,7 @@ server.");
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
if (freopen(log_error_file, "a+", stdout))
|
if (freopen(log_error_file, "a+", stdout))
|
||||||
#endif
|
#endif
|
||||||
freopen(log_error_file, "a+", stderr);
|
stderror_file= freopen(log_error_file, "a+", stderr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue