mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for
Bug#35335 funcs_1: Some tests fail within load_file during pushbuild runs Solution: 1. Move files with input data used in load_file, load data etc. from suite/funcs_1/<whatever> to std_data 2. Use for testsuite funcs_1 the server option --secure-file-priv=<MYSQLTEST_VARDIR> 3. Outfiles have to be stored under MYSQLTEST_VARDIR + changes according to WL#4304 Cleanup in funcs_1 tests - backport of fixes/improvements made in 5.1 to 5.0 The differences between scripts in 5.0 and 5.1 cause much additional and annoying work during any upmerge. - replace error numbers with names - improved comments - improved formatting - Unify storage engine names so that result files for storage engine variants do not differ (some tests) - remove a script no more used (tests are done in other scripts) BitKeeper/deleted/.del-triggers_master.test: Delete: mysql-test/suite/funcs_1/triggers/triggers_master.test mysql-test/std_data/funcs_1/innodb_tb1.txt: Rename: mysql-test/suite/funcs_1/data/innodb_tb1.txt -> mysql-test/std_data/funcs_1/innodb_tb1.txt mysql-test/std_data/funcs_1/innodb_tb2.txt: Rename: mysql-test/suite/funcs_1/data/innodb_tb2.txt -> mysql-test/std_data/funcs_1/innodb_tb2.txt mysql-test/std_data/funcs_1/innodb_tb3.txt: Rename: mysql-test/suite/funcs_1/data/innodb_tb3.txt -> mysql-test/std_data/funcs_1/innodb_tb3.txt mysql-test/std_data/funcs_1/innodb_tb4.txt: Rename: mysql-test/suite/funcs_1/data/innodb_tb4.txt -> mysql-test/std_data/funcs_1/innodb_tb4.txt mysql-test/std_data/funcs_1/memory_tb1.txt: Rename: mysql-test/suite/funcs_1/data/memory_tb1.txt -> mysql-test/std_data/funcs_1/memory_tb1.txt mysql-test/std_data/funcs_1/memory_tb2.txt: Rename: mysql-test/suite/funcs_1/data/memory_tb2.txt -> mysql-test/std_data/funcs_1/memory_tb2.txt mysql-test/std_data/funcs_1/memory_tb3.txt: Rename: mysql-test/suite/funcs_1/data/memory_tb3.txt -> mysql-test/std_data/funcs_1/memory_tb3.txt mysql-test/std_data/funcs_1/memory_tb4.txt: Rename: mysql-test/suite/funcs_1/data/memory_tb4.txt -> mysql-test/std_data/funcs_1/memory_tb4.txt mysql-test/std_data/funcs_1/myisam_tb1.txt: Rename: mysql-test/suite/funcs_1/data/myisam_tb1.txt -> mysql-test/std_data/funcs_1/myisam_tb1.txt mysql-test/std_data/funcs_1/myisam_tb2.txt: Rename: mysql-test/suite/funcs_1/data/myisam_tb2.txt -> mysql-test/std_data/funcs_1/myisam_tb2.txt mysql-test/std_data/funcs_1/myisam_tb3.txt: Rename: mysql-test/suite/funcs_1/data/myisam_tb3.txt -> mysql-test/std_data/funcs_1/myisam_tb3.txt mysql-test/std_data/funcs_1/myisam_tb4.txt: Rename: mysql-test/suite/funcs_1/data/myisam_tb4.txt -> mysql-test/std_data/funcs_1/myisam_tb4.txt mysql-test/std_data/funcs_1/t3.txt: Rename: mysql-test/suite/funcs_1/data/t3.txt -> mysql-test/std_data/funcs_1/t3.txt mysql-test/std_data/funcs_1/t4.txt: Rename: mysql-test/suite/funcs_1/data/t4.txt -> mysql-test/std_data/funcs_1/t4.txt mysql-test/std_data/funcs_1/t7.txt: Rename: mysql-test/suite/funcs_1/data/t7.txt -> mysql-test/std_data/funcs_1/t7.txt mysql-test/std_data/funcs_1/t9.txt: Rename: mysql-test/suite/funcs_1/data/t9.txt -> mysql-test/std_data/funcs_1/t9.txt mysql-test/Makefile.am: Introduce installation of funcs_1 files in std_data. mysql-test/mysql-test-run.pl: The tests within funcs_1 need a server started with --secure-file-priv=<MYSQLTEST_VARDIR> like the main regression tests. mysql-test/suite/funcs_1/README.txt: Extended description mysql-test/suite/funcs_1/datadict/datadict_bug_12777.inc: Cleanup mysql-test/suite/funcs_1/datadict/datadict_load.inc: Cleanup mysql-test/suite/funcs_1/include/innodb_tb1.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/innodb_tb2.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/innodb_tb3.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/innodb_tb4.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/memory_tb1.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/memory_tb2.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/memory_tb3.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/memory_tb4.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/myisam_tb1.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/myisam_tb2.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/myisam_tb3.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/myisam_tb4.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/include/sp_tb.inc: Adjustment to new storage place of infile. mysql-test/suite/funcs_1/r/innodb_func_view.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_02.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_03.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_06.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_07.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_08.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_10.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_0102.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_03.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_0407.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_08.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_09.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_frkey.result: Updated results mysql-test/suite/funcs_1/r/innodb_views.result: Updated results mysql-test/suite/funcs_1/r/is_columns_innodb.result: Updated results mysql-test/suite/funcs_1/r/is_columns_memory.result: Updated results mysql-test/suite/funcs_1/r/is_columns_myisam.result: Updated results mysql-test/suite/funcs_1/r/is_columns_ndb.result: Updated results mysql-test/suite/funcs_1/r/is_tables_innodb.result: Updated results mysql-test/suite/funcs_1/r/is_tables_memory.result: Updated results mysql-test/suite/funcs_1/r/is_tables_myisam.result: Updated results mysql-test/suite/funcs_1/r/is_tables_ndb.result: Updated results mysql-test/suite/funcs_1/r/memory_func_view.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_02.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_03.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_06.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_07.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_08.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_10.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_0102.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_03.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_0407.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_08.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_09.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_1011ext.result: Updated results mysql-test/suite/funcs_1/r/memory_views.result: Updated results mysql-test/suite/funcs_1/r/myisam_func_view.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_02.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_03.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_06.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_07.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_08.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_10.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_0102.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_03.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_0407.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_08.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_09.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result: Updated results mysql-test/suite/funcs_1/r/myisam_views.result: Updated results mysql-test/suite/funcs_1/storedproc/cleanup_sp_tb.inc: "--echo" instead of SQL command. mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc: Adjustment to new storage place of infile + correct formatting. mysql-test/suite/funcs_1/storedproc/storedproc_02.inc: Backport from 5.1 + correct formatting. mysql-test/suite/funcs_1/storedproc/storedproc_03.inc: Minor improvements + correct formatting. mysql-test/suite/funcs_1/storedproc/storedproc_06.inc: Backport from 5.1 + correct formatting mysql-test/suite/funcs_1/storedproc/storedproc_10.inc: Backport from 5.1. + correct formatting mysql-test/suite/funcs_1/t/innodb_trig_0407.test: Cleanup mysql-test/suite/funcs_1/t/is_basics_mixed.test: Adjustment to new storage place of outfile. mysql-test/suite/funcs_1/t/memory_storedproc_02.test: Cleanup mysql-test/suite/funcs_1/t/memory_storedproc_03.test: Cleanup mysql-test/suite/funcs_1/t/memory_storedproc_06.test: Cleanup mysql-test/suite/funcs_1/t/memory_storedproc_07.test: Cleanup mysql-test/suite/funcs_1/t/memory_storedproc_08.test: Cleanup mysql-test/suite/funcs_1/t/memory_storedproc_10.test: Cleanup mysql-test/suite/funcs_1/t/myisam_storedproc_02.test: Cleanup mysql-test/suite/funcs_1/t/myisam_storedproc_03.test: Cleanup mysql-test/suite/funcs_1/t/myisam_storedproc_06.test: Cleanup mysql-test/suite/funcs_1/t/myisam_storedproc_07.test: Cleanup mysql-test/suite/funcs_1/t/myisam_storedproc_08.test: Cleanup mysql-test/suite/funcs_1/t/myisam_storedproc_10.test: Cleanup mysql-test/suite/funcs_1/triggers/trig_frkey2.inc: Cleanup mysql-test/suite/funcs_1/triggers/triggers_0102.inc: Cleanup mysql-test/suite/funcs_1/triggers/triggers_03.inc: Backport from 5.1 mysql-test/suite/funcs_1/triggers/triggers_0407.inc: Backport from 5.1 mysql-test/suite/funcs_1/triggers/triggers_08.inc: Backport from 5.1 mysql-test/suite/funcs_1/triggers/triggers_09.inc: Backport from 5.1 mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc: Backport from 5.1 mysql-test/suite/funcs_1/views/func_view.inc: Backport from 5.1 mysql-test/suite/funcs_1/views/views_master.inc: Cleanup mysql-test/std_data/funcs_1/load_file.txt: New BitKeeper file ``mysql-test/std_data/funcs_1/load_file.txt''
This commit is contained in:
@ -1,70 +1,71 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase 3.5.3:
|
||||
---------------
|
||||
@ -106,7 +107,7 @@ set new.f1 = 'trig 3.5.3.2_1-no';
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-no');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
select current_user;
|
||||
@ -121,15 +122,12 @@ root@localhost
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
|
||||
note: once 15166 is fixed a similar case for SELECT needs to be added
|
||||
---------------------------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
@ -141,7 +139,7 @@ drop trigger trg1_2;
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-yes');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
@ -150,12 +148,12 @@ use priv_db;
|
||||
drop trigger trg1_2;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-no');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg1_2;
|
||||
|
||||
Testcase 3.5.3.7a:
|
||||
@ -180,23 +178,22 @@ use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
create trigger trg4a_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1a';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1a');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg4a_1;
|
||||
use priv_db;
|
||||
select current_user;
|
||||
@ -207,18 +204,13 @@ Grants for test_yesprivs@localhost
|
||||
GRANT UPDATE, SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
create trigger trg4a_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2a';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on *.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
drop trigger trg4a_2;
|
||||
|
||||
@ -245,30 +237,29 @@ Grants for test_noprivs@localhost
|
||||
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4b_1 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1b';
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
insert 3.5.3.7-1b
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b';
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_1;
|
||||
ERROR HY000: Trigger does not exist
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
@ -276,32 +267,26 @@ GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4b_2 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2b';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on priv_db.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
insert 3.5.3.7-2b
|
||||
update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
|
||||
select f1 from t1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_2;
|
||||
|
||||
Testcase 3.5.3.7c
|
||||
@ -327,21 +312,19 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4c_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1c');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
@ -350,23 +333,17 @@ GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4c_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2c';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2c');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_2;
|
||||
|
||||
Testcase 3.5.3.7d:
|
||||
@ -390,23 +367,20 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4d_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1d');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
insert 3.5.3.7-1d
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
@ -415,25 +389,18 @@ GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4d_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2d';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2d');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
insert 3.5.3.7-1d
|
||||
trig 3.5.3.7-2d
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_2;
|
||||
|
||||
Testcase 3.5.3.8a:
|
||||
@ -458,14 +425,14 @@ use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5a_1 before INSERT on t1 for each row
|
||||
set @test_var = new.f1;
|
||||
set @test_var = 'before trig 3.5.3.8-1a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1a');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
@ -483,10 +450,6 @@ set @test_var= 'before trig 3.5.3.8-2a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2a
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on *.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2a');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -517,15 +480,15 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5b_1 before UPDATE on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-1b';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b';
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
@ -542,10 +505,6 @@ insert into t1 (f1) values ('insert 3.5.3.8-2b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2b
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on priv_db.* to test_yesprivs@localhost;
|
||||
update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b';
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -576,11 +535,11 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5c_1 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-1c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1c');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1c
|
||||
@ -593,10 +552,6 @@ use priv_db;
|
||||
create trigger trg5c_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2c';
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2c');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -626,11 +581,11 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5d_1 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-1d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1d');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1d
|
||||
@ -643,10 +598,6 @@ use priv_db;
|
||||
create trigger trg5d_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2d';
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2d');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -682,10 +633,10 @@ ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (4);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
select f2 from t2;
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
4
|
||||
use priv_db;
|
||||
@ -698,11 +649,11 @@ ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (2);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
2
|
||||
select f2 from t2;
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
use priv_db;
|
||||
@ -715,12 +666,12 @@ ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
2
|
||||
1
|
||||
select f2 from t2;
|
||||
2
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
select @aaa;
|
||||
@ -736,13 +687,13 @@ ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
1
|
||||
1
|
||||
2
|
||||
1
|
||||
1
|
||||
select f2 from t2;
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
drop database if exists priv_db;
|
||||
drop user test_yesprivs@localhost;
|
||||
|
Reference in New Issue
Block a user