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
92f81439
Commit
92f81439
authored
Feb 19, 2013
by
Sujatha Sivakumar
Browse files
Options
Browse Files
Download
Plain Diff
Merge from mysq-5.1 to mysql-5.5
parents
02c7c2a6
bda79b05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
scripts/mysql_system_tables_data.sql
scripts/mysql_system_tables_data.sql
+9
-5
No files found.
scripts/mysql_system_tables_data.sql
View file @
92f81439
-- Copyright (c) 2007, 201
0
, Oracle and/or its affiliates. All rights reserved.
-- Copyright (c) 2007, 201
3
, Oracle and/or its affiliates. All rights reserved.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
...
...
@@ -20,7 +20,12 @@
-- When setting up a "cross bootstrap" database (e.g., creating data on a Unix
-- host which will later be included in a Windows zip file), any lines
-- containing "@current_hostname" are filtered out by mysql_install_db.
set
@
current_hostname
=
@@
hostname
;
-- Get the hostname, if the hostname has any wildcard character like "_" or "%"
-- add escape character in front of wildcard character to convert "_" or "%" to
-- a plain character
SET
@
get_hostname
=
@@
hostname
;
SELECT
REPLACE
((
SELECT
REPLACE
(
@
get_hostname
,
'_'
,
'
\_
'
)),
'%'
,
'
\%
'
)
INTO
@
current_hostname
;
-- Fill "db" table with default grants for anyone to
...
...
@@ -32,10 +37,9 @@ INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
DROP
TABLE
tmp_db
;
-- Fill "user
s
" table with default users allowing root access
-- from local machine if "user
s
" table didn't exist before
-- Fill "user" table with default users allowing root access
-- from local machine if "user" table didn't exist before
CREATE
TEMPORARY
TABLE
tmp_user
LIKE
user
;
set
@
current_hostname
=
@@
hostname
;
INSERT
INTO
tmp_user
VALUES
(
'localhost'
,
'root'
,
''
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
,
''
,
''
);
REPLACE
INTO
tmp_user
SELECT
@
current_hostname
,
'root'
,
''
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
,
''
,
''
FROM
dual
WHERE
LOWER
(
@
current_hostname
)
!=
'localhost'
;
REPLACE
INTO
tmp_user
VALUES
(
'127.0.0.1'
,
'root'
,
''
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
,
''
,
''
);
...
...
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