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
fc945987
Commit
fc945987
authored
Jan 20, 2003
by
venu@myvenu.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work.mysql.com:/home/bk/mysql-4.1
into myvenu.com:/home/venu/bk/src-4.1
parents
a4a95cb2
643264db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
10 deletions
+29
-10
sql/sql_parse.cc
sql/sql_parse.cc
+24
-9
sql/sql_prepare.cc
sql/sql_prepare.cc
+5
-1
No files found.
sql/sql_parse.cc
View file @
fc945987
...
...
@@ -1199,6 +1199,29 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
mysql_log
.
write
(
thd
,
command
,
"%s"
,
thd
->
query
);
DBUG_PRINT
(
"query"
,(
"%-.4096s"
,
thd
->
query
));
mysql_parse
(
thd
,
thd
->
query
,
thd
->
query_length
);
while
(
!
thd
->
fatal_error
&&
thd
->
lex
.
found_colon
)
{
/*
Multiple queries exits, execute them individually
*/
if
(
thd
->
lock
||
thd
->
open_tables
||
thd
->
derived_tables
)
close_thread_tables
(
thd
);
uint
length
=
thd
->
query_length
-
(
uint
)(
thd
->
lex
.
found_colon
-
thd
->
query
);
/* Remove garbage at start of query */
char
*
packet
=
thd
->
lex
.
found_colon
;
while
(
my_isspace
(
system_charset_info
,
packet
[
0
])
&&
length
>
0
)
{
packet
++
;
length
--
;
}
thd
->
query
=
packet
;
thd
->
query_length
=
length
;
mysql_parse
(
thd
,
packet
,
length
);
}
if
(
!
(
specialflag
&
SPECIAL_NO_PRIOR
))
my_pthread_setprio
(
pthread_self
(),
WAIT_PRIOR
);
DBUG_PRINT
(
"info"
,(
"query ready"
));
...
...
@@ -1426,14 +1449,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
mysql_slow_log
.
write
(
thd
,
thd
->
query
,
thd
->
query_length
,
start_of_query
);
}
}
if
(
command
==
COM_QUERY
&&
thd
->
lex
.
found_colon
)
{
/*
Multiple queries exits, execute them individually
*/
uint
length
=
thd
->
query_length
-
(
uint
)(
thd
->
lex
.
found_colon
-
thd
->
query
)
+
1
;
dispatch_command
(
command
,
thd
,
thd
->
lex
.
found_colon
,
length
);
}
thd
->
proc_info
=
"cleaning up"
;
VOID
(
pthread_mutex_lock
(
&
LOCK_thread_count
));
// For process list
thd
->
proc_info
=
0
;
...
...
@@ -1464,7 +1479,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
bool
alloc_query
(
THD
*
thd
,
char
*
packet
,
ulong
packet_length
)
{
packet_length
--
;
// Remove end null
/* Remove garage at start and end of query */
/* Remove gar
b
age at start and end of query */
while
(
my_isspace
(
system_charset_info
,
packet
[
0
])
&&
packet_length
>
0
)
{
packet
++
;
...
...
sql/sql_prepare.cc
View file @
fc945987
...
...
@@ -30,7 +30,11 @@ This file contains the implementation of prepare and executes.
- Without executing the query, return back to client the total
number of parameters along with result-set metadata information
(if any) in the following format:
[STMT_ID:4][Columns:2][Param_count:2][Columns meta info][Params meta info]
[STMT_ID:4]
[Column_count:2]
[Param_count:2]
[Columns meta info] (if Column_count > 0)
[Params meta info] (if Param_count > 0 ) (TODO : 4.1.1)
Prepare-execute:
...
...
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