diff options
author | unknown <holyfoot@deer.(none)> | 2006-01-23 11:58:14 +0400 |
---|---|---|
committer | unknown <holyfoot@deer.(none)> | 2006-01-23 11:58:14 +0400 |
commit | 823ec15c65d9831fdf3a3521b214dbf1a20ca1ec (patch) | |
tree | 8f492f3265c018e9b62222f1c6928c045bcb9d0c | |
parent | d07932a3f19aa5bbaf50ea40aca9ad5cce5abb54 (diff) | |
download | mariadb-git-823ec15c65d9831fdf3a3521b214dbf1a20ca1ec.tar.gz |
Fixes about the embedded-server in 5.1
libmysqld/lib_sql.cc:
logger initialization added
mysql-test/mysql-test-run.pl:
ndbcluster and ssl disabled in embedded server
mysql-test/mysql-test-run.sh:
ndbcluster disabled in embedded server
mysql-test/r/mysqltest.result:
result fixed
mysql-test/r/sp_notembedded.result:
result fixed
mysql-test/t/log_tables.test:
test disabled in embedded server
mysql-test/t/sp_notembedded.test:
test fixed
-rw-r--r-- | libmysqld/lib_sql.cc | 6 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 2 | ||||
-rw-r--r-- | mysql-test/mysql-test-run.sh | 2 | ||||
-rw-r--r-- | mysql-test/r/mysqltest.result | 4 | ||||
-rw-r--r-- | mysql-test/r/sp_notembedded.result | 171 | ||||
-rw-r--r-- | mysql-test/t/log_tables.test | 2 | ||||
-rw-r--r-- | mysql-test/t/sp_notembedded.test | 4 |
7 files changed, 187 insertions, 4 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index fe60b4fd19c..c39f1b1f373 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -491,6 +491,12 @@ int init_embedded_server(int argc, char **argv, char **groups) my_progname= (char *)"mysql_embedded"; + /* + Perform basic logger initialization logger. Should be called after + MY_INIT, as it initializes mutexes. Log tables are inited later. + */ + logger.init_base(); + if (init_common_variables("my", *argcp, *argvp, (const char **)groups)) { mysql_server_end(); diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 1f996a68a9b..81b00ef8eb2 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -711,6 +711,8 @@ sub command_line_setup () { $glob_use_embedded_server= 1; push(@glob_test_mode, "embedded"); $opt_skip_rpl= 1; # We never run replication with embedded + $opt_skip_ndbcluster= 1; # Avoid auto detection + $opt_skip_ssl= 1; if ( $opt_extern ) { diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 4557ff97147..bf60a90fe75 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -317,6 +317,8 @@ while test $# -gt 0; do USE_EMBEDDED_SERVER=1 USE_MANAGER=0 NO_SLAVE=1 USE_RUNNING_SERVER=0 + USE_NDBCLUSTER="" + USE_NDBCLUSTER_SLAVE="" TEST_MODE="$TEST_MODE embedded" ;; --purify) USE_PURIFY=1 diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index ed474265b9b..3e1bf1946ff 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -1,6 +1,6 @@ -select -1 as "before_use_test" ; +select 0 as "before_use_test" ; before_use_test --1 +0 select otto from (select 1 as otto) as t1; otto 1 diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result index 10ea15399f7..bdd32647f9d 100644 --- a/mysql-test/r/sp_notembedded.result +++ b/mysql-test/r/sp_notembedded.result @@ -33,3 +33,174 @@ ERROR 42000: Can't find any matching row in the user table select bug5278()| ERROR 42000: Can't find any matching row in the user table drop function bug5278| +drop table if exists t1| +create table t1 ( +id char(16) not null default '', +data int not null +)| +drop procedure if exists bug3583| +drop procedure if exists bug3583| +create procedure bug3583() +begin +declare c int; +select * from t1; +select count(*) into c from t1; +select c; +end| +insert into t1 values ("x", 3), ("y", 5)| +set @x = @@query_cache_size| +set global query_cache_size = 10*1024*1024| +flush status| +flush query cache| +show status like 'Qcache_hits'| +Variable_name Value +Qcache_hits 0 +call bug3583()| +id data +x 3 +y 5 +c +2 +show status like 'Qcache_hits'| +Variable_name Value +Qcache_hits 0 +call bug3583()| +id data +x 3 +y 5 +c +2 +call bug3583()| +id data +x 3 +y 5 +c +2 +show status like 'Qcache_hits'| +Variable_name Value +Qcache_hits 2 +set global query_cache_size = @x| +flush status| +flush query cache| +delete from t1| +drop procedure bug3583| +drop table t1; +#| +drop procedure if exists bug6807| +create procedure bug6807() +begin +declare id int; +set id = connection_id(); +kill query id; +select 'Not reached'; +end| +call bug6807()| +ERROR 70100: Query execution was interrupted +call bug6807()| +ERROR 70100: Query execution was interrupted +drop procedure bug6807| +drop function if exists bug10100f| +drop procedure if exists bug10100p| +drop procedure if exists bug10100t| +drop procedure if exists bug10100pt| +drop procedure if exists bug10100pv| +drop procedure if exists bug10100pd| +drop procedure if exists bug10100pc| +create function bug10100f(prm int) returns int +begin +if prm > 1 then +return prm * bug10100f(prm - 1); +end if; +return 1; +end| +create procedure bug10100p(prm int, inout res int) +begin +set res = res * prm; +if prm > 1 then +call bug10100p(prm - 1, res); +end if; +end| +create procedure bug10100t(prm int) +begin +declare res int; +set res = 1; +call bug10100p(prm, res); +select res; +end| +create table t3 (a int)| +insert into t3 values (0)| +create view v1 as select a from t3; +create procedure bug10100pt(level int, lim int) +begin +if level < lim then +update t3 set a=level; +FLUSH TABLES; +call bug10100pt(level+1, lim); +else +select * from t3; +end if; +end| +create procedure bug10100pv(level int, lim int) +begin +if level < lim then +update v1 set a=level; +FLUSH TABLES; +call bug10100pv(level+1, lim); +else +select * from v1; +end if; +end| +prepare stmt2 from "select * from t3;"; +create procedure bug10100pd(level int, lim int) +begin +if level < lim then +select level; +prepare stmt1 from "update t3 set a=a+2"; +execute stmt1; +FLUSH TABLES; +execute stmt1; +FLUSH TABLES; +execute stmt1; +FLUSH TABLES; +deallocate prepare stmt1; +execute stmt2; +select * from t3; +call bug10100pd(level+1, lim); +else +execute stmt2; +end if; +end| +create procedure bug10100pc(level int, lim int) +begin +declare lv int; +declare c cursor for select a from t3; +open c; +if level < lim then +select level; +fetch c into lv; +select lv; +update t3 set a=level+lv; +FLUSH TABLES; +call bug10100pc(level+1, lim); +else +select * from t3; +end if; +close c; +end| +set @@max_sp_recursion_depth=255| +set @var=1| +call bug10100p(255, @var)| +call bug10100pt(1,255)| +call bug10100pv(1,255)| +call bug10100pd(1,255)| +call bug10100pc(1,255)| +set @@max_sp_recursion_depth=0| +deallocate prepare stmt2| +drop function bug10100f| +drop procedure bug10100p| +drop procedure bug10100t| +drop procedure bug10100pt| +drop procedure bug10100pv| +drop procedure bug10100pd| +drop procedure bug10100pc| +drop view v1| diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test index a9e161f644c..8c53fe8f028 100644 --- a/mysql-test/t/log_tables.test +++ b/mysql-test/t/log_tables.test @@ -1,3 +1,5 @@ +# this test needs multithreaded mysqltest +-- source include/not_embedded.inc # # Basic log tables test # diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test index 964b5d313c8..f7ba9803fda 100644 --- a/mysql-test/t/sp_notembedded.test +++ b/mysql-test/t/sp_notembedded.test @@ -62,12 +62,12 @@ drop function bug5278| --disable_warnings -drop table if exists t1; +drop table if exists t1| --enable_warnings create table t1 ( id char(16) not null default '', data int not null -); +)| # # BUG#3583: query cache doesn't work for stored procedures # |