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
5961d472
Commit
5961d472
authored
Nov 01, 2006
by
dlenev@mockturtle.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into mockturtle.local:/home/dlenev/src/mysql-5.0-hash-2
parents
75881599
bd1b57f9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
2 deletions
+21
-2
include/hash.h
include/hash.h
+2
-0
sql/sp.cc
sql/sp.cc
+4
-0
sql/sql_lex.cc
sql/sql_lex.cc
+10
-1
sql/sql_lex.h
sql/sql_lex.h
+5
-1
No files found.
include/hash.h
View file @
5961d472
...
@@ -65,6 +65,8 @@ my_bool hash_check(HASH *hash); /* Only in debug library */
...
@@ -65,6 +65,8 @@ my_bool hash_check(HASH *hash); /* Only in debug library */
#define hash_clear(H) bzero((char*) (H),sizeof(*(H)))
#define hash_clear(H) bzero((char*) (H),sizeof(*(H)))
#define hash_inited(H) ((H)->array.buffer != 0)
#define hash_inited(H) ((H)->array.buffer != 0)
#define hash_init_opt(A,B,C,D,E,F,G,H) \
(!hash_inited(A) && _hash_init(A,B,C,D,E,F,G, H CALLER_INFO))
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
sql/sp.cc
View file @
5961d472
...
@@ -1369,6 +1369,10 @@ static bool add_used_routine(LEX *lex, Query_arena *arena,
...
@@ -1369,6 +1369,10 @@ static bool add_used_routine(LEX *lex, Query_arena *arena,
const
LEX_STRING
*
key
,
const
LEX_STRING
*
key
,
TABLE_LIST
*
belong_to_view
)
TABLE_LIST
*
belong_to_view
)
{
{
hash_init_opt
(
&
lex
->
sroutines
,
system_charset_info
,
Query_tables_list
::
START_SROUTINES_HASH_SIZE
,
0
,
0
,
sp_sroutine_key
,
0
,
0
);
if
(
!
hash_search
(
&
lex
->
sroutines
,
(
byte
*
)
key
->
str
,
key
->
length
))
if
(
!
hash_search
(
&
lex
->
sroutines
,
(
byte
*
)
key
->
str
,
key
->
length
))
{
{
Sroutine_hash_entry
*
rn
=
Sroutine_hash_entry
*
rn
=
...
...
sql/sql_lex.cc
View file @
5961d472
...
@@ -1634,9 +1634,18 @@ void Query_tables_list::reset_query_tables_list(bool init)
...
@@ -1634,9 +1634,18 @@ void Query_tables_list::reset_query_tables_list(bool init)
query_tables_last
=
&
query_tables
;
query_tables_last
=
&
query_tables
;
query_tables_own_last
=
0
;
query_tables_own_last
=
0
;
if
(
init
)
if
(
init
)
hash_init
(
&
sroutines
,
system_charset_info
,
0
,
0
,
0
,
sp_sroutine_key
,
0
,
0
);
{
/*
We delay real initialization of hash (and therefore related
memory allocation) until first insertion into this hash.
*/
hash_clear
(
&
sroutines
);
}
else
if
(
sroutines
.
records
)
else
if
(
sroutines
.
records
)
{
/* Non-zero sroutines.records means that hash was initialized. */
my_hash_reset
(
&
sroutines
);
my_hash_reset
(
&
sroutines
);
}
sroutines_list
.
empty
();
sroutines_list
.
empty
();
sroutines_list_own_last
=
sroutines_list
.
next
;
sroutines_list_own_last
=
sroutines_list
.
next
;
sroutines_list_own_elements
=
0
;
sroutines_list_own_elements
=
0
;
...
...
sql/sql_lex.h
View file @
5961d472
...
@@ -743,7 +743,11 @@ public:
...
@@ -743,7 +743,11 @@ public:
0 - indicates that this query does not need prelocking.
0 - indicates that this query does not need prelocking.
*/
*/
TABLE_LIST
**
query_tables_own_last
;
TABLE_LIST
**
query_tables_own_last
;
/* Set of stored routines called by statement. */
/*
Set of stored routines called by statement.
(Note that we use lazy-initialization for this hash).
*/
enum
{
START_SROUTINES_HASH_SIZE
=
16
};
HASH
sroutines
;
HASH
sroutines
;
/*
/*
List linking elements of 'sroutines' set. Allows you to add new elements
List linking elements of 'sroutines' set. Allows you to add new elements
...
...
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