34 #include "fts0types.ic"
42 static const char* fts_sql_begin=
46 static const char* fts_sql_end=
65 switch (fts_table->
type) {
108 slash =
static_cast<const char*
>(
109 memchr(fts_table->
parent,
'/', strlen(fts_table->
parent)));
113 dbname_len = (slash - fts_table->
parent) + 1;
118 prefix_name_len = dbname_len + 4 + len + 1;
120 prefix_name =
static_cast<char*
>(mem_alloc(prefix_name_len));
122 len = sprintf(prefix_name,
"%.*sFTS_%s",
123 dbname_len, fts_table->
parent, table_id);
126 ut_a(len == prefix_name_len - 1);
148 name_len = strlen(prefix_name) + 1 + strlen(fts_table->
suffix) + 1;
150 name =
static_cast<char*
>(mem_alloc(name_len));
152 len = sprintf(name,
"%s_%s", prefix_name, fts_table->
suffix);
155 ut_a(len == name_len - 1);
178 if (fts_table != NULL) {
185 ulint sql_len = strlen(sql) + 1;
187 str_tmp =
static_cast<char*
>(mem_alloc(sql_len));
188 strcpy(str_tmp, sql);
191 str = ut_str3cat(fts_sql_begin, str_tmp, fts_sql_end);
194 dict_locked = (fts_table && fts_table->
table
230 char* str_tmp = NULL;
236 if (fts_table != NULL) {
244 if (str_tmp != NULL) {
245 str = ut_str3cat(fts_sql_begin, str_tmp, fts_sql_end);
248 str = ut_str3cat(fts_sql_begin, sql, fts_sql_end);
274 graph->
fork_type = QUE_FORK_MYSQL_INTERFACE;
307 const char* str =
"";
312 dict_field_t* field = dict_index_get_nth_field(index, i);
320 heap,
"%s%s$%s", str, (*str) ?
", " :
"", sel_str);
340 ut_a(error == DB_SUCCESS);