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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0d294e1b
Commit
0d294e1b
authored
Jan 11, 2003
by
venu@myvenu.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix to make the tables re-inited for every execute call
parent
15243fe9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
sql/sql_prepare.cc
sql/sql_prepare.cc
+21
-1
No files found.
sql/sql_prepare.cc
View file @
0d294e1b
...
@@ -628,7 +628,7 @@ static bool parse_prepare_query(PREP_STMT *stmt,
...
@@ -628,7 +628,7 @@ static bool parse_prepare_query(PREP_STMT *stmt,
Initialize parameter items in statement
Initialize parameter items in statement
*/
*/
static
bool
init_param_items
(
PREP_STMT
*
stmt
)
static
bool
init_param_items
(
PREP_STMT
*
stmt
)
{
{
List
<
Item
>
&
params
=
stmt
->
thd
->
lex
.
param_list
;
List
<
Item
>
&
params
=
stmt
->
thd
->
lex
.
param_list
;
Item_param
**
to
;
Item_param
**
to
;
...
@@ -642,6 +642,24 @@ static bool init_param_items( PREP_STMT *stmt)
...
@@ -642,6 +642,24 @@ static bool init_param_items( PREP_STMT *stmt)
return
0
;
return
0
;
}
}
/*
Initialize stmt execution
*/
static
void
init_stmt_execute
(
PREP_STMT
*
stmt
)
{
THD
*
thd
=
stmt
->
thd
;
TABLE_LIST
*
tables
=
(
TABLE_LIST
*
)
thd
->
lex
.
select_lex
.
table_list
.
first
;
/*
TODO: When the new table structure is ready, then have a status bit
to indicate the table is altered, and re-do the setup_*
and open the tables back.
*/
if
(
tables
)
tables
->
table
=
0
;
//safety - nasty init
}
/*
/*
Parse the query and send the total number of parameters
Parse the query and send the total number of parameters
and resultset metadata information back to client (if any),
and resultset metadata information back to client (if any),
...
@@ -722,6 +740,8 @@ void mysql_stmt_execute(THD *thd, char *packet)
...
@@ -722,6 +740,8 @@ void mysql_stmt_execute(THD *thd, char *packet)
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
init_stmt_execute
(
stmt
);
if
(
stmt
->
param_count
&&
setup_params_data
(
stmt
))
if
(
stmt
->
param_count
&&
setup_params_data
(
stmt
))
DBUG_VOID_RETURN
;
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