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
8980fe21
Commit
8980fe21
authored
Oct 06, 2003
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.stmt
parents
ba26a1aa
a5f9c695
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+4
-1
sql/sql_class.h
sql/sql_class.h
+2
-0
sql/sql_prepare.cc
sql/sql_prepare.cc
+10
-1
No files found.
libmysqld/lib_sql.cc
View file @
8980fe21
...
...
@@ -75,7 +75,10 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
client). So we have to call free_old_query here
*/
free_old_query
(
mysql
);
if
(
!
arg
)
thd
->
extra_length
=
arg_length
;
thd
->
extra_data
=
(
char
*
)
arg
;
if
(
header
)
{
arg
=
header
;
arg_length
=
header_length
;
...
...
sql/sql_class.h
View file @
8980fe21
...
...
@@ -430,6 +430,8 @@ class THD :public ilink
unsigned
long
client_stmt_id
;
unsigned
long
client_param_count
;
struct
st_mysql_bind
*
client_params
;
char
*
extra_data
;
ulong
extra_length
;
#endif
NET
net
;
// client connection descriptor
LEX
lex
;
// parse tree descriptor
...
...
sql/sql_prepare.cc
View file @
8980fe21
...
...
@@ -1088,16 +1088,17 @@ void mysql_stmt_get_longdata(THD *thd, char *pos, ulong packet_length)
PREP_STMT
*
stmt
;
DBUG_ENTER
(
"mysql_stmt_get_longdata"
);
#ifndef EMBEDDED_LIBRARY
/* The following should never happen */
if
(
packet_length
<
MYSQL_LONG_DATA_HEADER
+
1
)
{
my_error
(
ER_WRONG_ARGUMENTS
,
MYF
(
0
),
"get_longdata"
);
DBUG_VOID_RETURN
;
}
#endif
ulong
stmt_id
=
uint4korr
(
pos
);
uint
param_number
=
uint2korr
(
pos
+
4
);
pos
+=
MYSQL_LONG_DATA_HEADER
;
// Point to data
if
(
!
(
stmt
=
find_prepared_statement
(
thd
,
stmt_id
,
"get_longdata"
)))
{
...
...
@@ -1109,6 +1110,7 @@ void mysql_stmt_get_longdata(THD *thd, char *pos, ulong packet_length)
DBUG_VOID_RETURN
;
}
#ifndef EMBEDDED_LIBRARY
if
(
param_number
>=
stmt
->
param_count
)
{
/* Error will be sent in execute call */
...
...
@@ -1117,8 +1119,15 @@ void mysql_stmt_get_longdata(THD *thd, char *pos, ulong packet_length)
sprintf
(
stmt
->
last_error
,
ER
(
ER_WRONG_ARGUMENTS
),
"get_longdata"
);
DBUG_VOID_RETURN
;
}
pos
+=
MYSQL_LONG_DATA_HEADER
;
// Point to data
#endif
Item_param
*
param
=
*
(
stmt
->
param
+
param_number
);
#ifndef EMBEDDED_LIBRARY
param
->
set_longdata
(
pos
,
packet_length
-
MYSQL_LONG_DATA_HEADER
-
1
);
#else
param
->
set_longdata
(
thd
->
extra_data
,
thd
->
extra_length
);
#endif
stmt
->
long_data_used
=
1
;
DBUG_VOID_RETURN
;
}
...
...
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