diff options
author | unknown <walrus@mysql.com> | 2002-11-28 20:01:17 +0500 |
---|---|---|
committer | unknown <walrus@mysql.com> | 2002-11-28 20:01:17 +0500 |
commit | 5fe76b206987e5ebee3c13489d439855f290e4bc (patch) | |
tree | fe0fd40db0d8e13758e02907a0cc3b8dfa12783c /sql-bench/crash-me.sh | |
parent | b39752294b6fc55d702432187f3bb6ee0b3d6329 (diff) | |
download | mariadb-git-5fe76b206987e5ebee3c13489d439855f290e4bc.tar.gz |
Merge constraint tests with "ignoring constarint tests"
for column,table and named constarints. Now constraint test produces
exactly one line in report, with "yes","no" or syntax only".
add /odbc to server-version if benchmark/crash-me works over odbc
sql-bench/crash-me.sh:
merge constraint tests with "ignoring constarint tests"
for column,table and named constarints. Now constraint test produces
exactly one line in report, with "yes","no" or syntax only".
sql-bench/server-cfg.sh:
add /odbc to server-version if benchmark/crash-me works over odbc
Diffstat (limited to 'sql-bench/crash-me.sh')
-rw-r--r-- | sql-bench/crash-me.sh | 50 |
1 files changed, 31 insertions, 19 deletions
diff --git a/sql-bench/crash-me.sh b/sql-bench/crash-me.sh index 5fa67773566..d9453948d1e 100644 --- a/sql-bench/crash-me.sh +++ b/sql-bench/crash-me.sh @@ -1,4 +1,3 @@ -#!@PERL@ # Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB # # This library is free software; you can redistribute it and/or @@ -1720,32 +1719,22 @@ if ($limits{'foreign_key'} eq 'yes') } } -report("Column constraints","constraint_check", - "create table crash_q (a int check (a>0))", - "drop table crash_q $drop_attr"); - -report("Ignoring column constraints","ignoring_constraint_check", - "create table crash_q (a int check (a>0))", - "insert into crash_q values(0)", - "drop table crash_q $drop_attr") if ($limits{'constraint_check'} eq 'yes'); +check_constraint("Column constraints","constraint_check", + "create table crash_q (a int check (a>0))", + "insert into crash_q values(0)", + "drop table crash_q $drop_attr"); -report("Table constraints","constraint_check_table", - "create table crash_q (a int ,b int, check (a>b))", - "drop table crash_q $drop_attr"); -report("Ignoring table constraints","ignoring_constraint_check_table", +check_constraint("Table constraints","constraint_check_table", "create table crash_q (a int ,b int, check (a>b))", "insert into crash_q values(0,0)", - "drop table crash_q $drop_attr") if ($limits{'constraint_check_table'} eq 'yes'); - -report("Named constraints","constraint_check_named", - "create table crash_q (a int ,b int, constraint abc check (a>b))", "drop table crash_q $drop_attr"); -report("Ignoring named constraints","ignoring_constraint_check_named", +check_constraint("Named constraints","constraint_check_named", "create table crash_q (a int ,b int, constraint abc check (a>b))", "insert into crash_q values(0,0)", - "drop table crash_q $drop_attr") if ($limits{'constraint_check_named'} eq 'yes'); + "drop table crash_q $drop_attr"); + report("NULL constraint (SyBase style)","constraint_null", "create table crash_q (a int null)", @@ -2236,6 +2225,29 @@ sub check_parenthesis { save_config_data($param_name,$resultat,$fn); } +sub check_constraint { + my $prompt = shift; + my $key = shift; + my $create = shift; + my $check = shift; + my $drop = shift; + save_incomplete($key,$prompt); + print "$prompt="; + my $res = 'no'; + + if ( ($t=safe_query($create)) == 1) + { + $res='yes'; + if (safe_query($check) == 1) + { + $res='syntax only'; + } + } + safe_query($drop); + save_config_data($key,$res,$prompt); + print "$res\n"; +} + sub usage { print <<EOF; |