Commit 75cba7b5 authored by andrey@lmy004's avatar andrey@lmy004

manual merge

parents 988d55f1 531ad766
...@@ -579,7 +579,7 @@ DROP PROCEDURE create_log_tables; ...@@ -579,7 +579,7 @@ DROP PROCEDURE create_log_tables;
CREATE TABLE event ( CREATE TABLE event (
db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
name char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 NOT NULL default '',
body longblob NOT NULL, body longblob NOT NULL,
definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
execute_at DATETIME default NULL, execute_at DATETIME default NULL,
......
...@@ -237,7 +237,7 @@ SHOW CREATE TABLE mysql.event; ...@@ -237,7 +237,7 @@ SHOW CREATE TABLE mysql.event;
Table Create Table Table Create Table
event CREATE TABLE `event` ( event CREATE TABLE `event` (
`db` char(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `db` char(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`name` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `name` char(64) NOT NULL DEFAULT '',
`body` longblob NOT NULL, `body` longblob NOT NULL,
`definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`execute_at` datetime DEFAULT NULL, `execute_at` datetime DEFAULT NULL,
......
create database if not exists events_test; create database if not exists events_test;
use events_test; use events_test;
CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2;
ERROR HY000: Event 'Lower_case' already exists
DROP EVENT Lower_case;
SET NAMES cp1251;
CREATE EVENT äîëåí_ðåãèñòúð_1251 ON SCHEDULE EVERY 1 YEAR DO SELECT 100;
CREATE EVENT ÄîËåÍ_ðåãèñòúð_1251 ON SCHEDULE EVERY 2 YEAR DO SELECT 200;
ERROR HY000: Event 'ДоЛеН_регистър_1251' already exists
DROP EVENT ÄîËåÍ_ðåãèñòúð_1251;
SET NAMES utf8;
CREATE EVENT долен_регистър_утф8 ON SCHEDULE EVERY 3 YEAR DO SELECT 300;
CREATE EVENT ДОЛЕН_регистър_утф8 ON SCHEDULE EVERY 4 YEAR DO SELECT 400;
ERROR HY000: Event 'ДОЛЕН_регистър_утф8' already exists
DROP EVENT ДОЛЕН_регистър_утф8;
SET NAMES latin1;
set @a=3; set @a=3;
CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5; CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5;
call p_16(); call p_16();
......
create database if not exists events_test; create database if not exists events_test;
use events_test; use events_test;
#
# START - 16415: Events: event names are case sensitive
#
CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
--error ER_EVENT_ALREADY_EXISTS
CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2;
DROP EVENT Lower_case;
SET NAMES cp1251;
CREATE EVENT __1251 ON SCHEDULE EVERY 1 YEAR DO SELECT 100;
--error ER_EVENT_ALREADY_EXISTS
CREATE EVENT __1251 ON SCHEDULE EVERY 2 YEAR DO SELECT 200;
DROP EVENT __1251;
SET NAMES utf8;
CREATE EVENT долен_регистър_утф8 ON SCHEDULE EVERY 3 YEAR DO SELECT 300;
--error ER_EVENT_ALREADY_EXISTS
CREATE EVENT ДОЛЕН_регистър_утф8 ON SCHEDULE EVERY 4 YEAR DO SELECT 400;
DROP EVENT ДОЛЕН_регистър_утф8;
SET NAMES latin1;
#
# END - 16415: Events: event names are case sensitive
#
# #
# START - BUG#16408: Events: crash for an event in a procedure # START - BUG#16408: Events: crash for an event in a procedure
# #
...@@ -75,7 +98,7 @@ begin ...@@ -75,7 +98,7 @@ begin
select get_lock('ee_16407_2', 60); select get_lock('ee_16407_2', 60);
insert into events_test.events_smode_test values('ee_16407_2','1980-19-02'); insert into events_test.events_smode_test values('ee_16407_2','1980-19-02');
end| end|
--error 1292 --error ER_TRUNCATED_WRONG_VALUE
insert into events_smode_test values ('test','1980-19-02')| insert into events_smode_test values ('test','1980-19-02')|
--echo "This is ok" --echo "This is ok"
create event ee_16407_3 on schedule every 60 second do create event ee_16407_3 on schedule every 60 second do
......
...@@ -775,7 +775,7 @@ if test ! -f $mdata/event.frm ...@@ -775,7 +775,7 @@ if test ! -f $mdata/event.frm
then then
c_ev="$c_ev CREATE TABLE event (" c_ev="$c_ev CREATE TABLE event ("
c_ev="$c_ev db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default ''," c_ev="$c_ev db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',"
c_ev="$c_ev name char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default ''," c_ev="$c_ev name char(64) CHARACTER SET utf8 NOT NULL default '',"
c_ev="$c_ev body longblob NOT NULL," c_ev="$c_ev body longblob NOT NULL,"
c_ev="$c_ev definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default ''," c_ev="$c_ev definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',"
c_ev="$c_ev execute_at DATETIME default NULL," c_ev="$c_ev execute_at DATETIME default NULL,"
......
...@@ -671,6 +671,7 @@ ALTER TABLE event ADD sql_mode ...@@ -671,6 +671,7 @@ ALTER TABLE event ADD sql_mode
) DEFAULT '' NOT NULL AFTER on_completion; ) DEFAULT '' NOT NULL AFTER on_completion;
UPDATE user SET Event_priv=Super_priv WHERE @hadEventPriv = 0; UPDATE user SET Event_priv=Super_priv WHERE @hadEventPriv = 0;
ALTER TABLE event MODIFY name char(64) CHARACTER SET utf8 NOT NULL default '';
-- --
-- TRIGGER privilege -- TRIGGER privilege
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment