summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-10-04 20:38:23 +0300
committerunknown <marko@hundin.mysql.fi>2004-10-04 20:38:23 +0300
commitec735ea8f74b19c47e6a8cd03e2d258aa1ba8efa (patch)
treec0ed3c09c471d8bf011e421af67c823360cea902 /innobase
parentef40ba04e8f64c1bf6a3347ff70d7fea7ca6eba1 (diff)
downloadmariadb-git-ec735ea8f74b19c47e6a8cd03e2d258aa1ba8efa.tar.gz
InnoDB: Fix ALTER TABLE t DISCARD TABLESPACE (Bug #5851)
innobase/include/ut0mem.h: Improve documentation of ut_strlenq(), ut_strcpyq() and ut_memcpyq() innobase/include/ut0mem.ic: Improve documentation of ut_strlenq() innobase/row/row0mysql.c: row_discard_tablespace_for_mysql(): Add quotes around table_name in DISCARD_TABLESPACE_PROC (Bug #5851) innobase/ut/ut0mem.c: Improve documentation of ut_strcpyq() and ut_memcpyq()
Diffstat (limited to 'innobase')
-rw-r--r--innobase/include/ut0mem.h10
-rw-r--r--innobase/include/ut0mem.ic2
-rw-r--r--innobase/row/row0mysql.c4
-rw-r--r--innobase/ut/ut0mem.c8
4 files changed, 16 insertions, 8 deletions
diff --git a/innobase/include/ut0mem.h b/innobase/include/ut0mem.h
index 2e02b3f0b6b..73ecb25101a 100644
--- a/innobase/include/ut0mem.h
+++ b/innobase/include/ut0mem.h
@@ -117,7 +117,7 @@ int
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
ulint
ut_strlenq(
@@ -127,7 +127,9 @@ ut_strlenq(
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*
ut_strcpyq(
@@ -138,7 +140,9 @@ ut_strcpyq(
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*
ut_memcpyq(
diff --git a/innobase/include/ut0mem.ic b/innobase/include/ut0mem.ic
index 3bb30a80f22..76c721112a0 100644
--- a/innobase/include/ut0mem.ic
+++ b/innobase/include/ut0mem.ic
@@ -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
ulint
ut_strlenq(
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index 8f5d3a216bc..c796646fc37 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -1988,9 +1988,9 @@ row_discard_tablespace_for_mysql(
"new_id_high INT;\n"
"table_name CHAR;\n"
"BEGIN\n"
- "table_name := ";
+ "table_name := '";
static const char discard_tablespace_proc2[] =
- ";\n"
+ "';\n"
"new_id_high := %lu;\n"
"new_id_low := %lu;\n"
"new_id := CONCAT(TO_BINARY(new_id_high, 4), TO_BINARY(new_id_low, 4));\n"
diff --git a/innobase/ut/ut0mem.c b/innobase/ut/ut0mem.c
index 09410e348c2..a6002d7fd83 100644
--- a/innobase/ut/ut0mem.c
+++ b/innobase/ut/ut0mem.c
@@ -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*
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*
ut_memcpyq(