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
1=== modified file 'test/mysql-test/pbxt-test-run.pl'
2--- test/mysql-test/pbxt-test-run.pl 2009-12-21 16:41:09 +0000
3+++ test/mysql-test/pbxt-test-run.pl 2010-02-10 14:42:13 +0000
4@@ -3911,7 +3911,8 @@
5 if ( $mysql_version_id >= 50036)
6 {
7 # By default, prevent the started mysqld to access files outside of vardir
8- mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $opt_vardir);
9+ # doesn't work with MySQL 5.1.42
10+ #mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $opt_vardir);
11 }
12
13 if ( $mysql_version_id >= 50000 )
14
15=== modified file 'test/mysql-test/r/func_group.result'
16--- test/mysql-test/r/func_group.result 2009-12-16 12:45:36 +0000
17+++ test/mysql-test/r/func_group.result 2010-02-10 14:42:13 +0000
18@@ -885,7 +885,7 @@
19 3
20 select cast(min(df) as signed) from t1;
21 cast(min(df) as signed)
22-0
23+1
24 select 1e8 * sum(distinct df) from t1;
25 1e8 * sum(distinct df)
26 330000000
27
28=== removed file 'test/mysql-test/r/sp-destruct.result'
29--- test/mysql-test/r/sp-destruct.result 2008-03-10 11:36:34 +0000
30+++ test/mysql-test/r/sp-destruct.result 1970-01-01 00:00:00 +0000
31@@ -1,83 +0,0 @@
32-use test;
33-drop procedure if exists bug14233;
34-drop function if exists bug14233;
35-drop table if exists t1;
36-drop view if exists v1;
37-create procedure bug14233()
38-set @x = 42;
39-create function bug14233_f() returns int
40-return 42;
41-create table t1 (id int);
42-create trigger t1_ai after insert on t1 for each row call bug14233();
43-alter table mysql.proc drop type;
44-call bug14233();
45-ERROR HY000: Failed to load routine test.bug14233. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
46-create view v1 as select bug14233_f();
47-ERROR HY000: Failed to load routine test.bug14233_f. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
48-insert into t1 values (0);
49-ERROR HY000: Failed to load routine test.bug14233. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
50-flush table mysql.proc;
51-call bug14233();
52-ERROR HY000: Incorrect information in file: './mysql/proc.frm'
53-create view v1 as select bug14233_f();
54-ERROR HY000: Incorrect information in file: './mysql/proc.frm'
55-insert into t1 values (0);
56-ERROR HY000: Incorrect information in file: './mysql/proc.frm'
57-flush table mysql.proc;
58-call bug14233();
59-ERROR 42S02: Table 'mysql.proc' doesn't exist
60-create view v1 as select bug14233_f();
61-ERROR 42S02: Table 'mysql.proc' doesn't exist
62-insert into t1 values (0);
63-ERROR 42S02: Table 'mysql.proc' doesn't exist
64-flush table mysql.proc;
65-flush privileges;
66-delete from mysql.proc where name like 'bug14233%';
67-insert into mysql.proc
68-(
69-db, name, type, specific_name, language, sql_data_access, is_deterministic,
70-security_type, param_list, returns, body, definer, created, modified,
71-sql_mode, comment
72-)
73-values
74-(
75-'test', 'bug14233_1', 'FUNCTION', 'bug14233_1', 'SQL', 'READS_SQL_DATA', 'NO',
76-'DEFINER', '', 'int(10)',
77-'select count(*) from mysql.user',
78-'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
79-),
80-(
81-'test', 'bug14233_2', 'FUNCTION', 'bug14233_2', 'SQL', 'READS_SQL_DATA', 'NO',
82-'DEFINER', '', 'int(10)',
83-'begin declare x int; select count(*) into x from mysql.user; end',
84-'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
85-),
86-(
87-'test', 'bug14233_3', 'PROCEDURE', 'bug14233_3', 'SQL', 'READS_SQL_DATA','NO',
88-'DEFINER', '', '',
89-'alksj wpsj sa ^#!@ ',
90-'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
91-);
92-select bug14233_1();
93-ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
94-create view v1 as select bug14233_1();
95-ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
96-select bug14233_2();
97-ERROR HY000: Failed to load routine test.bug14233_2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
98-create view v1 as select bug14233_2();
99-ERROR HY000: Failed to load routine test.bug14233_2. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
100-call bug14233_3();
101-ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
102-drop trigger t1_ai;
103-create trigger t1_ai after insert on t1 for each row call bug14233_3();
104-insert into t1 values (0);
105-ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
106-drop trigger t1_ai;
107-drop table t1;
108-drop function bug14233_1;
109-drop function bug14233_2;
110-drop procedure bug14233_3;
111-show procedure status;
112-Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
113-show function status;
114-Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
115
116=== removed file 'test/mysql-test/t/sp-destruct.test'
117--- test/mysql-test/t/sp-destruct.test 2006-10-23 09:14:04 +0000
118+++ test/mysql-test/t/sp-destruct.test 1970-01-01 00:00:00 +0000
119@@ -1,144 +0,0 @@
120-#
121-# Destructive stored procedure tests
122-#
123-# We do horrible things to the mysql.proc table here, so any unexpected
124-# failures here might leave it in an undetermined state.
125-#
126-# In the case of trouble you might want to skip this.
127-#
128-
129-# embedded server returns different paths in error messages
130-# in lines like 'call bug14233();'
131-# mysqltest should be fixed to allow REPLACE_RESULT in error message
132--- source include/not_embedded.inc
133-
134-# We're using --system things that probably doesn't work on Windows.
135---source include/not_windows.inc
136-
137-# Backup proc table
138---system rm -rf $MYSQLTEST_VARDIR/master-data/mysql/backup
139---system mkdir $MYSQLTEST_VARDIR/master-data/mysql/backup
140---system cp $MYSQLTEST_VARDIR/master-data/mysql/proc.* $MYSQLTEST_VARDIR/master-data/mysql/backup/
141-
142-use test;
143-
144---disable_warnings
145-drop procedure if exists bug14233;
146-drop function if exists bug14233;
147-drop table if exists t1;
148-drop view if exists v1;
149---enable_warnings
150-
151-create procedure bug14233()
152- set @x = 42;
153-
154-create function bug14233_f() returns int
155- return 42;
156-
157-create table t1 (id int);
158-create trigger t1_ai after insert on t1 for each row call bug14233();
159-
160-# Unsupported tampering with the mysql.proc definition
161-alter table mysql.proc drop type;
162---replace_result $MYSQL_TEST_DIR .
163---error ER_SP_PROC_TABLE_CORRUPT
164-call bug14233();
165---replace_result $MYSQL_TEST_DIR .
166---error ER_SP_PROC_TABLE_CORRUPT
167-create view v1 as select bug14233_f();
168---replace_result $MYSQL_TEST_DIR .
169---error ER_SP_PROC_TABLE_CORRUPT
170-insert into t1 values (0);
171-
172-flush table mysql.proc;
173-
174-# Thrashing the .frm file
175---system echo 'saljdlfa' > $MYSQLTEST_VARDIR/master-data/mysql/proc.frm
176---replace_result $MYSQLTEST_VARDIR . master-data// ''
177---error ER_NOT_FORM_FILE
178-call bug14233();
179---replace_result $MYSQLTEST_VARDIR . master-data// ''
180---error ER_NOT_FORM_FILE
181-create view v1 as select bug14233_f();
182---replace_result $MYSQLTEST_VARDIR . master-data// ''
183---error ER_NOT_FORM_FILE
184-insert into t1 values (0);
185-
186-
187-flush table mysql.proc;
188-
189-# Drop the mysql.proc table
190---system rm $MYSQLTEST_VARDIR/master-data/mysql/proc.*
191---error ER_NO_SUCH_TABLE
192-call bug14233();
193---error ER_NO_SUCH_TABLE
194-create view v1 as select bug14233_f();
195---error ER_NO_SUCH_TABLE
196-insert into t1 values (0);
197-
198-# Restore mysql.proc
199---system mv $MYSQLTEST_VARDIR/master-data/mysql/backup/* $MYSQLTEST_VARDIR/master-data/mysql/
200---system rmdir $MYSQLTEST_VARDIR/master-data/mysql/backup
201-
202-flush table mysql.proc;
203-flush privileges;
204-
205-delete from mysql.proc where name like 'bug14233%';
206-
207-# Unsupported editing of mysql.proc, circumventing checks in "create ..."
208-insert into mysql.proc
209-(
210- db, name, type, specific_name, language, sql_data_access, is_deterministic,
211- security_type, param_list, returns, body, definer, created, modified,
212- sql_mode, comment
213-)
214-values
215-(
216- 'test', 'bug14233_1', 'FUNCTION', 'bug14233_1', 'SQL', 'READS_SQL_DATA', 'NO',
217- 'DEFINER', '', 'int(10)',
218- 'select count(*) from mysql.user',
219- 'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
220-),
221-(
222- 'test', 'bug14233_2', 'FUNCTION', 'bug14233_2', 'SQL', 'READS_SQL_DATA', 'NO',
223- 'DEFINER', '', 'int(10)',
224- 'begin declare x int; select count(*) into x from mysql.user; end',
225- 'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
226-),
227-(
228- 'test', 'bug14233_3', 'PROCEDURE', 'bug14233_3', 'SQL', 'READS_SQL_DATA','NO',
229- 'DEFINER', '', '',
230- 'alksj wpsj sa ^#!@ ',
231- 'root@localhost', NOW() , '0000-00-00 00:00:00', '', ''
232-);
233-
234---error ER_SP_PROC_TABLE_CORRUPT
235-select bug14233_1();
236---error ER_SP_PROC_TABLE_CORRUPT
237-create view v1 as select bug14233_1();
238-
239---error ER_SP_PROC_TABLE_CORRUPT
240-select bug14233_2();
241---error ER_SP_PROC_TABLE_CORRUPT
242-create view v1 as select bug14233_2();
243-
244---error ER_SP_PROC_TABLE_CORRUPT
245-call bug14233_3();
246-drop trigger t1_ai;
247-create trigger t1_ai after insert on t1 for each row call bug14233_3();
248---error ER_SP_PROC_TABLE_CORRUPT
249-insert into t1 values (0);
250-
251-# Clean-up
252-drop trigger t1_ai;
253-drop table t1;
254-
255-#
256-# BUG#16303: erroneus stored procedures and functions should be droppable
257-#
258-drop function bug14233_1;
259-drop function bug14233_2;
260-drop procedure bug14233_3;
261-# Assert: These should show nothing.
262-show procedure status;
263-show function status;

Subscribers

People subscribed via source and target branches