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
c661f473
Commit
c661f473
authored
Jun 03, 2005
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-root
parents
cce70dd1
e2a37c63
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
6 deletions
+7
-6
sql/item.cc
sql/item.cc
+1
-1
sql/item_subselect.cc
sql/item_subselect.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+2
-1
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
sql/sql_union.cc
sql/sql_union.cc
+1
-1
No files found.
sql/item.cc
View file @
c661f473
...
...
@@ -1027,7 +1027,7 @@ Item_field::Item_field(THD *thd, Field *f)
structure can go away and pop up again between subsequent executions
of a prepared statement).
*/
if
(
thd
->
current_arena
->
is_stmt_prepare
())
if
(
thd
->
current_arena
->
is_stmt_prepare
_or_first_sp_execute
())
{
if
(
db_name
)
orig_db_name
=
thd
->
strdup
(
db_name
);
...
...
sql/item_subselect.cc
View file @
c661f473
...
...
@@ -362,7 +362,7 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
because we do not rollback this changes
TODO: make rollback for it, or special name resolving mode in 5.0.
*/
!
arena
->
is_stmt_prepare
()
!
arena
->
is_stmt_prepare
_or_first_sp_execute
()
)
{
...
...
sql/sql_class.h
View file @
c661f473
...
...
@@ -695,7 +695,8 @@ public:
virtual
Type
type
()
const
;
virtual
~
Item_arena
()
{};
inline
bool
is_stmt_prepare
()
const
{
return
(
int
)
state
<
(
int
)
PREPARED
;
}
inline
bool
is_stmt_prepare_or_first_sp_execute
()
const
{
return
(
int
)
state
<
(
int
)
PREPARED
;
}
inline
bool
is_first_stmt_execute
()
const
{
return
state
==
PREPARED
;
}
inline
bool
is_stmt_execute
()
const
{
return
state
==
PREPARED
||
state
==
EXECUTED
;
}
...
...
sql/sql_parse.cc
View file @
c661f473
...
...
@@ -5894,7 +5894,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
ptr
->
db
=
empty_c_string
;
ptr
->
db_length
=
0
;
}
if
(
thd
->
current_arena
->
is_stmt_prepare
())
if
(
thd
->
current_arena
->
is_stmt_prepare
_or_first_sp_execute
())
ptr
->
db
=
thd
->
strdup
(
ptr
->
db
);
ptr
->
alias
=
alias_str
;
...
...
@@ -6972,7 +6972,7 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
against the opened tables to ensure we don't use a table that is part
of the view (which can only be done after the table has been opened).
*/
if
(
thd
->
current_arena
->
is_stmt_prepare
())
if
(
thd
->
current_arena
->
is_stmt_prepare
_or_first_sp_execute
())
{
/*
For temporary tables we don't have to check if the created table exists
...
...
sql/sql_union.cc
View file @
c661f473
...
...
@@ -323,7 +323,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
}
if
(
tmp_arena
)
thd
->
restore_backup_item_arena
(
tmp_arena
,
&
backup
);
if
(
arena
->
is_stmt_prepare
())
if
(
arena
->
is_stmt_prepare
_or_first_sp_execute
())
{
/* prepare fake select to initialize it correctly */
init_prepare_fake_select_lex
(
thd
);
...
...
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