Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
531ad766
Commit
531ad766
authored
Mar 24, 2006
by
andrey@lmy004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for bug#16415 Events names are case sensitive
parent
907a11e8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
5 deletions
+46
-5
mysql-test/lib/init_db.sql
mysql-test/lib/init_db.sql
+1
-1
mysql-test/r/events.result
mysql-test/r/events.result
+4
-2
mysql-test/r/events_bugs.result
mysql-test/r/events_bugs.result
+15
-0
mysql-test/t/events_bugs.test
mysql-test/t/events_bugs.test
+24
-1
scripts/mysql_create_system_tables.sh
scripts/mysql_create_system_tables.sh
+1
-1
scripts/mysql_fix_privilege_tables.sql
scripts/mysql_fix_privilege_tables.sql
+1
-0
No files found.
mysql-test/lib/init_db.sql
View file @
531ad766
...
...
@@ -579,7 +579,7 @@ DROP PROCEDURE create_log_tables;
CREATE
TABLE
event
(
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
,
definer
char
(
77
)
CHARACTER
SET
utf8
COLLATE
utf8_bin
NOT
NULL
default
''
,
execute_at
DATETIME
default
NULL
,
...
...
mysql-test/r/events.result
View file @
531ad766
...
...
@@ -237,7 +237,7 @@ SHOW CREATE TABLE mysql.event;
Table Create Table
event CREATE TABLE `event` (
`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,
`definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`execute_at` datetime DEFAULT NULL,
...
...
@@ -260,8 +260,10 @@ ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin d
"This should work"
SHOW EVENTS;
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
events_test intact_check root@localhost RECURRING NULL 10 HOUR # # ENABLED
events_test
intact_check root@localhost RECURRING NULL 10 HOUR # # ENABLED
ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default '';
Warnings:
Warning 1265 Data truncated for column 'db' at row 1
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default '';
...
...
mysql-test/r/events_bugs.result
View file @
531ad766
create database if not exists 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 global event_scheduler=0;
"Wait a bit to settle down"
delete from mysql.event;
...
...
mysql-test/t/events_bugs.test
View file @
531ad766
create
database
if
not
exists
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 - 16407: Events: Changes in sql_mode won't be taken into account
#
...
...
@@ -41,7 +64,7 @@ begin
select get_lock('
ee_16407_2
', 60);
insert into events_test.events_smode_test values('
ee_16407_2
','
1980
-
19
-
02
');
end|
--error
1292
--error
ER_TRUNCATED_WRONG_VALUE
insert into events_smode_test values ('
test
','
1980
-
19
-
02
')|
--echo "This is ok"
create event ee_16407_3 on schedule every 60 second do
...
...
scripts/mysql_create_system_tables.sh
View file @
531ad766
...
...
@@ -775,7 +775,7 @@ if test ! -f $mdata/event.frm
then
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
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
definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',"
c_ev
=
"
$c_ev
execute_at DATETIME default NULL,"
...
...
scripts/mysql_fix_privilege_tables.sql
View file @
531ad766
...
...
@@ -671,6 +671,7 @@ ALTER TABLE event ADD sql_mode
) DEFAULT
''
NOT NULL AFTER on_completion;
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment