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
c6c1efba
Commit
c6c1efba
authored
Feb 20, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after review changes
parent
8a442c4e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
28 deletions
+19
-28
sql/sql_class.h
sql/sql_class.h
+2
-2
sql/sql_prepare.cc
sql/sql_prepare.cc
+17
-26
No files found.
sql/sql_class.h
View file @
c6c1efba
...
@@ -911,7 +911,7 @@ public:
...
@@ -911,7 +911,7 @@ public:
inline
CHARSET_INFO
*
charset
()
{
return
variables
.
character_set_client
;
}
inline
CHARSET_INFO
*
charset
()
{
return
variables
.
character_set_client
;
}
void
update_charset
();
void
update_charset
();
inline
void
ps_setup_prepare_memory
()
inline
void
allocate_temporary_memory_pool_for_ps_preparing
()
{
{
DBUG_ASSERT
(
current_statement
!=
0
);
DBUG_ASSERT
(
current_statement
!=
0
);
/*
/*
...
@@ -928,7 +928,7 @@ public:
...
@@ -928,7 +928,7 @@ public:
variables
.
query_prealloc_size
);
variables
.
query_prealloc_size
);
free_list
=
0
;
free_list
=
0
;
}
}
inline
void
ps_setup_free_memory
()
inline
void
free_temporary_memory_pool_for_ps_preparing
()
{
{
DBUG_ASSERT
(
current_statement
!=
0
);
DBUG_ASSERT
(
current_statement
!=
0
);
cleanup_items
(
current_statement
->
free_list
);
cleanup_items
(
current_statement
->
free_list
);
...
...
sql/sql_prepare.cc
View file @
c6c1efba
...
@@ -626,10 +626,10 @@ static bool mysql_test_insert_fields(Prepared_statement *stmt,
...
@@ -626,10 +626,10 @@ static bool mysql_test_insert_fields(Prepared_statement *stmt,
open temporary memory pool for temporary data allocated by derived
open temporary memory pool for temporary data allocated by derived
tables & preparation procedure
tables & preparation procedure
*/
*/
thd
->
ps_setup_prepare_memory
();
thd
->
allocate_temporary_memory_pool_for_ps_preparing
();
if
(
open_and_lock_tables
(
thd
,
table_list
))
if
(
open_and_lock_tables
(
thd
,
table_list
))
{
{
thd
->
ps_setup_free_memory
();
thd
->
free_temporary_memory_pool_for_ps_preparing
();
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
...
@@ -642,11 +642,10 @@ static bool mysql_test_insert_fields(Prepared_statement *stmt,
...
@@ -642,11 +642,10 @@ static bool mysql_test_insert_fields(Prepared_statement *stmt,
if
(
check_insert_fields
(
thd
,
table
,
fields
,
*
values
,
1
))
if
(
check_insert_fields
(
thd
,
table
,
fields
,
*
values
,
1
))
{
{
thd
->
ps_setup_free_memory
();
thd
->
free_temporary_memory_pool_for_ps_preparing
();
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
// this memory pool was opened in open_and_lock_tables
thd
->
free_temporary_memory_pool_for_ps_preparing
();
thd
->
ps_setup_free_memory
();
value_count
=
values
->
elements
;
value_count
=
values
->
elements
;
its
.
rewind
();
its
.
rewind
();
...
@@ -665,8 +664,7 @@ static bool mysql_test_insert_fields(Prepared_statement *stmt,
...
@@ -665,8 +664,7 @@ static bool mysql_test_insert_fields(Prepared_statement *stmt,
}
}
else
else
{
{
// this memory pool was opened in open_and_lock_tables
thd
->
free_temporary_memory_pool_for_ps_preparing
();
thd
->
ps_setup_free_memory
();
}
}
if
(
send_prep_stmt
(
stmt
,
0
))
if
(
send_prep_stmt
(
stmt
,
0
))
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
...
@@ -702,24 +700,16 @@ static bool mysql_test_upd_fields(Prepared_statement *stmt,
...
@@ -702,24 +700,16 @@ static bool mysql_test_upd_fields(Prepared_statement *stmt,
open temporary memory pool for temporary data allocated by derived
open temporary memory pool for temporary data allocated by derived
tables & preparation procedure
tables & preparation procedure
*/
*/
thd
->
ps_setup_prepare_memory
();
thd
->
allocate_temporary_memory_pool_for_ps_preparing
();
if
(
open_and_lock_tables
(
thd
,
table_list
))
{
// this memory pool was opened in open_and_lock_tables
thd
->
ps_setup_free_memory
();
DBUG_RETURN
(
1
);
}
if
(
open_and_lock_tables
(
thd
,
table_list
))
goto
err
;
if
(
setup_tables
(
table_list
)
||
if
(
setup_tables
(
table_list
)
||
setup_fields
(
thd
,
0
,
table_list
,
fields
,
1
,
0
,
0
)
||
setup_fields
(
thd
,
0
,
table_list
,
fields
,
1
,
0
,
0
)
||
setup_conds
(
thd
,
table_list
,
&
conds
)
||
thd
->
net
.
report_error
)
setup_conds
(
thd
,
table_list
,
&
conds
)
||
thd
->
net
.
report_error
)
{
goto
err
;
// this memory pool was opened in open_and_lock_tables
thd
->
ps_setup_free_memory
();
thd
->
free_temporary_memory_pool_for_ps_preparing
();
DBUG_RETURN
(
1
);
}
// this memory pool was opened in open_and_lock_tables
thd
->
ps_setup_free_memory
();
/*
/*
Currently return only column list info only, and we are not
Currently return only column list info only, and we are not
...
@@ -728,6 +718,9 @@ static bool mysql_test_upd_fields(Prepared_statement *stmt,
...
@@ -728,6 +718,9 @@ static bool mysql_test_upd_fields(Prepared_statement *stmt,
if
(
send_prep_stmt
(
stmt
,
0
))
if
(
send_prep_stmt
(
stmt
,
0
))
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
err:
thd
->
free_temporary_memory_pool_for_ps_preparing
();
DBUG_RETURN
(
1
);
}
}
/*
/*
...
@@ -777,7 +770,7 @@ static bool mysql_test_select_fields(Prepared_statement *stmt,
...
@@ -777,7 +770,7 @@ static bool mysql_test_select_fields(Prepared_statement *stmt,
open temporary memory pool for temporary data allocated by derived
open temporary memory pool for temporary data allocated by derived
tables & preparation procedure
tables & preparation procedure
*/
*/
thd
->
ps_setup_prepare_memory
();
thd
->
allocate_temporary_memory_pool_for_ps_preparing
();
if
(
open_and_lock_tables
(
thd
,
tables
))
if
(
open_and_lock_tables
(
thd
,
tables
))
goto
err
;
goto
err
;
...
@@ -809,15 +802,13 @@ static bool mysql_test_select_fields(Prepared_statement *stmt,
...
@@ -809,15 +802,13 @@ static bool mysql_test_select_fields(Prepared_statement *stmt,
unit
->
cleanup
();
unit
->
cleanup
();
}
}
// this memory pool was opened in open_and_lock_tables
thd
->
free_temporary_memory_pool_for_ps_preparing
();
thd
->
ps_setup_free_memory
();
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
err_prep:
err_prep:
unit
->
cleanup
();
unit
->
cleanup
();
err:
err:
// this memory pool was opened in open_and_lock_tables
thd
->
free_temporary_memory_pool_for_ps_preparing
();
thd
->
ps_setup_free_memory
();
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
...
...
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