MXS-1196: Ignore the DUAL table

The embedded parser ignores the DUAL table so it's better if
qc_sqlite does that as well.
This commit is contained in:
Johan Wikman
2017-05-16 15:58:58 +03:00
parent 339cc6cc0c
commit c46f16041e

View File

@ -1351,6 +1351,8 @@ static void update_database_names(QC_SQLITE_INFO* info, const char* zDatabase)
static void update_names(QC_SQLITE_INFO* info, const char* zDatabase, const char* zTable)
{
if ((info->collect & QC_COLLECT_TABLES) && !(info->collected & QC_COLLECT_TABLES))
{
if (strcasecmp(zTable, "DUAL") != 0)
{
char* zCopy = MXS_STRDUP(zTable);
MXS_ABORT_IF_NULL(zCopy);
@ -1382,6 +1384,7 @@ static void update_names(QC_SQLITE_INFO* info, const char* zDatabase, const char
info->table_fullnames[info->table_fullnames_len++] = zCopy;
info->table_fullnames[info->table_fullnames_len] = NULL;
}
}
if ((info->collect & QC_COLLECT_DATABASES) && !(info->collected & QC_COLLECT_DATABASES))
{