mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Follow-up for BUG#14233 fix. Changed backup method for the mysql.proc table
in sp-destruct.test since using "create ... as ..." didn't preserve everything, which made the system_mysql_db test fail. mysql-test/r/sp-destruct.result: Updated result. mysql-test/t/sp-destruct.test: Changed backup method for mysql.proc.
This commit is contained in:
@@ -1,6 +1,3 @@
|
|||||||
use mysql;
|
|
||||||
drop table if exists proc_backup;
|
|
||||||
create table proc_backup as select * from proc;
|
|
||||||
use test;
|
use test;
|
||||||
drop procedure if exists bug14233;
|
drop procedure if exists bug14233;
|
||||||
drop function if exists bug14233;
|
drop function if exists bug14233;
|
||||||
@@ -33,10 +30,6 @@ create view v1 as select bug14233_f();
|
|||||||
ERROR 42S02: Table 'mysql.proc' doesn't exist
|
ERROR 42S02: Table 'mysql.proc' doesn't exist
|
||||||
insert into t1 values (0);
|
insert into t1 values (0);
|
||||||
ERROR 42S02: Table 'mysql.proc' doesn't exist
|
ERROR 42S02: Table 'mysql.proc' doesn't exist
|
||||||
use mysql;
|
|
||||||
create table proc as select * from proc_backup;
|
|
||||||
alter table proc add primary key (db,name,type);
|
|
||||||
use test;
|
|
||||||
flush table mysql.proc;
|
flush table mysql.proc;
|
||||||
flush privileges;
|
flush privileges;
|
||||||
delete from mysql.proc where name like 'bug14233%';
|
delete from mysql.proc where name like 'bug14233%';
|
||||||
@@ -81,7 +74,6 @@ create trigger t1_ai after insert on t1 for each row call bug14233_3();
|
|||||||
insert into t1 values (0);
|
insert into t1 values (0);
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'wpsj sa ^#!@ ' at line 3
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'wpsj sa ^#!@ ' at line 3
|
||||||
delete from mysql.proc where name like 'bug14233%';
|
delete from mysql.proc where name like 'bug14233%';
|
||||||
drop table mysql.proc_backup;
|
|
||||||
drop trigger t1_ai;
|
drop trigger t1_ai;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop view v1;
|
drop view v1;
|
||||||
|
@@ -11,11 +11,10 @@
|
|||||||
--source include/not_windows.inc
|
--source include/not_windows.inc
|
||||||
|
|
||||||
# Backup proc table
|
# Backup proc table
|
||||||
use mysql;
|
--system rm -rf var/master-data/mysql/backup
|
||||||
--disable_warnings
|
--system mkdir var/master-data/mysql/backup
|
||||||
drop table if exists proc_backup;
|
--system cp var/master-data/mysql/proc.* var/master-data/mysql/backup/
|
||||||
--enable_warnings
|
|
||||||
create table proc_backup as select * from proc;
|
|
||||||
use test;
|
use test;
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
@@ -67,10 +66,8 @@ create view v1 as select bug14233_f();
|
|||||||
insert into t1 values (0);
|
insert into t1 values (0);
|
||||||
|
|
||||||
# Restore mysql.proc
|
# Restore mysql.proc
|
||||||
use mysql;
|
--system mv var/master-data/mysql/backup/* var/master-data/mysql/
|
||||||
create table proc as select * from proc_backup;
|
--system rmdir var/master-data/mysql/backup
|
||||||
alter table proc add primary key (db,name,type);
|
|
||||||
use test;
|
|
||||||
|
|
||||||
flush table mysql.proc;
|
flush table mysql.proc;
|
||||||
flush privileges;
|
flush privileges;
|
||||||
@@ -124,7 +121,6 @@ insert into t1 values (0);
|
|||||||
|
|
||||||
# Clean-up
|
# Clean-up
|
||||||
delete from mysql.proc where name like 'bug14233%';
|
delete from mysql.proc where name like 'bug14233%';
|
||||||
drop table mysql.proc_backup;
|
|
||||||
drop trigger t1_ai;
|
drop trigger t1_ai;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop view v1;
|
drop view v1;
|
||||||
|
Reference in New Issue
Block a user