Commit f315b0b8 authored by unknown's avatar unknown
Browse files

Fix for BUG#15103: SHOW TRIGGERS: small output alignment problem.


mysql-test/r/information_schema.result:
  Remove extra spaces from result file.
mysql-test/r/mysqldump.result:
  Remove extra spaces from result file.
mysql-test/r/rpl_ddl.result:
  Remove extra spaces from result file.
mysql-test/r/trigger-compat.result:
  Remove extra spaces from result file.
mysql-test/r/trigger-grant.result:
  Remove extra spaces from result file.
mysql-test/r/trigger.result:
  Remove extra spaces from result file.
sql/sql_yacc.yy:
  Remove leading spaces.
parent c6993d67
Loading
Loading
Loading
Loading
+6 −12
Original line number Diff line number Diff line
@@ -816,40 +816,34 @@ end if;
end|
show triggers;
Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer
trg1	INSERT	t1	
begin
trg1	INSERT	t1	begin
if new.j > 10 then
set new.j := 10;
end if;
end	BEFORE	NULL		root@localhost
trg2	UPDATE	t1	
begin
trg2	UPDATE	t1	begin
if old.i % 2 = 0 then
set new.j := -1;
end if;
end	BEFORE	NULL		root@localhost
trg3	UPDATE	t1	
begin
trg3	UPDATE	t1	begin
if new.j = -1 then
set @fired:= "Yes";
end if;
end	AFTER	NULL		root@localhost
select * from information_schema.triggers;
TRIGGER_CATALOG	TRIGGER_SCHEMA	TRIGGER_NAME	EVENT_MANIPULATION	EVENT_OBJECT_CATALOG	EVENT_OBJECT_SCHEMA	EVENT_OBJECT_TABLE	ACTION_ORDER	ACTION_CONDITION	ACTION_STATEMENT	ACTION_ORIENTATION	ACTION_TIMING	ACTION_REFERENCE_OLD_TABLE	ACTION_REFERENCE_NEW_TABLE	ACTION_REFERENCE_OLD_ROW	ACTION_REFERENCE_NEW_ROW	CREATED	SQL_MODE	DEFINER
NULL	test	trg1	INSERT	NULL	test	t1	0	NULL	
begin
NULL	test	trg1	INSERT	NULL	test	t1	0	NULL	begin
if new.j > 10 then
set new.j := 10;
end if;
end	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL		root@localhost
NULL	test	trg2	UPDATE	NULL	test	t1	0	NULL	
begin
NULL	test	trg2	UPDATE	NULL	test	t1	0	NULL	begin
if old.i % 2 = 0 then
set new.j := -1;
end if;
end	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL		root@localhost
NULL	test	trg3	UPDATE	NULL	test	t1	0	NULL	
begin
NULL	test	trg3	UPDATE	NULL	test	t1	0	NULL	begin
if new.j = -1 then
set @fired:= "Yes";
end if;
+11 −19
Original line number Diff line number Diff line
@@ -1937,8 +1937,7 @@ end|
set sql_mode=default|
show triggers like "t1";
Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer
trg1	INSERT	t1	
begin
trg1	INSERT	t1	begin
if new.a > 10 then
set new.a := 10;
set new.a := 11;
@@ -1947,8 +1946,7 @@ end BEFORE 0000-00-00 00:00:00 root@localhost
trg2	UPDATE	t1	begin
if old.a % 2 = 0 then set new.b := 12; end if;
end	BEFORE	0000-00-00 00:00:00		root@localhost
trg3	UPDATE	t1	
begin
trg3	UPDATE	t1	begin
if new.a = -1 then
set @fired:= "Yes";
end if;
@@ -1986,8 +1984,7 @@ UNLOCK TABLES;
/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;
DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `trg1` BEFORE INSERT ON `t1` FOR EACH ROW
begin
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `trg1` BEFORE INSERT ON `t1` FOR EACH ROW begin
if new.a > 10 then
set new.a := 10;
set new.a := 11;
@@ -2000,8 +1997,7 @@ if old.a % 2 = 0 then set new.b := 12; end if;
end */;;

/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `trg3` AFTER UPDATE ON `t1` FOR EACH ROW
begin
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `trg3` AFTER UPDATE ON `t1` FOR EACH ROW begin
if new.a = -1 then
set @fired:= "Yes";
end if;
@@ -2023,8 +2019,7 @@ UNLOCK TABLES;
/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;
DELIMITER ;;
/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER" */;;
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `trg4` BEFORE INSERT ON `t2` FOR EACH ROW
begin
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `trg4` BEFORE INSERT ON `t2` FOR EACH ROW begin
if new.a > 10 then
set @fired:= "No";
end if;
@@ -2096,8 +2091,7 @@ t1
t2
show triggers;
Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer
trg1	INSERT	t1	
begin
trg1	INSERT	t1	begin
if new.a > 10 then
set new.a := 10;
set new.a := 11;
@@ -2106,14 +2100,12 @@ end BEFORE # root@localhost
trg2	UPDATE	t1	begin
if old.a % 2 = 0 then set new.b := 12; end if;
end	BEFORE	#		root@localhost
trg3	UPDATE	t1	
begin
trg3	UPDATE	t1	begin
if new.a = -1 then
set @fired:= "Yes";
end if;
end	AFTER	#	STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER	root@localhost
trg4	INSERT	t2	
begin
trg4	INSERT	t2	begin
if new.a > 10 then
set @fired:= "No";
end if;
+2 −4
Original line number Diff line number Diff line
@@ -34,7 +34,5 @@ Warning 1454 No definer attribute for trigger 'mysqltest_db1'.'wl2818_trg1'. The

SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name;
TRIGGER_CATALOG	TRIGGER_SCHEMA	TRIGGER_NAME	EVENT_MANIPULATION	EVENT_OBJECT_CATALOG	EVENT_OBJECT_SCHEMA	EVENT_OBJECT_TABLE	ACTION_ORDER	ACTION_CONDITION	ACTION_STATEMENT	ACTION_ORIENTATION	ACTION_TIMING	ACTION_REFERENCE_OLD_TABLE	ACTION_REFERENCE_NEW_TABLE	ACTION_REFERENCE_OLD_ROW	ACTION_REFERENCE_NEW_ROW	CREATED	SQL_MODE	DEFINER
NULL	mysqltest_db1	wl2818_trg1	INSERT	NULL	mysqltest_db1	t1	0	NULL	
INSERT INTO t2 VALUES(CURRENT_USER())	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL		
NULL	mysqltest_db1	wl2818_trg2	INSERT	NULL	mysqltest_db1	t1	0	NULL	
INSERT INTO t2 VALUES(CURRENT_USER())	ROW	AFTER	NULL	NULL	OLD	NEW	NULL		mysqltest_dfn@localhost
NULL	mysqltest_db1	wl2818_trg1	INSERT	NULL	mysqltest_db1	t1	0	NULL	INSERT INTO t2 VALUES(CURRENT_USER())	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL		
NULL	mysqltest_db1	wl2818_trg2	INSERT	NULL	mysqltest_db1	t1	0	NULL	INSERT INTO t2 VALUES(CURRENT_USER())	ROW	AFTER	NULL	NULL	OLD	NEW	NULL		mysqltest_dfn@localhost
+7 −14
Original line number Diff line number Diff line
@@ -185,10 +185,8 @@ INSERT INTO t1 VALUES(6);
ERROR 42000: Access denied; you need the SUPER privilege for this operation
SHOW TRIGGERS;
Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer
trg1	INSERT	t1	
SET @new_sum = 0	BEFORE	NULL		mysqltest_inv@localhost
trg2	INSERT	t1	
SET @new_sum = 0	AFTER	NULL		mysqltest_nonexs@localhost
trg1	INSERT	t1	SET @new_sum = 0	BEFORE	NULL		mysqltest_inv@localhost
trg2	INSERT	t1	SET @new_sum = 0	AFTER	NULL		mysqltest_nonexs@localhost
DROP TRIGGER trg1;
DROP TRIGGER trg2;
CREATE TRIGGER trg1 BEFORE INSERT ON t1
@@ -219,16 +217,11 @@ Warning 1454 No definer attribute for trigger 'mysqltest_db1'.'trg1'. The trigge

SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name;
TRIGGER_CATALOG	TRIGGER_SCHEMA	TRIGGER_NAME	EVENT_MANIPULATION	EVENT_OBJECT_CATALOG	EVENT_OBJECT_SCHEMA	EVENT_OBJECT_TABLE	ACTION_ORDER	ACTION_CONDITION	ACTION_STATEMENT	ACTION_ORIENTATION	ACTION_TIMING	ACTION_REFERENCE_OLD_TABLE	ACTION_REFERENCE_NEW_TABLE	ACTION_REFERENCE_OLD_ROW	ACTION_REFERENCE_NEW_ROW	CREATED	SQL_MODE	DEFINER
NULL	mysqltest_db1	trg1	INSERT	NULL	mysqltest_db1	t1	0	NULL	
SET @a = 1	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL		
NULL	mysqltest_db1	trg2	INSERT	NULL	mysqltest_db1	t1	0	NULL	
SET @a = 2	ROW	AFTER	NULL	NULL	OLD	NEW	NULL		@
NULL	mysqltest_db1	trg3	UPDATE	NULL	mysqltest_db1	t1	0	NULL	
SET @a = 3	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL		@abc@def@@
NULL	mysqltest_db1	trg4	UPDATE	NULL	mysqltest_db1	t1	0	NULL	
SET @a = 4	ROW	AFTER	NULL	NULL	OLD	NEW	NULL		@hostname
NULL	mysqltest_db1	trg5	DELETE	NULL	mysqltest_db1	t1	0	NULL	
SET @a = 5	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL		@abcdef@@@hostname
NULL	mysqltest_db1	trg1	INSERT	NULL	mysqltest_db1	t1	0	NULL	SET @a = 1	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL		
NULL	mysqltest_db1	trg2	INSERT	NULL	mysqltest_db1	t1	0	NULL	SET @a = 2	ROW	AFTER	NULL	NULL	OLD	NEW	NULL		@
NULL	mysqltest_db1	trg3	UPDATE	NULL	mysqltest_db1	t1	0	NULL	SET @a = 3	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL		@abc@def@@
NULL	mysqltest_db1	trg4	UPDATE	NULL	mysqltest_db1	t1	0	NULL	SET @a = 4	ROW	AFTER	NULL	NULL	OLD	NEW	NULL		@hostname
NULL	mysqltest_db1	trg5	DELETE	NULL	mysqltest_db1	t1	0	NULL	SET @a = 5	ROW	BEFORE	NULL	NULL	OLD	NEW	NULL		@abcdef@@@hostname

---> connection: default
DROP USER mysqltest_dfn@localhost;
+2 −0
Original line number Diff line number Diff line
@@ -9103,6 +9103,8 @@ trigger_tail:
	  bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics));
	  lex->sphead->m_chistics= &lex->sp_chistics;
	  lex->sphead->m_body_begin= lex->ptr;
          while (my_isspace(system_charset_info, lex->sphead->m_body_begin[0]))
            ++lex->sphead->m_body_begin;
	}
	sp_proc_stmt
	{
+2 −2

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

Loading