Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
62d5637a
Commit
62d5637a
authored
Jan 30, 2019
by
Sébastien Santoro
Committed by
Dylan William Hardison
Jan 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1497042 - Enclose table names in CREATE queries
parent
62bb8a59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Mysql.pm
Bugzilla/DB/Schema/Mysql.pm
+7
-3
No files found.
Bugzilla/DB/Schema/Mysql.pm
View file @
62d5637a
...
@@ -135,8 +135,12 @@ sub _get_create_table_ddl {
...
@@ -135,8 +135,12 @@ sub _get_create_table_ddl {
my
$charset
=
Bugzilla
->
dbh
->
bz_db_is_utf8
?
"CHARACTER SET utf8"
:
''
;
my
$charset
=
Bugzilla
->
dbh
->
bz_db_is_utf8
?
"CHARACTER SET utf8"
:
''
;
my
$type
=
grep
(
$_
eq
$table
,
MYISAM_TABLES
)
?
'MYISAM'
:
'InnoDB'
;
my
$type
=
grep
(
$_
eq
$table
,
MYISAM_TABLES
)
?
'MYISAM'
:
'InnoDB'
;
return
(
$self
->
SUPER::
_get_create_table_ddl
(
$table
)
.
" ENGINE = $type $charset"
);
my
$ddl
=
$self
->
SUPER::
_get_create_table_ddl
(
$table
);
$ddl
=~
s/CREATE TABLE (.*) \(/CREATE TABLE `$1` (/
;
$ddl
.=
" ENGINE = $type $charset"
;
return
$ddl
;
}
#eosub--_get_create_table_ddl
}
#eosub--_get_create_table_ddl
...
@@ -151,7 +155,7 @@ sub _get_create_index_ddl {
...
@@ -151,7 +155,7 @@ sub _get_create_index_ddl {
my
$sql
=
"CREATE "
;
my
$sql
=
"CREATE "
;
$sql
.=
"$index_type "
$sql
.=
"$index_type "
if
(
$index_type
eq
'UNIQUE'
||
$index_type
eq
'FULLTEXT'
);
if
(
$index_type
eq
'UNIQUE'
||
$index_type
eq
'FULLTEXT'
);
$sql
.=
"INDEX \`$index_name\` ON
$table_name
\("
$sql
.=
"INDEX \`$index_name\` ON
\`$table_name\`
\("
.
join
(
", "
,
@$index_fields
)
.
"\)"
;
.
join
(
", "
,
@$index_fields
)
.
"\)"
;
return
(
$sql
);
return
(
$sql
);
...
...
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