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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d5728b91
Commit
d5728b91
authored
Oct 04, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: make ALTER TABLE to work on table names containing '#' (Bug #5856)
parent
c0531d70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
innobase/dict/dict0dict.c
innobase/dict/dict0dict.c
+16
-6
innobase/row/row0mysql.c
innobase/row/row0mysql.c
+1
-0
No files found.
innobase/dict/dict0dict.c
View file @
d5728b91
...
...
@@ -2500,7 +2500,9 @@ dict_strip_comments(
char
*
str
;
char
*
sptr
;
char
*
ptr
;
/* unclosed quote character (0 if none) */
char
quote
=
0
;
str
=
mem_alloc
(
strlen
(
sql_string
)
+
1
);
sptr
=
sql_string
;
...
...
@@ -2515,8 +2517,18 @@ dict_strip_comments(
return
(
str
);
}
if
(
*
sptr
==
'#'
if
(
*
sptr
==
quote
)
{
/* Closing quote character: do not look for
starting quote or comments. */
quote
=
0
;
}
else
if
(
quote
)
{
/* Within quotes: do not look for
starting quotes or comments. */
}
else
if
(
*
sptr
==
'"'
||
*
sptr
==
'`'
)
{
/* Starting quote: remember the quote character. */
quote
=
*
sptr
;
}
else
if
(
*
sptr
==
'#'
||
(
0
==
memcmp
(
"-- "
,
sptr
,
3
)))
{
for
(;;)
{
/* In Unix a newline is 0x0A while in Windows
...
...
@@ -2531,9 +2543,7 @@ dict_strip_comments(
sptr
++
;
}
}
if
(
*
sptr
==
'/'
&&
*
(
sptr
+
1
)
==
'*'
)
{
}
else
if
(
!
quote
&&
*
sptr
==
'/'
&&
*
(
sptr
+
1
)
==
'*'
)
{
for
(;;)
{
if
(
*
sptr
==
'*'
&&
*
(
sptr
+
1
)
==
'/'
)
{
...
...
innobase/row/row0mysql.c
View file @
d5728b91
...
...
@@ -2051,6 +2051,7 @@ row_drop_table_for_mysql(
memcpy
(
sql
,
str1
,
(
sizeof
str1
)
-
1
);
memcpy
(
sql
+
(
sizeof
str1
)
-
1
,
quoted_name
,
namelen
);
memcpy
(
sql
+
(
sizeof
str1
)
-
1
+
namelen
,
str2
,
sizeof
str2
);
mem_free
(
quoted_name
);
/* Serialize data dictionary operations with dictionary mutex:
no deadlocks can occur then in these operations */
...
...
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