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
aafe43b7
Commit
aafe43b7
authored
Aug 05, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup (move ALTER TABLE for comment to be applicable again)
parent
cf4814b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
scripts/mysql_system_tables_fix.sql
scripts/mysql_system_tables_fix.sql
+6
-7
No files found.
scripts/mysql_system_tables_fix.sql
View file @
aafe43b7
...
@@ -648,6 +648,12 @@ DROP TABLE tmp_proxies_priv;
...
@@ -648,6 +648,12 @@ DROP TABLE tmp_proxies_priv;
#
Convering
the
host
name
to
lower
case
for
existing
users
#
Convering
the
host
name
to
lower
case
for
existing
users
UPDATE
user
SET
host
=
LOWER
(
host
)
WHERE
LOWER
(
host
)
<>
host
;
UPDATE
user
SET
host
=
LOWER
(
host
)
WHERE
LOWER
(
host
)
<>
host
;
SET
@
innodb_index_stats_fk
=
(
select
count
(
*
)
from
information_schema
.
referential_constraints
where
constraint_schema
=
'mysql'
and
table_name
=
'innodb_index_stats'
and
referenced_table_name
=
'innodb_table_stats'
and
constraint_name
=
'innodb_index_stats_ibfk_1'
);
SET
@
str
=
IF
(
@
innodb_index_stats_fk
>
0
and
@
have_innodb
>
0
,
"ALTER TABLE mysql.innodb_index_stats DROP FOREIGN KEY `innodb_index_stats_ibfk_1`"
,
"SET @dummy = 0"
);
PREPARE
stmt
FROM
@
str
;
EXECUTE
stmt
;
DROP
PREPARE
stmt
;
#
MDEV
-
4332
longer
user
names
#
MDEV
-
4332
longer
user
names
alter
table
user
modify
User
char
(
80
)
binary
not
null
default
''
;
alter
table
user
modify
User
char
(
80
)
binary
not
null
default
''
;
alter
table
db
modify
User
char
(
80
)
binary
not
null
default
''
;
alter
table
db
modify
User
char
(
80
)
binary
not
null
default
''
;
...
@@ -667,12 +673,5 @@ alter table tables_priv modify Grantor char(141) COLLATE utf8_bin not null
...
@@ -667,12 +673,5 @@ alter table tables_priv modify Grantor char(141) COLLATE utf8_bin not null
#
This
should
not
be
needed
,
but
gives
us
some
extra
testing
that
the
above
#
This
should
not
be
needed
,
but
gives
us
some
extra
testing
that
the
above
#
changes
was
correct
#
changes
was
correct
set
@
have_innodb
=
(
select
count
(
engine
)
from
information_schema
.
engines
where
engine
=
'INNODB'
and
support
!=
'NO'
);
SET
@
innodb_index_stats_fk
=
(
select
count
(
*
)
from
information_schema
.
referential_constraints
where
constraint_schema
=
'mysql'
and
table_name
=
'innodb_index_stats'
and
referenced_table_name
=
'innodb_table_stats'
and
constraint_name
=
'innodb_index_stats_ibfk_1'
);
SET
@
str
=
IF
(
@
innodb_index_stats_fk
>
0
and
@
have_innodb
>
0
,
"ALTER TABLE mysql.innodb_index_stats DROP FOREIGN KEY `innodb_index_stats_ibfk_1`"
,
"SET @dummy = 0"
);
PREPARE
stmt
FROM
@
str
;
EXECUTE
stmt
;
DROP
PREPARE
stmt
;
flush
privileges
;
flush
privileges
;
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