Skip to content

Commit f026d4d

Browse files
committed
MDEV-21612: Fix -Wunused-function for -DEMBEDDED_LIBRARY
1 parent d2ca5e4 commit f026d4d

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

sql/sql_parse.cc

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,19 @@ void cleanup_items(Item *item)
11241124
DBUG_VOID_RETURN;
11251125
}
11261126

1127+
#ifdef WITH_WSREP
1128+
static bool wsrep_tables_accessible_when_detached(const TABLE_LIST *tables)
1129+
{
1130+
for (const TABLE_LIST *table= tables; table; table= table->next_global)
1131+
{
1132+
LEX_CSTRING db= table->db, tn= table->table_name;
1133+
if (get_table_category(&db, &tn) < TABLE_CATEGORY_INFORMATION)
1134+
return false;
1135+
}
1136+
return true;
1137+
}
1138+
#endif /* WITH_WSREP */
1139+
#ifndef EMBEDDED_LIBRARY
11271140
static enum enum_server_command fetch_command(THD *thd, char *packet)
11281141
{
11291142
enum enum_server_command
@@ -1140,21 +1153,6 @@ static enum enum_server_command fetch_command(THD *thd, char *packet)
11401153
DBUG_RETURN(command);
11411154
}
11421155

1143-
1144-
#ifdef WITH_WSREP
1145-
static bool wsrep_tables_accessible_when_detached(const TABLE_LIST *tables)
1146-
{
1147-
for (const TABLE_LIST *table= tables; table; table= table->next_global)
1148-
{
1149-
LEX_CSTRING db= table->db, tn= table->table_name;
1150-
if (get_table_category(&db, &tn) < TABLE_CATEGORY_INFORMATION)
1151-
return false;
1152-
}
1153-
return true;
1154-
}
1155-
#endif /* WITH_WSREP */
1156-
#ifndef EMBEDDED_LIBRARY
1157-
11581156
/**
11591157
Read one command from connection and execute it (query or simple command).
11601158
This function is called in loop from thread function.

0 commit comments

Comments
 (0)