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
8a442c4e
Commit
8a442c4e
authored
Feb 20, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after review fix
parent
47fb235e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
21 deletions
+36
-21
sql/item.h
sql/item.h
+2
-2
sql/item_func.h
sql/item_func.h
+3
-0
sql/item_subselect.cc
sql/item_subselect.cc
+1
-2
sql/sql_base.cc
sql/sql_base.cc
+5
-8
sql/sql_prepare.cc
sql/sql_prepare.cc
+24
-8
tests/client_test.c
tests/client_test.c
+1
-1
No files found.
sql/item.h
View file @
8a442c4e
...
...
@@ -419,7 +419,7 @@ class Item_int :public Item
int
save_in_field
(
Field
*
field
,
bool
no_conversions
);
bool
basic_const_item
()
const
{
return
1
;
}
Item
*
new_item
()
{
return
new
Item_int
(
name
,
value
,
max_length
);
}
void
cleanup
()
{
fixed
=
1
;
}
// to pr
i
vent drop fixed flag
void
cleanup
()
{
fixed
=
1
;
}
// to pr
e
vent drop fixed flag
void
print
(
String
*
str
);
};
...
...
@@ -908,7 +908,7 @@ class Item_cache: public Item
static
Item_cache
*
get_cache
(
Item_result
type
);
table_map
used_tables
()
const
{
return
used_table_map
;
}
virtual
void
keep_array
()
{}
void
cleanup
()
{
fixed
=
1
;
}
// to pr
i
vent drop fixed flag
void
cleanup
()
{
fixed
=
1
;
}
// to pr
e
vent drop fixed flag
void
print
(
String
*
str
);
};
...
...
sql/item_func.h
View file @
8a442c4e
...
...
@@ -1009,7 +1009,10 @@ class Item_func_match :public Item_real_func
table
->
fulltext_searched
=
0
;
}
if
(
concat
)
{
delete
concat
;
concat
=
0
;
}
DBUG_VOID_RETURN
;
}
enum
Functype
functype
()
const
{
return
FT_FUNC
;
}
...
...
sql/item_subselect.cc
View file @
8a442c4e
...
...
@@ -57,8 +57,7 @@ void Item_subselect::init(st_select_lex *select_lex,
unit
=
select_lex
->
master_unit
();
if
(
select_lex
->
next_select
())
engine
=
new
subselect_union_engine
(
unit
,
result
,
this
);
engine
=
new
subselect_union_engine
(
unit
,
result
,
this
);
else
engine
=
new
subselect_single_select_engine
(
select_lex
,
result
,
this
);
DBUG_VOID_RETURN
;
...
...
sql/sql_base.cc
View file @
8a442c4e
...
...
@@ -1631,14 +1631,6 @@ int open_and_lock_tables(THD *thd, TABLE_LIST *tables)
if
(
open_tables
(
thd
,
tables
,
&
counter
)
||
lock_tables
(
thd
,
tables
,
counter
))
DBUG_RETURN
(
-
1
);
/* purecov: inspected */
fix_tables_pointers
(
thd
->
lex
->
all_selects_list
);
/*
open temporary memory pool, which will be closed in
mysql_test_select_fields, mysql_test_upd_fields or
mysql_test_insert_fields
*/
if
(
thd
->
current_statement
)
thd
->
ps_setup_prepare_memory
();
DBUG_RETURN
(
mysql_handle_derived
(
thd
->
lex
));
}
...
...
@@ -2089,6 +2081,11 @@ int setup_wild(THD *thd, TABLE_LIST *tables, List<Item> &fields,
if
(
!
wild_num
)
return
0
;
Statement
*
stmt
=
thd
->
current_statement
,
backup
;
/*
If we are in preparing prepared statement phase then we have change
temporary mem_root to statement mem root to save changes of SELECT list
*/
if
(
stmt
)
thd
->
set_n_backup_item_arena
(
stmt
,
&
backup
);
reg2
Item
*
item
;
...
...
sql/sql_prepare.cc
View file @
8a442c4e
...
...
@@ -621,9 +621,14 @@ static bool mysql_test_insert_fields(Prepared_statement *stmt,
(
grant_option
&&
check_grant
(
thd
,
privilege
,
table_list
,
0
,
0
)))
DBUG_RETURN
(
1
);
#endif
/*
open temporary memory pool for temporary data allocated by derived
tables & preparation procedure
*/
thd
->
ps_setup_prepare_memory
();
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
);
}
...
...
@@ -692,6 +697,12 @@ static bool mysql_test_upd_fields(Prepared_statement *stmt,
(
grant_option
&&
check_grant
(
thd
,
UPDATE_ACL
,
table_list
,
0
,
0
)))
DBUG_RETURN
(
1
);
#endif
/*
open temporary memory pool for temporary data allocated by derived
tables & preparation procedure
*/
thd
->
ps_setup_prepare_memory
();
if
(
open_and_lock_tables
(
thd
,
table_list
))
{
// this memory pool was opened in open_and_lock_tables
...
...
@@ -761,13 +772,14 @@ static bool mysql_test_select_fields(Prepared_statement *stmt,
if
((
&
lex
->
select_lex
!=
lex
->
all_selects_list
&&
lex
->
unit
.
create_total_list
(
thd
,
lex
,
&
tables
)))
DBUG_RETURN
(
1
);
/*
open temporary memory pool for temporary data allocated by derived
tables & preparation procedure
*/
thd
->
ps_setup_prepare_memory
();
if
(
open_and_lock_tables
(
thd
,
tables
))
{
// this memory pool was opened in open_and_lock_tables
thd
->
ps_setup_free_memory
();
DBUG_RETURN
(
1
);
}
goto
err
;
if
(
lex
->
describe
)
{
...
...
@@ -985,6 +997,10 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length)
thd
->
current_statement
=
0
;
DBUG_RETURN
(
1
);
insert_stmt_err:
stmt
->
set_statement
(
thd
);
thd
->
set_statement
(
&
thd
->
stmt_backup
);
/* Statement map deletes statement on erase */
thd
->
stmt_map
.
erase
(
stmt
);
thd
->
current_statement
=
0
;
delete
stmt
;
DBUG_RETURN
(
1
);
...
...
@@ -1068,7 +1084,7 @@ void mysql_stmt_execute(THD *thd, char *packet)
SELECT_LEX_UNIT
*
unit
=
sl
->
master_unit
();
unit
->
unclean
();
unit
->
types
.
empty
();
// for derived tables & PS (which can't be reset b
u
Item_subquery)
// for derived tables & PS (which can't be reset b
y
Item_subquery)
unit
->
reinit_exec_mechanism
();
}
}
...
...
tests/client_test.c
View file @
8a442c4e
...
...
@@ -8538,7 +8538,7 @@ int main(int argc, char **argv)
test_stmt_close
();
/* mysql_stmt_close() test -- hangs */
test_prepare_field_result
();
/* prepare meta info */
test_multi_stmt
();
/* multi stmt test */
/* test_multi_statements(); */
/* test multi statement execution */
test_multi_statements
();
/* test multi statement execution */
test_store_result
();
/* test the store_result */
test_store_result1
();
/* test store result without buffers */
test_store_result2
();
/* test store result for misc case */
...
...
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