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
75fc0ac4
Commit
75fc0ac4
authored
Dec 14, 2004
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-merge-fix
parents
a7147bec
afd45205
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
sql/sql_prepare.cc
sql/sql_prepare.cc
+23
-0
No files found.
sql/sql_prepare.cc
View file @
75fc0ac4
...
...
@@ -1514,6 +1514,27 @@ static bool init_param_array(Prepared_statement *stmt)
}
/* Init statement before execution */
static
void
cleanup_stmt_for_execute
(
Prepared_statement
*
stmt
)
{
THD
*
thd
=
stmt
->
thd
;
LEX
*
lex
=
stmt
->
lex
;
SELECT_LEX
*
sl
=
lex
->
all_selects_list
;
for
(;
sl
;
sl
=
sl
->
next_select_in_list
())
{
for
(
TABLE_LIST
*
tables
=
(
TABLE_LIST
*
)
sl
->
table_list
.
first
;
tables
;
tables
=
tables
->
next
)
{
if
(
tables
->
table
)
tables
->
table
->
insert_values
=
0
;
}
}
}
/*
Given a query string with parameter markers, create a Prepared Statement
from it and send PS info back to the client.
...
...
@@ -1614,6 +1635,7 @@ int mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
if
(
!
error
)
error
=
send_prepare_results
(
stmt
,
test
(
name
));
cleanup_stmt_for_execute
(
stmt
);
/* restore to WAIT_PRIOR: QUERY_PRIOR is set inside alloc_query */
if
(
!
(
specialflag
&
SPECIAL_NO_PRIOR
))
...
...
@@ -1904,6 +1926,7 @@ static void execute_stmt(THD *thd, Prepared_statement *stmt,
reset_stmt_params
(
stmt
);
close_thread_tables
(
thd
);
// to close derived tables
thd
->
set_statement
(
&
thd
->
stmt_backup
);
cleanup_stmt_for_execute
(
stmt
);
DBUG_VOID_RETURN
;
}
...
...
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