Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f2a53539
Commit
f2a53539
authored
Mar 25, 2014
by
Kentoku SHIBA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
find temporary table
parent
27772bd7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
storage/spider/spd_db_conn.cc
storage/spider/spd_db_conn.cc
+8
-4
storage/spider/spd_direct_sql.cc
storage/spider/spd_direct_sql.cc
+12
-0
No files found.
storage/spider/spd_db_conn.cc
View file @
f2a53539
...
...
@@ -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
)
...
...
storage/spider/spd_direct_sql.cc
View file @
f2a53539
...
...
@@ -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
)))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment