~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/constraints.test

  • Committer: Mats Kindahl
  • Date: 2008-08-26 07:32:59 UTC
  • mto: (489.1.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 491.
  • Revision ID: mats@mysql.com-20080826073259-9k4evtajgldgolli
Replaced use of thd_proc_info() macro with calls to
set_proc_info() and get_proc_info() internally.  Introduced
functions set_thd_proc_info() and get_thd_proc_info() for
external users, i.e., plug-ins.

The set_thd_proc_info() accepted callers info that can be used to
print debug output, but the information was not used. The return
value was changed to void and the old value is not fetched any
more. To be able to get the value of proc_info for external
users, the function get_thd_proc_info() was introduced.

The thd_proc_info() macro called set_thd_proc_info() but almost
never used the return value of set_thd_proc_info() so the macro
was replaced with a call of THD::set_proc_info().

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# Testing of constraints
3
 
# Currently MySQL only ignores the syntax.
4
 
#
5
 
--disable_warnings
6
 
drop table if exists t1;
7
 
--enable_warnings
8
 
 
9
 
create table t1 (a int check (a>0));
10
 
insert into t1 values (1);
11
 
insert into t1 values (0);
12
 
drop table t1;
13
 
create table t1 (a int ,b int, check a>b);
14
 
insert into t1 values (1,0);
15
 
insert into t1 values (0,1);
16
 
drop table t1;
17
 
create table t1 (a int ,b int, constraint abc check (a>b));
18
 
insert into t1 values (1,0);
19
 
insert into t1 values (0,1);
20
 
drop table t1;
21
 
create table t1 (a int null);
22
 
insert into t1 values (1),(NULL);
23
 
drop table t1;
24
 
create table t1 (a int null);
25
 
alter table t1 add constraint constraint_1 unique (a);
26
 
alter table t1 add constraint unique key_1(a);
27
 
alter table t1 add constraint constraint_2 unique key_2(a);
28
 
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
29
 
show create table t1;
30
 
drop table t1;
31
 
 
32
 
# End of 4.1 tests