mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 11:57:38 +02:00
find temporary table
This commit is contained in:
parent
27772bd776
commit
f2a5353966
2 changed files with 20 additions and 4 deletions
|
|
@ -8563,8 +8563,10 @@ int spider_db_udf_direct_sql(
|
|||
}
|
||||
#if MYSQL_VERSION_ID < 50500
|
||||
#else
|
||||
if (table->pos_in_table_list)
|
||||
{
|
||||
if (
|
||||
table->s->tmp_table == NO_TMP_TABLE &&
|
||||
table->pos_in_table_list
|
||||
) {
|
||||
TABLE_LIST *next_tables =
|
||||
table->pos_in_table_list->next_global;
|
||||
while (next_tables && next_tables->parent_l)
|
||||
|
|
@ -8651,8 +8653,10 @@ int spider_db_udf_direct_sql(
|
|||
table->file->ha_external_lock(table->in_use, F_UNLCK);
|
||||
#if MYSQL_VERSION_ID < 50500
|
||||
#else
|
||||
if (table->pos_in_table_list)
|
||||
{
|
||||
if (
|
||||
table->s->tmp_table == NO_TMP_TABLE &&
|
||||
table->pos_in_table_list
|
||||
) {
|
||||
TABLE_LIST *next_tables =
|
||||
table->pos_in_table_list->next_global;
|
||||
while (next_tables && next_tables->parent_l)
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@
|
|||
#include "spd_udf.h"
|
||||
#include "spd_malloc.h"
|
||||
|
||||
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100004
|
||||
#define SPIDER_NEED_INIT_ONE_TABLE_FOR_FIND_TEMPORARY_TABLE
|
||||
#endif
|
||||
|
||||
extern const char **spd_defaults_extra_file;
|
||||
extern const char **spd_defaults_file;
|
||||
|
||||
|
|
@ -1604,8 +1608,16 @@ long long spider_direct_sql_body(
|
|||
#endif
|
||||
for (roop_count = 0; roop_count < direct_sql->table_count; roop_count++)
|
||||
{
|
||||
#ifdef SPIDER_NEED_INIT_ONE_TABLE_FOR_FIND_TEMPORARY_TABLE
|
||||
table_list.init_one_table(direct_sql->db_names[roop_count],
|
||||
strlen(direct_sql->db_names[roop_count]),
|
||||
direct_sql->table_names[roop_count],
|
||||
strlen(direct_sql->table_names[roop_count]),
|
||||
direct_sql->table_names[roop_count], TL_WRITE);
|
||||
#else
|
||||
table_list.db = direct_sql->db_names[roop_count];
|
||||
table_list.table_name = direct_sql->table_names[roop_count];
|
||||
#endif
|
||||
if (!(direct_sql->tables[roop_count] =
|
||||
find_temporary_table(thd, &table_list)))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue