Commit aff9b385 authored by marko's avatar marko

branches/zip: Introduce the macro TEMP_INDEX_PREFIX_STR.

This is to avoid triggering an error in Doxygen.
parent d075e80c
...@@ -31,8 +31,10 @@ Created 1/20/1994 Heikki Tuuri ...@@ -31,8 +31,10 @@ Created 1/20/1994 Heikki Tuuri
#include <ctype.h> #include <ctype.h>
#endif #endif
#define TEMP_INDEX_PREFIX '\377' /* Index name prefix in fast index /** Index name prefix in fast index creation */
creation */ #define TEMP_INDEX_PREFIX '\377'
/** Index name prefix in fast index creation, as a string constant */
#define TEMP_INDEX_PREFIX_STR "\377"
typedef time_t ib_time_t; typedef time_t ib_time_t;
......
...@@ -1831,14 +1831,11 @@ row_merge_drop_temp_indexes(void) ...@@ -1831,14 +1831,11 @@ row_merge_drop_temp_indexes(void)
query graphs needed in deleting the dictionary data from system query graphs needed in deleting the dictionary data from system
tables in Innobase. Deleting a row from SYS_INDEXES table also tables in Innobase. Deleting a row from SYS_INDEXES table also
frees the file segments of the B-tree associated with the index. */ frees the file segments of the B-tree associated with the index. */
#if TEMP_INDEX_PREFIX != '\377'
# error "TEMP_INDEX_PREFIX != '\377'"
#endif
static const char drop_temp_indexes[] = static const char drop_temp_indexes[] =
"PROCEDURE DROP_TEMP_INDEXES_PROC () IS\n" "PROCEDURE DROP_TEMP_INDEXES_PROC () IS\n"
"indexid CHAR;\n" "indexid CHAR;\n"
"DECLARE CURSOR c IS SELECT ID FROM SYS_INDEXES\n" "DECLARE CURSOR c IS SELECT ID FROM SYS_INDEXES\n"
"WHERE SUBSTR(NAME,0,1)='\377';\n" "WHERE SUBSTR(NAME,0,1)='" TEMP_INDEX_PREFIX_STR "';\n"
"BEGIN\n" "BEGIN\n"
"\tOPEN c;\n" "\tOPEN c;\n"
"\tWHILE 1=1 LOOP\n" "\tWHILE 1=1 LOOP\n"
...@@ -2004,15 +2001,12 @@ row_merge_rename_indexes( ...@@ -2004,15 +2001,12 @@ row_merge_rename_indexes(
/* We use the private SQL parser of Innobase to generate the /* We use the private SQL parser of Innobase to generate the
query graphs needed in renaming indexes. */ query graphs needed in renaming indexes. */
#if TEMP_INDEX_PREFIX != '\377'
# error "TEMP_INDEX_PREFIX != '\377'"
#endif
static const char rename_indexes[] = static const char rename_indexes[] =
"PROCEDURE RENAME_INDEXES_PROC () IS\n" "PROCEDURE RENAME_INDEXES_PROC () IS\n"
"BEGIN\n" "BEGIN\n"
"UPDATE SYS_INDEXES SET NAME=SUBSTR(NAME,1,LENGTH(NAME)-1)\n" "UPDATE SYS_INDEXES SET NAME=SUBSTR(NAME,1,LENGTH(NAME)-1)\n"
"WHERE TABLE_ID = :tableid AND SUBSTR(NAME,0,1)='\377';\n" "WHERE TABLE_ID = :tableid AND SUBSTR(NAME,0,1)='"
TEMP_INDEX_PREFIX_STR "';\n"
"END;\n"; "END;\n";
ut_ad(table); ut_ad(table);
......
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