Commit d4b3df6d authored by marko@hundin.mysql.fi's avatar marko@hundin.mysql.fi

InnoDB: Fix ALTER TABLE t DISCARD TABLESPACE (Bug #5851)

parent e7500f43
...@@ -117,7 +117,7 @@ int ...@@ -117,7 +117,7 @@ int
ut_strcmp(const void* str1, const void* str2); ut_strcmp(const void* str1, const void* str2);
/************************************************************************** /**************************************************************************
Determine the length of a string when it is quoted with ut_strcpyq(). */ Compute strlen(ut_strcpyq(str, q)). */
UNIV_INLINE UNIV_INLINE
ulint ulint
ut_strlenq( ut_strlenq(
...@@ -127,7 +127,9 @@ ut_strlenq( ...@@ -127,7 +127,9 @@ ut_strlenq(
char q); /* in: the quote character */ char q); /* in: the quote character */
/************************************************************************** /**************************************************************************
Make a quoted copy of a string. */ Make a quoted copy of a NUL-terminated string. Leading and trailing
quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_memcpyq(). */
char* char*
ut_strcpyq( ut_strcpyq(
...@@ -138,7 +140,9 @@ ut_strcpyq( ...@@ -138,7 +140,9 @@ ut_strcpyq(
const char* src); /* in: null-terminated string */ const char* src); /* in: null-terminated string */
/************************************************************************** /**************************************************************************
Make a quoted copy of a fixed-length string. */ Make a quoted copy of a fixed-length string. Leading and trailing
quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_strcpyq(). */
char* char*
ut_memcpyq( ut_memcpyq(
......
...@@ -49,7 +49,7 @@ ut_strcmp(const void* str1, const void* str2) ...@@ -49,7 +49,7 @@ ut_strcmp(const void* str1, const void* str2)
} }
/************************************************************************** /**************************************************************************
Determine the length of a string when it is quoted with ut_strcpyq(). */ Compute strlen(ut_strcpyq(str, q)). */
UNIV_INLINE UNIV_INLINE
ulint ulint
ut_strlenq( ut_strlenq(
......
...@@ -1988,9 +1988,9 @@ row_discard_tablespace_for_mysql( ...@@ -1988,9 +1988,9 @@ row_discard_tablespace_for_mysql(
"new_id_high INT;\n" "new_id_high INT;\n"
"table_name CHAR;\n" "table_name CHAR;\n"
"BEGIN\n" "BEGIN\n"
"table_name := "; "table_name := '";
static const char discard_tablespace_proc2[] = static const char discard_tablespace_proc2[] =
";\n" "';\n"
"new_id_high := %lu;\n" "new_id_high := %lu;\n"
"new_id_low := %lu;\n" "new_id_low := %lu;\n"
"new_id := CONCAT(TO_BINARY(new_id_high, 4), TO_BINARY(new_id_low, 4));\n" "new_id := CONCAT(TO_BINARY(new_id_high, 4), TO_BINARY(new_id_low, 4));\n"
......
...@@ -313,7 +313,9 @@ ut_free_all_mem(void) ...@@ -313,7 +313,9 @@ ut_free_all_mem(void)
} }
/************************************************************************** /**************************************************************************
Make a quoted copy of a string. */ Make a quoted copy of a NUL-terminated string. Leading and trailing
quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_memcpyq(). */
char* char*
ut_strcpyq( ut_strcpyq(
...@@ -333,7 +335,9 @@ ut_strcpyq( ...@@ -333,7 +335,9 @@ ut_strcpyq(
} }
/************************************************************************** /**************************************************************************
Make a quoted copy of a fixed-length string. */ Make a quoted copy of a fixed-length string. Leading and trailing
quotes will not be included; only embedded quotes will be escaped.
See also ut_strlenq() and ut_strcpyq(). */
char* char*
ut_memcpyq( ut_memcpyq(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment