Merge lp:~vkolesnikov/pbxt/pbxt-10_02_2010-stable into lp:pbxt

Proposed by Vladimir Kolesnikov
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-10_02_2010-stable
Merge into: lp:pbxt
Diff against target: 263 lines (+3/-229)
4 files modified
test/mysql-test/pbxt-test-run.pl (+2/-1)
test/mysql-test/r/func_group.result (+1/-1)
test/mysql-test/r/sp-destruct.result (+0/-83)
test/mysql-test/t/sp-destruct.test (+0/-144)
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-10_02_2010-stable
Reviewer Review Type Date Requested Status
PBXT Core Pending
Review via email: mp+19014@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :

Fixed some tests that failed because of MySQL changes. Removed a stored-procedure test that was irrelevant to PBXT and failed because of changes in MySQL. Update pbxt-test-run.pl to not to use a security option (secure-file-priv) that prevented some tests from LOAD DATA INFILE.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'test/mysql-test/pbxt-test-run.pl'
--- test/mysql-test/pbxt-test-run.pl 2009-12-21 16:41:09 +0000
+++ test/mysql-test/pbxt-test-run.pl 2010-02-10 14:42:13 +0000
@@ -3911,7 +3911,8 @@
3911 if ( $mysql_version_id >= 50036)3911 if ( $mysql_version_id >= 50036)
3912 {3912 {
3913 # By default, prevent the started mysqld to access files outside of vardir3913 # By default, prevent the started mysqld to access files outside of vardir
3914 mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $opt_vardir);3914 # doesn't work with MySQL 5.1.42
3915 #mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $opt_vardir);
3915 }3916 }
39163917
3917 if ( $mysql_version_id >= 50000 )3918 if ( $mysql_version_id >= 50000 )
39183919
=== modified file 'test/mysql-test/r/func_group.result'
--- test/mysql-test/r/func_group.result 2009-12-16 12:45:36 +0000
+++ test/mysql-test/r/func_group.result 2010-02-10 14:42:13 +0000
@@ -885,7 +885,7 @@
88538853
886select cast(min(df) as signed) from t1;886select cast(min(df) as signed) from t1;
887cast(min(df) as signed)887cast(min(df) as signed)
88808881
889select 1e8 * sum(distinct df) from t1;889select 1e8 * sum(distinct df) from t1;
8901e8 * sum(distinct df)8901e8 * sum(distinct df)
891330000000891330000000
892892
=== removed file 'test/mysql-test/r/sp-destruct.result'
--- test/mysql-test/r/sp-destruct.result 2008-03-10 11:36:34 +0000
+++ test/mysql-test/r/sp-destruct.result 1970-01-01 00:00:00 +0000
@@ -1,83 +0,0 @@
1use test;
2drop procedure if exists bug14233;
3drop function if exists bug14233;
4drop table if exists t1;
5drop view if exists v1;
6create procedure bug14233()
7set @x = 42;
8create function bug14233_f() returns int
9return 42;
10create table t1 (id int);
11create trigger t1_ai after insert on t1 for each row call bug14233();
12alter table mysql.proc drop type;
13call bug14233();
14ERROR HY000: Failed to load routine test.bug14233. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
15create view v1 as select bug14233_f();
16ERROR HY000: Failed to load routine test.bug14233_f. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
17insert into t1 values (0);
18ERROR HY000: Failed to load routine test.bug14233. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
19flush table mysql.proc;
20call bug14233();
21ERROR HY000: Incorrect information in file: './mysql/proc.frm'
22create view v1 as select bug14233_f();
23ERROR HY000: Incorrect information in file: './mysql/proc.frm'
24insert into t1 values (0);
25ERROR HY000: Incorrect information in file: './mysql/proc.frm'
26flush table mysql.proc;
27call bug14233();
28ERROR 42S02: Table 'mysql.proc' doesn't exist
29create view v1 as select bug14233_f();
30ERROR 42S02: Table 'mysql.proc' doesn't exist
31insert into t1 values (0);
32ERROR 42S02: Table 'mysql.proc' doesn't exist
33flush table mysql.proc;
34flush privileges;
35delete from mysql.proc where name like 'bug14233%';
36insert into mysql.proc
37(
38db, name, type, specific_name, language, sql_data_access, is_deterministic,
39security_type, param_list, returns, body, definer, created, modified,
40sql_mode, comment
41)
42values
43(
44'test', 'bug14233_1', 'FUNCTION', 'bug14233_1', 'SQL', 'READS_SQL_DATA', 'NO',
45'DEFINER', '', 'int(10)',
46'select count(*) from mysql.user',
47'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
48),
49(
50'test', 'bug14233_2', 'FUNCTION', 'bug14233_2', 'SQL', 'READS_SQL_DATA', 'NO',
51'DEFINER', '', 'int(10)',
52'begin declare x int; select count(*) into x from mysql.user; end',
53'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
54),
55(
56'test', 'bug14233_3', 'PROCEDURE', 'bug14233_3', 'SQL', 'READS_SQL_DATA','NO',
57'DEFINER', '', '',
58'alksj wpsj sa ^#!@ ',
59'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
60);
61select bug14233_1();
62ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
63create view v1 as select bug14233_1();
64ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
65select bug14233_2();
66ERROR HY000: Failed to load routine test.bug14233_2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
67create view v1 as select bug14233_2();
68ERROR HY000: Failed to load routine test.bug14233_2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
69call bug14233_3();
70ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
71drop trigger t1_ai;
72create trigger t1_ai after insert on t1 for each row call bug14233_3();
73insert into t1 values (0);
74ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
75drop trigger t1_ai;
76drop table t1;
77drop function bug14233_1;
78drop function bug14233_2;
79drop procedure bug14233_3;
80show procedure status;
81Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
82show function status;
83Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
840
=== removed file 'test/mysql-test/t/sp-destruct.test'
--- test/mysql-test/t/sp-destruct.test 2006-10-23 09:14:04 +0000
+++ test/mysql-test/t/sp-destruct.test 1970-01-01 00:00:00 +0000
@@ -1,144 +0,0 @@
1#
2# Destructive stored procedure tests
3#
4# We do horrible things to the mysql.proc table here, so any unexpected
5# failures here might leave it in an undetermined state.
6#
7# In the case of trouble you might want to skip this.
8#
9
10# embedded server returns different paths in error messages
11# in lines like 'call bug14233();'
12# mysqltest should be fixed to allow REPLACE_RESULT in error message
13-- source include/not_embedded.inc
14
15# We're using --system things that probably doesn't work on Windows.
16--source include/not_windows.inc
17
18# Backup proc table
19--system rm -rf $MYSQLTEST_VARDIR/master-data/mysql/backup
20--system mkdir $MYSQLTEST_VARDIR/master-data/mysql/backup
21--system cp $MYSQLTEST_VARDIR/master-data/mysql/proc.* $MYSQLTEST_VARDIR/master-data/mysql/backup/
22
23use test;
24
25--disable_warnings
26drop procedure if exists bug14233;
27drop function if exists bug14233;
28drop table if exists t1;
29drop view if exists v1;
30--enable_warnings
31
32create procedure bug14233()
33 set @x = 42;
34
35create function bug14233_f() returns int
36 return 42;
37
38create table t1 (id int);
39create trigger t1_ai after insert on t1 for each row call bug14233();
40
41# Unsupported tampering with the mysql.proc definition
42alter table mysql.proc drop type;
43--replace_result $MYSQL_TEST_DIR .
44--error ER_SP_PROC_TABLE_CORRUPT
45call bug14233();
46--replace_result $MYSQL_TEST_DIR .
47--error ER_SP_PROC_TABLE_CORRUPT
48create view v1 as select bug14233_f();
49--replace_result $MYSQL_TEST_DIR .
50--error ER_SP_PROC_TABLE_CORRUPT
51insert into t1 values (0);
52
53flush table mysql.proc;
54
55# Thrashing the .frm file
56--system echo 'saljdlfa' > $MYSQLTEST_VARDIR/master-data/mysql/proc.frm
57--replace_result $MYSQLTEST_VARDIR . master-data// ''
58--error ER_NOT_FORM_FILE
59call bug14233();
60--replace_result $MYSQLTEST_VARDIR . master-data// ''
61--error ER_NOT_FORM_FILE
62create view v1 as select bug14233_f();
63--replace_result $MYSQLTEST_VARDIR . master-data// ''
64--error ER_NOT_FORM_FILE
65insert into t1 values (0);
66
67
68flush table mysql.proc;
69
70# Drop the mysql.proc table
71--system rm $MYSQLTEST_VARDIR/master-data/mysql/proc.*
72--error ER_NO_SUCH_TABLE
73call bug14233();
74--error ER_NO_SUCH_TABLE
75create view v1 as select bug14233_f();
76--error ER_NO_SUCH_TABLE
77insert into t1 values (0);
78
79# Restore mysql.proc
80--system mv $MYSQLTEST_VARDIR/master-data/mysql/backup/* $MYSQLTEST_VARDIR/master-data/mysql/
81--system rmdir $MYSQLTEST_VARDIR/master-data/mysql/backup
82
83flush table mysql.proc;
84flush privileges;
85
86delete from mysql.proc where name like 'bug14233%';
87
88# Unsupported editing of mysql.proc, circumventing checks in "create ..."
89insert into mysql.proc
90(
91 db, name, type, specific_name, language, sql_data_access, is_deterministic,
92 security_type, param_list, returns, body, definer, created, modified,
93 sql_mode, comment
94)
95values
96(
97 'test', 'bug14233_1', 'FUNCTION', 'bug14233_1', 'SQL', 'READS_SQL_DATA', 'NO',
98 'DEFINER', '', 'int(10)',
99 'select count(*) from mysql.user',
100 'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
101),
102(
103 'test', 'bug14233_2', 'FUNCTION', 'bug14233_2', 'SQL', 'READS_SQL_DATA', 'NO',
104 'DEFINER', '', 'int(10)',
105 'begin declare x int; select count(*) into x from mysql.user; end',
106 'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
107),
108(
109 'test', 'bug14233_3', 'PROCEDURE', 'bug14233_3', 'SQL', 'READS_SQL_DATA','NO',
110 'DEFINER', '', '',
111 'alksj wpsj sa ^#!@ ',
112 'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
113);
114
115--error ER_SP_PROC_TABLE_CORRUPT
116select bug14233_1();
117--error ER_SP_PROC_TABLE_CORRUPT
118create view v1 as select bug14233_1();
119
120--error ER_SP_PROC_TABLE_CORRUPT
121select bug14233_2();
122--error ER_SP_PROC_TABLE_CORRUPT
123create view v1 as select bug14233_2();
124
125--error ER_SP_PROC_TABLE_CORRUPT
126call bug14233_3();
127drop trigger t1_ai;
128create trigger t1_ai after insert on t1 for each row call bug14233_3();
129--error ER_SP_PROC_TABLE_CORRUPT
130insert into t1 values (0);
131
132# Clean-up
133drop trigger t1_ai;
134drop table t1;
135
136#
137# BUG#16303: erroneus stored procedures and functions should be droppable
138#
139drop function bug14233_1;
140drop function bug14233_2;
141drop procedure bug14233_3;
142# Assert: These should show nothing.
143show procedure status;
144show function status;

Subscribers

People subscribed via source and target branches