From ea8b1234bcb8d84dca2c040aaf71ab1412ccaa3f Mon Sep 17 00:00:00 2001 From: "monty@mysql.com" <> Date: Thu, 20 May 2004 13:54:52 +0300 Subject: Bug fixes: Use %windir% instead of c:\winnt\ (Bug #3786) Fixed wrong foreign key test in crash-me (Bug #3740) --- sql-bench/crash-me.sh | 3 +- sql-bench/limits/mysql.cfg | 251 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 251 insertions(+), 3 deletions(-) (limited to 'sql-bench') diff --git a/sql-bench/crash-me.sh b/sql-bench/crash-me.sh index 00989fc0bc8..8009fc36586 100644 --- a/sql-bench/crash-me.sh +++ b/sql-bench/crash-me.sh @@ -414,8 +414,7 @@ if ($dbh->do("create table crash_q (a integer, b integer,c1 CHAR(10))") && ["with add primary key", "alter table crash_q1 add primary key(c1)"]); report("Alter table add foreign key",'alter_add_foreign_key', - "alter table crash_q add constraint f1 foreign key(c1)", - " references crash_q1(c1)"); + "alter table crash_q add constraint f1 foreign key(c1) references crash_q1(c1)"); try_and_report("Alter table drop foreign key",'alter_drop_foreign_key', ["with drop constraint", "alter table crash_q drop constraint f1"], diff --git a/sql-bench/limits/mysql.cfg b/sql-bench/limits/mysql.cfg index feaa79e43e9..35bdc9fa842 100644 --- a/sql-bench/limits/mysql.cfg +++ b/sql-bench/limits/mysql.cfg @@ -13,6 +13,8 @@ NEG=yes # update of column= -column ###As far as all queries returned OK, result is YES Need_cast_for_null=no # Need to cast NULL for arithmetic ### Check if numeric_null (NULL) is 'NULL' + ### Check if numeric_null (NULL) is 'NULL' + ### Check if numeric_null (NULL) is 'NULL' alter_add_col=yes # Alter table add column ###< alter table crash_q add d integer ###> OK @@ -187,6 +189,22 @@ constraint_check=syntax only # Column constraints ### ###< drop table crash_q ###> OK + ###< create table crash_q (a int check (a>0)) + ###> OK + ### + ###< insert into crash_q values(0) + ###> OK + ### + ###< drop table crash_q + ###> OK + ###< create table crash_q (a int check (a>0)) + ###> OK + ### + ###< insert into crash_q values(0) + ###> OK + ### + ###< drop table crash_q + ###> OK constraint_check_named=syntax only # Named constraints ###< create table crash_q (a int ,b int, constraint abc check (a>b)) ###> OK @@ -196,6 +214,22 @@ constraint_check_named=syntax only # Named constraints ### ###< drop table crash_q ###> OK + ###< create table crash_q (a int ,b int, constraint abc check (a>b)) + ###> OK + ### + ###< insert into crash_q values(0,0) + ###> OK + ### + ###< drop table crash_q + ###> OK + ###< create table crash_q (a int ,b int, constraint abc check (a>b)) + ###> OK + ### + ###< insert into crash_q values(0,0) + ###> OK + ### + ###< drop table crash_q + ###> OK constraint_check_table=syntax only # Table constraints ###< create table crash_q (a int ,b int, check (a>b)) ###> OK @@ -205,6 +239,22 @@ constraint_check_table=syntax only # Table constraints ### ###< drop table crash_q ###> OK + ###< create table crash_q (a int ,b int, check (a>b)) + ###> OK + ### + ###< insert into crash_q values(0,0) + ###> OK + ### + ###< drop table crash_q + ###> OK + ###< create table crash_q (a int ,b int, check (a>b)) + ###> OK + ### + ###< insert into crash_q values(0,0) + ###> OK + ### + ###< drop table crash_q + ###> OK constraint_null=yes # NULL constraint (SyBase style) ###< create table crash_q (a int null) ###> OK @@ -348,6 +398,20 @@ date_format_inresult=iso # Date format in result ###> 2003-08-27 ###< delete from crash_me_d ###> OK + ###< insert into crash_me_d values( sysdate() ) + ###> OK + ### + ###< select a from crash_me_d + ###> 2004-05-20 + ###< delete from crash_me_d + ###> OK + ###< insert into crash_me_d values( sysdate() ) + ###> OK + ### + ###< select a from crash_me_d + ###> 2004-05-20 + ###< delete from crash_me_d + ###> OK date_infinity=error # Supports 'infinity dates ###< create table crash_me2 (a date not null) ###> OK @@ -460,6 +524,14 @@ drop_requires_cascade=no # drop table require cascade/restrict ###> OK ###< drop table crash_me ###> OK + ###< create table crash_me (a integer not null) + ###> OK + ###< drop table crash_me + ###> OK + ###< create table crash_me (a integer not null) + ###> OK + ###< drop table crash_me + ###> OK drop_restrict=yes # drop table with cascade/restrict ###< create table crash_q (a int) ###> OK @@ -524,6 +596,40 @@ foreign_key=syntax only # foreign keys ### ###< drop table crash_me_qf ###> OK + ###< create table crash_me_qf (a integer not null,primary key (a)) + ###> OK + ### + ###< create table crash_me_qf2 (a integer not null,foreign key (a) references crash_me_qf (a)) + ###> OK + ### + ###< insert into crash_me_qf values (1) + ###> OK + ### + ###< insert into crash_me_qf2 values (2) + ###> OK + ### + ###< drop table crash_me_qf2 + ###> OK + ### + ###< drop table crash_me_qf + ###> OK + ###< create table crash_me_qf (a integer not null,primary key (a)) + ###> OK + ### + ###< create table crash_me_qf2 (a integer not null,foreign key (a) references crash_me_qf (a)) + ###> OK + ### + ###< insert into crash_me_qf values (1) + ###> OK + ### + ###< insert into crash_me_qf2 values (2) + ###> OK + ### + ###< drop table crash_me_qf2 + ###> OK + ### + ###< drop table crash_me_qf + ###> OK full_outer_join=no # full outer join ###< select crash_me.a from crash_me full join crash_me2 ON ### crash_me.a=crash_me2.a @@ -856,6 +962,10 @@ func_extra_months_between=no # Function MONTHS_BETWEEN func_extra_noround=no # Function NOROUND ###< select noround(22.6) ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(22.6)' at line 1 + ###< select noround(22.6) + ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(22.6)' at line 1 + ###< select noround(22.6) + ###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(22.6)' at line 1 func_extra_not=yes # Function NOT in SELECT ### ###1 + ###< insert into crash_me_d values('1997-02-01') + ###< insert into crash_me_d values('1997-02-01') func_odbc_dayofweek=yes # Function DAYOFWEEK ###< insert into crash_me_d values('1997-02-01') ### ###32 + ###< insert into crash_me_d values('1997-02-01') + ###< insert into crash_me_d values('1997-02-01') func_odbc_degrees=yes # Function DEGREES ### ###12 + ###< insert into crash_me_t values(20:08:16) + ###< insert into crash_me_t values(20:08:16) func_odbc_ifnull=yes # Function IFNULL ### ###2 + ###< insert into crash_me_d values('1997-02-01') + ###< insert into crash_me_d values('1997-02-01') func_odbc_monthname=yes # Function MONTHNAME ###< insert into crash_me_d values('1997-02-01') ### ###1 + ###< insert into crash_me_d values('1997-02-01') + ###< insert into crash_me_d values('1997-02-01') func_odbc_radians=yes # Function RADIANS ### ###4 ###We expected '5' but got '4' + ###4 + ###We expected '5' but got '4' func_odbc_year=yes # Function YEAR ###< insert into crash_me_d values('1997-02-01') ### ### OK + ###< select CURRENT_USER + ###> OK + ###< select CURRENT_USER + ###> execute error:Unknown column 'CURRENT_USER' in 'field list' + ### + ###< select CURRENT_USER() + ###> OK func_sql_extract_sql=yes # Function EXTRACT ### ### OK + ###< select SYSTEM_USER + ###> execute error:Unknown column 'SYSTEM_USER' in 'field list' + ### + ###< select SYSTEM_USER() + ###> OK + ###< select SYSTEM_USER + ###> execute error:Unknown column 'SYSTEM_USER' in 'field list' + ### + ###< select SYSTEM_USER() + ###> OK func_sql_trim=yes # Function TRIM ### ### execute error:Unknown column 'true' in 'field list' + ###< select (1=1)=true + ###> OK + ###< select (1=1)=true + ###> execute error:Unknown column 'true' in 'field list' having=yes # Having ### didn't return any result: + ### + ###< drop table crash_me_b + ###> OK + ###< create table crash_me_b (i int) + ###> OK + ###< insert into crash_me_b values(2) + ###> OK + ###< insert into crash_me_b values(5) + ###> OK + ### + ### 2 ###> 3 ###> 4 + ###< insert into crash_me_n (i) values(1) + ###> OK + ###< insert into crash_me_n values(2,2) + ###> OK + ###< insert into crash_me_n values(3,3) + ###> OK + ###< insert into crash_me_n values(4,4) + ###> OK + ###< insert into crash_me_n (i) values(5) + ###> OK + ###< insert into crash_me_n (i) values(1) + ###> OK + ###< insert into crash_me_n values(2,2) + ###> OK + ###< insert into crash_me_n values(3,3) + ###> OK + ###< insert into crash_me_n values(4,4) + ###> OK + ###< insert into crash_me_n (i) values(5) + ###> OK position_of_null_desc=last # Where is null values in sorted recordset (DESC) ###< select r from crash_me_n order by r desc ###> 4 @@ -6053,7 +6288,7 @@ select_without_from=yes # SELECT without FROM ###> OK ### ###As far as all queries returned OK, result is YES -server_version=MySQL 4.0.15 debug log/ # server version +server_version=MySQL 4.0.20 debug/ # server version simple_joins=yes # ANSI SQL simple joins ###< select crash_me.a from crash_me, crash_me t0 ###> OK @@ -6223,6 +6458,20 @@ time_format_inresult=iso # Time format in result ###> 19:55:21 ###< delete from crash_me_t ###> OK + ###< insert into crash_me_t values(CURRENT_TIME) + ###> OK + ### + ###< select a from crash_me_t + ###> 13:45:04 + ###< delete from crash_me_t + ###> OK + ###< insert into crash_me_t values(CURRENT_TIME) + ###> OK + ### + ###< select a from crash_me_t + ###> 13:47:18 + ###< delete from crash_me_t + ###> OK transactions=yes # transactions ###