summaryrefslogtreecommitdiff
path: root/sql-bench
diff options
context:
space:
mode:
Diffstat (limited to 'sql-bench')
-rw-r--r--sql-bench/crash-me.sh3
-rw-r--r--sql-bench/limits/mysql.cfg251
2 files changed, 251 insertions, 3 deletions
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
###
###<select not 0
@@ -1150,21 +1260,29 @@ func_odbc_dayname=yes # Function DAYNAME
###
###<select dayname(a) from crash_me_d
###>Saturday
+ ###< insert into crash_me_d values('1997-02-01')
+ ###< insert into crash_me_d values('1997-02-01')
func_odbc_dayofmonth=yes # Function DAYOFMONTH
###< insert into crash_me_d values('1997-02-01')
###
###<select dayofmonth(a) from crash_me_d
###>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')
###
###<select dayofweek(a) from crash_me_d
###>7
+ ###< insert into crash_me_d values('1997-02-01')
+ ###< insert into crash_me_d values('1997-02-01')
func_odbc_dayofyear=yes # Function DAYOFYEAR
###< insert into crash_me_d values('1997-02-01')
###
###<select dayofyear(a) from crash_me_d
###>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
###
###<select degrees(6.283185)
@@ -1193,11 +1311,15 @@ func_odbc_hour=yes # Function HOUR
###
###<select hour('12:13:14')
###>12
+ ###< insert into crash_me_t values(20:08:16)
+ ###< insert into crash_me_t values(20:08:16)
func_odbc_hour_time=yes # Function ANSI HOUR
###< insert into crash_me_t values(20:08:16)
###
###<select hour(TIME '12:13:14')
###>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
###
###<select ifnull(2,3)
@@ -1252,6 +1374,8 @@ func_odbc_minute=yes # Function MINUTE
###
###<select minute('12:13:14')
###>13
+ ###< insert into crash_me_t values(20:08:16)
+ ###< insert into crash_me_t values(20:08:16)
func_odbc_mod=yes # Function MOD
###
###<select mod(11,7)
@@ -1261,11 +1385,15 @@ func_odbc_month=yes # Function MONTH
###
###<select month(a) from crash_me_d
###>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')
###
###<select monthname(a) from crash_me_d
###>February
+ ###< insert into crash_me_d values('1997-02-01')
+ ###< insert into crash_me_d values('1997-02-01')
func_odbc_now=yes # Function NOW
###
###<select now()
@@ -1283,6 +1411,8 @@ func_odbc_quarter=yes # Function QUARTER
###
###<select quarter(a) from crash_me_d
###>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
###
###<select radians(360)
@@ -1316,6 +1446,8 @@ func_odbc_second=yes # Function SECOND
###
###<select second('12:13:14')
###>14
+ ###< insert into crash_me_t values(20:08:16)
+ ###< insert into crash_me_t values(20:08:16)
func_odbc_sign=yes # Function SIGN
###
###<select sign(-5)
@@ -1374,11 +1506,19 @@ func_odbc_week=USA # WEEK
###<select week('1997-02-01')
###>4
###We expected '5' but got '4'
+ ###<select week('1997-02-01')
+ ###>4
+ ###We expected '5' but got '4'
+ ###<select week('1997-02-01')
+ ###>4
+ ###We expected '5' but got '4'
func_odbc_year=yes # Function YEAR
###< insert into crash_me_d values('1997-02-01')
###
###<select year(a) from crash_me_d
###>1997
+ ###< insert into crash_me_d values('1997-02-01')
+ ###< insert into crash_me_d values('1997-02-01')
func_sql_+=yes # Function +, -, * and /
###
###<select 5*3-4/2+1
@@ -1431,6 +1571,13 @@ func_sql_current_user=with_parenthesis # CURRENT_USER
###
###< select CURRENT_USER()
###> 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
###
###<select extract(minute from timestamp '2000-02-23 18:43:12.987')
@@ -1473,6 +1620,16 @@ func_sql_session_user=with_parenthesis # SESSION_USER
###
###< select SESSION_USER()
###> OK
+ ###< select SESSION_USER
+ ###> execute error:Unknown column 'SESSION_USER' in 'field list'
+ ###
+ ###< select SESSION_USER()
+ ###> OK
+ ###< select SESSION_USER
+ ###> execute error:Unknown column 'SESSION_USER' in 'field list'
+ ###
+ ###< select SESSION_USER()
+ ###> OK
func_sql_simple_case=yes # Function simple CASE
###
###<select case 2 when 1 then 'false' when 2 then 'true' end
@@ -1487,6 +1644,16 @@ func_sql_system_user=with_parenthesis # SYSTEM_USER
###
###< select SYSTEM_USER()
###> 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
###
###<select trim(trailing from trim(LEADING FROM ' abc '))
@@ -1501,6 +1668,16 @@ func_sql_user=with_parenthesis # USER
###
###< select USER()
###> OK
+ ###< select USER
+ ###> execute error:Unknown column 'USER' in 'field list'
+ ###
+ ###< select USER()
+ ###> OK
+ ###< select USER
+ ###> execute error:Unknown column 'USER' in 'field list'
+ ###
+ ###< select USER()
+ ###> OK
func_where_between=yes # Function BETWEEN
###
###<select a from crash_me where 5 between 4 and 6
@@ -1693,6 +1870,10 @@ group_on_unused=yes # Group on unused column
has_true_false=no # TRUE and FALSE
###< select (1=1)=true
###> 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
###<select a from crash_me group by a having a > 0
###>1
@@ -1918,6 +2099,8 @@ max_expressions=1450 # simple expressions
### 5000:FAIL 1000:OK 3000:FAIL 1400:OK 2200:FAIL 1560:FAIL 1432:OK 1496:FAIL 1445:OK 1470:FAIL 1450:OK 1460:FAIL 1452:FAIL 1451:FAIL
max_index=32 # max index
### max_unique_index=32 ,so max_index must be same
+ ### max_unique_index=32 ,so max_index must be same
+ ### max_unique_index=32 ,so max_index must be same
max_index_length=500 # index length
###We are trying (example with N=5):
###create table crash_q (q0 char(5) not null,unique (q0))
@@ -2070,6 +2253,14 @@ no_primary_key=yes # Tables without primary key
###> OK
###< insert into crash_me (a,b) values (1,'a')
###> OK
+ ###< create table crash_me (a integer not null,b char(10) not null)
+ ###> OK
+ ###< insert into crash_me (a,b) values (1,'a')
+ ###> OK
+ ###< create table crash_me (a integer not null,b char(10) not null)
+ ###> OK
+ ###< insert into crash_me (a,b) values (1,'a')
+ ###> OK
not_id_between=no # NOT ID BETWEEN interprets as ID NOT BETWEEN
###< create table crash_me_b (i int)
###> OK
@@ -2083,6 +2274,30 @@ not_id_between=no # NOT ID BETWEEN interprets as ID NOT BETWEEN
###
###< 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
+ ###
+ ###<select i from crash_me_b where not i between 1 and 3
+ ###> 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
+ ###
+ ###<select i from crash_me_b where not i between 1 and 3
+ ###> didn't return any result:
+ ###
+ ###< drop table crash_me_b
+ ###> OK
null_concat_expr=yes # Is concat('a',NULL) = NULL
###
###<select concat('a',NULL)
@@ -2173,6 +2388,26 @@ position_of_null=first # Where is null values in sorted recordset
###> 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
###<select * from crash_q
###>1