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
3fa541df
Commit
3fa541df
authored
Dec 20, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fixes.
parent
495082a6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
66 deletions
+9
-66
sql/sql_class.cc
sql/sql_class.cc
+0
-64
sql/sql_prepare.cc
sql/sql_prepare.cc
+7
-0
tests/client_test.c
tests/client_test.c
+2
-2
No files found.
sql/sql_class.cc
View file @
3fa541df
...
...
@@ -1354,67 +1354,3 @@ void TMP_TABLE_PARAM::init()
group_parts
=
group_length
=
group_null_parts
=
0
;
quick_group
=
1
;
}
/****************************************************************************
Statement functions
****************************************************************************/
Statement
::
Statement
(
THD
*
thd
)
:
id
(
++
thd
->
statement_id_counter
),
query_id
(
0
),
/* initialized later */
set_query_id
(
1
),
allow_sum_func
(
0
),
/* initialized later */
command
(
COM_SLEEP
),
/* initialized later */
lex
(
&
main_lex
),
query
(
0
),
/* these two are set */
query_length
(
0
),
/* in alloc_query() */
free_list
(
0
)
{
init_sql_alloc
(
&
mem_root
,
thd
->
variables
.
query_alloc_block_size
,
thd
->
variables
.
query_prealloc_size
);
}
Statement
::
Statement
()
:
id
(
0
),
query_id
(
0
),
set_query_id
(
1
),
allow_sum_func
(
0
),
command
(
COM_SLEEP
),
lex
(
&
main_lex
),
query
(
0
),
query_length
(
0
),
free_list
(
0
)
{
bzero
((
char
*
)
&
mem_root
,
sizeof
(
mem_root
));
}
Statement
::~
Statement
()
{
free_root
(
&
mem_root
,
MYF
(
0
));
}
C_MODE_START
static
byte
*
get_statement_id_as_hash_key
(
const
byte
*
record
,
uint
*
key_length
,
my_bool
not_used
__attribute__
((
unused
)))
{
const
Statement
*
statement
=
(
const
Statement
*
)
record
;
*
key_length
=
sizeof
(
statement
->
id
);
return
(
byte
*
)
&
((
const
Statement
*
)
statement
)
->
id
;
}
C_MODE_END
Statement_map
::
Statement_map
()
{
enum
{
START_HASH_SIZE
=
16
};
hash_init
(
&
st_hash
,
default_charset_info
,
START_HASH_SIZE
,
0
,
0
,
get_statement_id_as_hash_key
,
(
hash_free_key
)
0
,
MYF
(
0
));
}
sql/sql_prepare.cc
View file @
3fa541df
...
...
@@ -937,6 +937,13 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length)
DBUG_RETURN
(
0
);
yyparse_err:
if
(
thd
->
lex
->
sphead
)
{
if
(
lex
!=
thd
->
lex
)
thd
->
lex
->
sphead
->
restore_lex
(
thd
);
delete
thd
->
lex
->
sphead
;
thd
->
lex
->
sphead
=
NULL
;
}
lex_end
(
lex
);
stmt
->
set_statement
(
thd
);
thd
->
set_statement
(
&
thd
->
stmt_backup
);
...
...
tests/client_test.c
View file @
3fa541df
...
...
@@ -6735,8 +6735,8 @@ static void test_explain_bug()
verify_prepare_field
(
result
,
5
,
"key"
,
""
,
MYSQL_TYPE_VAR_STRING
,
""
,
""
,
""
,
NAME_LEN
,
0
);
verify_prepare_field
(
result
,
6
,
"key_len"
,
""
,
MYSQL_TYPE_
LONGLO
NG
,
""
,
""
,
""
,
3
,
0
);
verify_prepare_field
(
result
,
6
,
"key_len"
,
""
,
MYSQL_TYPE_
VAR_STRI
NG
,
""
,
""
,
""
,
NAME_LEN
*
32
,
0
);
verify_prepare_field
(
result
,
7
,
"ref"
,
""
,
MYSQL_TYPE_VAR_STRING
,
""
,
""
,
""
,
NAME_LEN
*
16
,
0
);
...
...
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