~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/parts/r/partition_decimal_innodb.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
create table t1 (a decimal(10,4) not null, primary key(a)) engine='InnoDB' 
 
2
partition by key (a) (
 
3
partition pa1 max_rows=20 min_rows=2,
 
4
partition pa2 max_rows=30 min_rows=3,
 
5
partition pa3 max_rows=30 min_rows=4,
 
6
partition pa4 max_rows=40 min_rows=2);
 
7
show create table t1;
 
8
Table   Create Table
 
9
t1      CREATE TABLE `t1` (
 
10
  `a` decimal(10,4) NOT NULL,
 
11
  PRIMARY KEY (`a`)
 
12
) ENGINE=InnoDB DEFAULT CHARSET=latin1
 
13
/*!50100 PARTITION BY KEY (a)
 
14
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
 
15
 PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
 
16
 PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
 
17
 PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
 
18
insert into t1 values (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567);
 
19
select * from t1;
 
20
a
 
21
-999999.9999
 
22
-123456.7899
 
23
-1234.5670
 
24
-1.5000
 
25
-1.0000
 
26
0.0000
 
27
1.0000
 
28
1.5000
 
29
1234.5670
 
30
123456.7899
 
31
999999.9999
 
32
select * from t1 where a=1234.567;
 
33
a
 
34
1234.5670
 
35
delete from t1 where a=1234.567;
 
36
select * from t1;
 
37
a
 
38
-999999.9999
 
39
-123456.7899
 
40
-1234.5670
 
41
-1.5000
 
42
-1.0000
 
43
0.0000
 
44
1.0000
 
45
1.5000
 
46
123456.7899
 
47
999999.9999
 
48
drop table t1;
 
49
create table t2 (a decimal(18,9) not null, primary key(a)) engine='InnoDB' 
 
50
partition by key (a) partitions 10;
 
51
show create table t2;
 
52
Table   Create Table
 
53
t2      CREATE TABLE `t2` (
 
54
  `a` decimal(18,9) NOT NULL,
 
55
  PRIMARY KEY (`a`)
 
56
) ENGINE=InnoDB DEFAULT CHARSET=latin1
 
57
/*!50100 PARTITION BY KEY (a)
 
58
PARTITIONS 10 */
 
59
insert into t2 values (999999999.999999999), (-999999999.999999999), (-1.5), (-1), (0), (1.5), (1234.567), (-1234.567);
 
60
select * from t2;
 
61
a
 
62
-999999999.999999999
 
63
-1234.567000000
 
64
-1.500000000
 
65
-1.000000000
 
66
0.000000000
 
67
1.500000000
 
68
1234.567000000
 
69
999999999.999999999
 
70
select * from t2 where a=1234.567;
 
71
a
 
72
1234.567000000
 
73
delete from t2 where a=1234.567;
 
74
select * from t2;
 
75
a
 
76
-999999999.999999999
 
77
-1234.567000000
 
78
-1.500000000
 
79
-1.000000000
 
80
0.000000000
 
81
1.500000000
 
82
999999999.999999999
 
83
delete from t2;
 
84
1024*3 inserts;
 
85
select count(*) from t2;
 
86
count(*)
 
87
3072
 
88
drop table t2;