Commit 29a755fe authored by gshchepa/uchum@host.loc's avatar gshchepa/uchum@host.loc
Browse files

Merge host.loc:/work/bugs/5.0-bugteam-30059

into  host.loc:/work/bk/5.0-bugteam
parents 1c45081b 486ef1ba
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -115,3 +115,39 @@ SET myisam_repair_threads=@@global.myisam_repair_threads;
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
DROP TABLE t1;
End of 4.1 tests
# Test with a saved table from 4.1
SHOW TABLE STATUS LIKE 't1';
Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
t1	MyISAM	9	Fixed	2	5	10	21474836479	1024	0	NULL	#	#	NULL	latin1_swedish_ci	NULL		
SELECT * FROM t1;
id
1
2
# Run CHECK TABLE, it should indicate table need a REPAIR TABLE
CHECK TABLE t1 FOR UPGRADE;
Table	Op	Msg_type	Msg_text
test.t1	check	error	Table upgrade required. Please do "REPAIR TABLE `t1`" to fix it!
# REPAIR old table USE_FRM should fail
REPAIR TABLE t1 USE_FRM;
Table	Op	Msg_type	Msg_text
t1	repair	error	Failed reparing incompatible .FRM file
# Run REPAIR TABLE to upgrade .frm file
REPAIR TABLE t1;
Table	Op	Msg_type	Msg_text
test.t1	repair	status	OK
SHOW TABLE STATUS LIKE 't1';
Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
t1	MyISAM	10	Fixed	2	7	14	1970324836974591	1024	0	NULL	#	#	NULL	latin1_swedish_ci	NULL		
SELECT * FROM t1;
id
1
2
REPAIR TABLE t1 USE_FRM;
Table	Op	Msg_type	Msg_text
test.t1	repair	warning	Number of rows changed from 0 to 2
test.t1	repair	status	OK
SELECT * FROM t1;
id
1
2
DROP TABLE t1;
+1 −1
Original line number Diff line number Diff line
@@ -499,7 +499,7 @@ fetch c into var;
close c;
return var;
end
master-bin.000001	#	Query	1	#	use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 as a
master-bin.000001	#	Query	1	#	use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `a`
master-bin.000001	#	Query	1	#	use `test`; create table t1 (a int)
master-bin.000001	#	Query	1	#	use `test`; insert into t1 (a) values (f1())
master-bin.000001	#	Query	1	#	use `test`; drop view v1
+16 −2
Original line number Diff line number Diff line
@@ -47,11 +47,11 @@ show binlog events limit 1,100;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
slave-bin.000001	#	Query	1	#	use `test`; create table t1 (a int)
slave-bin.000001	#	Query	1	#	use `test`; insert into t1 values (1)
slave-bin.000001	#	Query	1	#	use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select a from t1
slave-bin.000001	#	Query	1	#	use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1`
slave-bin.000001	#	Query	1	#	use `test`; insert into v1 values (2)
slave-bin.000001	#	Query	1	#	use `test`; update v1 set a=3 where a=1
slave-bin.000001	#	Query	1	#	use `test`; delete from v1 where a=2
slave-bin.000001	#	Query	1	#	use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select a as b from t1
slave-bin.000001	#	Query	1	#	use `test`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`a` AS `b` from `test`.`t1`
slave-bin.000001	#	Query	1	#	use `test`; drop view v1
slave-bin.000001	#	Query	1	#	use `test`; drop table t1

@@ -112,4 +112,18 @@ CREATE VIEW v1 AS SELECT * FROM t1;
ERROR 42S01: Table 'v1' already exists
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (a INT);
# create view as output from mysqldump 10.11 (5.0.62)
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v1` AS select `t1`.`a` AS `a` from `t1` where (`t1`.`a` < 3) */
/*!50002 WITH CASCADED CHECK OPTION */;
SHOW CREATE VIEW v1;
View	Create View
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` where (`t1`.`a` < 3) WITH CASCADED CHECK OPTION
SHOW CREATE VIEW v1;
View	Create View
v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` where (`t1`.`a` < 3) WITH CASCADED CHECK OPTION
DROP VIEW v1;
DROP TABLE t1;
End of 5.0 tests
+10 B

File added.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+1 KiB

File added.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

Loading