~jlukas79/+junk/mysql-server

« back to all changes in this revision

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