~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/suite/funcs_1/r/innodb_trig_03.result

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
USE test;
2
 
drop table if exists tb3 ;
 
2
drop table if exists tb3;
3
3
create table tb3 (
4
 
f118 char not null DEFAULT 'a', 
5
 
f119 char binary not null DEFAULT b'101', 
6
 
f120 char ascii not null DEFAULT b'101', 
7
 
f121 tinytext, 
8
 
f122 text, 
9
 
f123 mediumtext, 
10
 
f124 longtext unicode, 
11
 
f125 tinyblob, 
12
 
f126 blob, 
13
 
f127 mediumblob, 
14
 
f128 longblob, 
15
 
f129 binary not null DEFAULT b'101', 
16
 
f130 tinyint not null DEFAULT 99, 
17
 
f131 tinyint unsigned not null DEFAULT 99, 
18
 
f132 tinyint zerofill not null DEFAULT 99, 
19
 
f133 tinyint unsigned zerofill not null DEFAULT 99, 
20
 
f134 smallint not null DEFAULT 999, 
21
 
f135 smallint unsigned not null DEFAULT 999, 
22
 
f136 smallint zerofill not null DEFAULT 999,  
23
 
f137 smallint unsigned zerofill not null DEFAULT 999, 
24
 
f138 mediumint not null DEFAULT 9999, 
25
 
f139 mediumint unsigned not null DEFAULT 9999, 
26
 
f140 mediumint zerofill not null DEFAULT 9999, 
27
 
f141 mediumint unsigned zerofill not null DEFAULT 9999, 
28
 
f142 int not null DEFAULT 99999, 
29
 
f143 int unsigned not null DEFAULT 99999, 
30
 
f144 int zerofill not null DEFAULT 99999, 
31
 
f145 int unsigned zerofill not null DEFAULT 99999, 
32
 
f146 bigint not null DEFAULT 999999, 
33
 
f147 bigint unsigned not null DEFAULT 999999, 
34
 
f148 bigint zerofill not null DEFAULT 999999, 
35
 
f149 bigint unsigned zerofill not null DEFAULT 999999, 
36
 
f150 decimal not null DEFAULT 999.999, 
37
 
f151 decimal unsigned not null DEFAULT 999.17, 
38
 
f152 decimal zerofill not null DEFAULT 999.999, 
39
 
f153 decimal unsigned zerofill, 
40
 
f154 decimal (0), 
41
 
f155 decimal (64), 
42
 
f156 decimal (0) unsigned, 
43
 
f157 decimal (64) unsigned, 
44
 
f158 decimal (0) zerofill, 
45
 
f159 decimal (64) zerofill, 
46
 
f160 decimal (0) unsigned zerofill, 
47
 
f161 decimal (64) unsigned zerofill, 
48
 
f162 decimal (0,0), 
49
 
f163 decimal (63,30), 
50
 
f164 decimal (0,0) unsigned, 
51
 
f165 decimal (63,30) unsigned, 
52
 
f166 decimal (0,0) zerofill, 
53
 
f167 decimal (63,30) zerofill, 
54
 
f168 decimal (0,0) unsigned zerofill, 
55
 
f169 decimal (63,30) unsigned zerofill, 
56
 
f170 numeric, 
57
 
f171 numeric unsigned, 
58
 
f172 numeric zerofill, 
59
 
f173 numeric unsigned zerofill, 
60
 
f174 numeric (0), 
61
 
f175 numeric (64) 
62
 
) engine = innodb;
 
4
f118 char not null DEFAULT 'a',
 
5
f119 char binary not null DEFAULT b'101',
 
6
f120 char ascii not null DEFAULT b'101',
 
7
f121 char(50),
 
8
f122 char(50),
 
9
f129 binary not null DEFAULT b'101',
 
10
f130 tinyint not null DEFAULT 99,
 
11
f131 tinyint unsigned not null DEFAULT 99,
 
12
f132 tinyint zerofill not null DEFAULT 99,
 
13
f133 tinyint unsigned zerofill not null DEFAULT 99,
 
14
f134 smallint not null DEFAULT 999,
 
15
f135 smallint unsigned not null DEFAULT 999,
 
16
f136 smallint zerofill not null DEFAULT 999,
 
