~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/include/strict_autoinc.inc

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Test for strict-mode autoincrement
 
3
#
 
4
 
 
5
--disable_warnings
 
6
drop table if exists t1;
 
7
--enable_warnings
 
8
 
 
9
set @org_mode=@@sql_mode;
 
10
eval create table t1
 
11
(
 
12
  `a` tinyint(4) NOT NULL auto_increment,
 
13
  primary key (`a`)
 
14
) engine = $type ;
 
15
set @@sql_mode='strict_all_tables';
 
16
--error ER_WARN_DATA_OUT_OF_RANGE
 
17
insert into t1 values(1000);
 
18
select count(*) from t1;
 
19
 
 
20
set auto_increment_increment=1000;
 
21
set auto_increment_offset=700;
 
22
--error ER_WARN_DATA_OUT_OF_RANGE
 
23
insert into t1 values(null);
 
24
select count(*) from t1;
 
25
 
 
26
set @@sql_mode=@org_mode;
 
27
insert into t1 values(null);
 
28
select * from t1;
 
29
 
 
30
drop table t1;
 
31
 
 
32
# End of test