17
f137 smallint unsigned zerofill not null DEFAULT 999,
 
18
f138 mediumint not null DEFAULT 9999,
 
19
f139 mediumint unsigned not null DEFAULT 9999,
 
20
f140 mediumint zerofill not null DEFAULT 9999,
 
21
f141 mediumint unsigned zerofill not null DEFAULT 9999,
 
22
f142 int not null DEFAULT 99999,
 
23
f143 int unsigned not null DEFAULT 99999,
 
24
f144 int zerofill not null DEFAULT 99999,
 
25
f145 int unsigned zerofill not null DEFAULT 99999,
 
26
f146 bigint not null DEFAULT 999999,
 
27
f147 bigint unsigned not null DEFAULT 999999,
 
28
f148 bigint zerofill not null DEFAULT 999999,
 
29
f149 bigint unsigned zerofill not null DEFAULT 999999,
 
30
f150 decimal not null DEFAULT 999.999,
 
31
f151 decimal unsigned not null DEFAULT 999.17,
 
32
f152 decimal zerofill not null DEFAULT 999.999,
 
33
f153 decimal unsigned zerofill,
 
34
f154 decimal (0),
 
35
f155 decimal (64),
 
36
f156 decimal (0) unsigned,
 
37
f157 decimal (64) unsigned,
 
38
f158 decimal (0) zerofill,
 
39
f159 decimal (64) zerofill,
 
40
f160 decimal (0) unsigned zerofill,
 
41
f161 decimal (64) unsigned zerofill,
 
42
f162 decimal (0,0),
 
43
f163 decimal (63,30),
 
44
f164 decimal (0,0) unsigned,
 
45
f165 decimal (63,30) unsigned,
 
46
f166 decimal (0,0) zerofill,
 
47
f167 decimal (63,30) zerofill,
 
48
f168 decimal (0,0) unsigned zerofill,
 
49
f169 decimal (63,30) unsigned zerofill,
 
50
f170 numeric,
 
51
f171 numeric unsigned,
 
52
f172 numeric zerofill,
 
53
f173 numeric unsigned zerofill,
 
54
f174 numeric (0),
 
55
f175 numeric (64)
 
56
) engine = <engine_to_be_used>;
63
57
Warnings:
64
58
Note    1265    Data truncated for column 'f150' at row 1
65
59
Note    1265    Data truncated for column 'f151' at row 1
66
60
Note    1265    Data truncated for column 'f152' at row 1
67
 
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
68
61
 
69
62
Testcase 3.5.3:
70
63
---------------
71
64
drop database if exists priv_db;
72
65
create database priv_db;
73
66
use priv_db;
74
 
create table t1 (f1 char(20)) engine= innodb;
 
67
create table t1 (f1 char(20)) engine= <engine_to_be_used>;
75
68
create User test_noprivs@localhost;
76
69
set password for test_noprivs@localhost = password('PWD');
77
70
create User test_yesprivs@localhost;
103
96
use priv_db;
104
97
create trigger trg1_1 before INSERT on t1 for each row
105
98
set new.f1 = 'trig 3.5.3.2_1-no';
106
 
Got one of the listed errors
 
99
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
107
100
use priv_db;
108
101
insert into t1 (f1) values ('insert 3.5.3.2-no');
109
102
select f1 from t1 order by f1;
135
128
-----------------
136
129
use priv_db;
137
130
drop trigger trg1_2;
138
 
Got one of the listed errors
 
131
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
139
132
use priv_db;
140
133
insert into t1 (f1) values ('insert 3.5.3.6-yes');
141
134
select f1 from t1 order by f1;
607
600
use priv_db;
608
601
drop table if exists t1;
609
602
drop table if exists t2;
610
 
create table t1 (f1 int) engine= innodb;
611
 
create table t2 (f2 int) engine= innodb;
 
603
create table t1 (f1 int) engine= <engine_to_be_used>;
 
604
create table t2 (f2 int) engine= <engine_to_be_used>;
612
605
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
613
606
grant TRIGGER on *.* to test_yesprivs@localhost;
614
607
grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
697
690
drop user test_yesprivs@localhost;
698
691
drop user test_noprivs@localhost;
699
692
drop user test_noprivs;
700
 
DROP TABLE test.tb3;
 
693
use test;
 
694
drop table tb3;