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
df5cf2b1
Commit
df5cf2b1
authored
Mar 17, 2008
by
davi@buzz.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge buzz.(none):/home/davi/mysql-5.0-runtime
into buzz.(none):/home/davi/mysql-5.1-runtime
parents
393c54db
44fe22e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
libmysql/libmysql.c
libmysql/libmysql.c
+12
-5
sql-common/client.c
sql-common/client.c
+7
-3
No files found.
libmysql/libmysql.c
View file @
df5cf2b1
...
@@ -2467,7 +2467,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
...
@@ -2467,7 +2467,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
int4store
(
buff
+
5
,
1
);
/* iteration count */
int4store
(
buff
+
5
,
1
);
/* iteration count */
res
=
test
(
cli_advanced_command
(
mysql
,
COM_STMT_EXECUTE
,
buff
,
sizeof
(
buff
),
res
=
test
(
cli_advanced_command
(
mysql
,
COM_STMT_EXECUTE
,
buff
,
sizeof
(
buff
),
(
uchar
*
)
packet
,
length
,
1
,
NULL
)
||
(
uchar
*
)
packet
,
length
,
1
,
stmt
)
||
(
*
mysql
->
methods
->
read_query_result
)(
mysql
));
(
*
mysql
->
methods
->
read_query_result
)(
mysql
));
stmt
->
affected_rows
=
mysql
->
affected_rows
;
stmt
->
affected_rows
=
mysql
->
affected_rows
;
stmt
->
server_status
=
mysql
->
server_status
;
stmt
->
server_status
=
mysql
->
server_status
;
...
@@ -2683,7 +2683,7 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
...
@@ -2683,7 +2683,7 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
int4store
(
buff
+
4
,
stmt
->
prefetch_rows
);
/* number of rows to fetch */
int4store
(
buff
+
4
,
stmt
->
prefetch_rows
);
/* number of rows to fetch */
if
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_STMT_FETCH
,
if
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_STMT_FETCH
,
buff
,
sizeof
(
buff
),
(
uchar
*
)
0
,
0
,
buff
,
sizeof
(
buff
),
(
uchar
*
)
0
,
0
,
1
,
NULL
))
1
,
stmt
))
{
{
set_stmt_errmsg
(
stmt
,
net
);
set_stmt_errmsg
(
stmt
,
net
);
return
1
;
return
1
;
...
@@ -3350,7 +3350,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
...
@@ -3350,7 +3350,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
*/
*/
if
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_STMT_SEND_LONG_DATA
,
if
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_STMT_SEND_LONG_DATA
,
buff
,
sizeof
(
buff
),
(
uchar
*
)
data
,
buff
,
sizeof
(
buff
),
(
uchar
*
)
data
,
length
,
1
,
NULL
))
length
,
1
,
stmt
))
{
{
set_stmt_errmsg
(
stmt
,
&
mysql
->
net
);
set_stmt_errmsg
(
stmt
,
&
mysql
->
net
);
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
...
@@ -4748,6 +4748,13 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
...
@@ -4748,6 +4748,13 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
MYSQL_DATA
*
result
=
&
stmt
->
result
;
MYSQL_DATA
*
result
=
&
stmt
->
result
;
DBUG_ENTER
(
"mysql_stmt_store_result"
);
DBUG_ENTER
(
"mysql_stmt_store_result"
);
if
(
!
mysql
)
{
/* mysql can be reset in mysql_close called from mysql_reconnect */
set_stmt_error
(
stmt
,
CR_SERVER_LOST
,
unknown_sqlstate
);
DBUG_RETURN
(
1
);
}
mysql
=
mysql
->
last_used_con
;
mysql
=
mysql
->
last_used_con
;
if
(
!
stmt
->
field_count
)
if
(
!
stmt
->
field_count
)
...
@@ -4773,7 +4780,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
...
@@ -4773,7 +4780,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
int4store
(
buff
,
stmt
->
stmt_id
);
int4store
(
buff
,
stmt
->
stmt_id
);
int4store
(
buff
+
4
,
(
int
)
~
0
);
/* number of rows to fetch */
int4store
(
buff
+
4
,
(
int
)
~
0
);
/* number of rows to fetch */
if
(
cli_advanced_command
(
mysql
,
COM_STMT_FETCH
,
buff
,
sizeof
(
buff
),
if
(
cli_advanced_command
(
mysql
,
COM_STMT_FETCH
,
buff
,
sizeof
(
buff
),
(
uchar
*
)
0
,
0
,
1
,
NULL
))
(
uchar
*
)
0
,
0
,
1
,
stmt
))
{
{
set_stmt_errmsg
(
stmt
,
net
);
set_stmt_errmsg
(
stmt
,
net
);
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
...
@@ -4960,7 +4967,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
...
@@ -4960,7 +4967,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags)
uchar
buff
[
MYSQL_STMT_HEADER
];
/* packet header: 4 bytes for stmt id */
uchar
buff
[
MYSQL_STMT_HEADER
];
/* packet header: 4 bytes for stmt id */
int4store
(
buff
,
stmt
->
stmt_id
);
int4store
(
buff
,
stmt
->
stmt_id
);
if
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_STMT_RESET
,
buff
,
if
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_STMT_RESET
,
buff
,
sizeof
(
buff
),
0
,
0
,
0
,
NULL
))
sizeof
(
buff
),
0
,
0
,
0
,
stmt
))
{
{
set_stmt_errmsg
(
stmt
,
&
mysql
->
net
);
set_stmt_errmsg
(
stmt
,
&
mysql
->
net
);
stmt
->
state
=
MYSQL_STMT_INIT_DONE
;
stmt
->
state
=
MYSQL_STMT_INIT_DONE
;
...
...
sql-common/client.c
View file @
df5cf2b1
...
@@ -732,11 +732,12 @@ my_bool
...
@@ -732,11 +732,12 @@ my_bool
cli_advanced_command
(
MYSQL
*
mysql
,
enum
enum_server_command
command
,
cli_advanced_command
(
MYSQL
*
mysql
,
enum
enum_server_command
command
,
const
uchar
*
header
,
ulong
header_length
,
const
uchar
*
header
,
ulong
header_length
,
const
uchar
*
arg
,
ulong
arg_length
,
my_bool
skip_check
,
const
uchar
*
arg
,
ulong
arg_length
,
my_bool
skip_check
,
MYSQL_STMT
*
stmt
__attribute__
((
unused
))
)
MYSQL_STMT
*
stmt
)
{
{
NET
*
net
=
&
mysql
->
net
;
NET
*
net
=
&
mysql
->
net
;
my_bool
result
=
1
;
my_bool
result
=
1
;
init_sigpipe_variables
init_sigpipe_variables
my_bool
stmt_skip
=
stmt
?
stmt
->
state
!=
MYSQL_STMT_INIT_DONE
:
FALSE
;
DBUG_ENTER
(
"cli_advanced_command"
);
DBUG_ENTER
(
"cli_advanced_command"
);
/* Don't give sigpipe errors if the client doesn't want them */
/* Don't give sigpipe errors if the client doesn't want them */
...
@@ -744,7 +745,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
...
@@ -744,7 +745,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
if
(
mysql
->
net
.
vio
==
0
)
if
(
mysql
->
net
.
vio
==
0
)
{
/* Do reconnect if possible */
{
/* Do reconnect if possible */
if
(
mysql_reconnect
(
mysql
))
if
(
mysql_reconnect
(
mysql
)
||
stmt_skip
)
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
if
(
mysql
->
status
!=
MYSQL_STATUS_READY
||
if
(
mysql
->
status
!=
MYSQL_STATUS_READY
||
...
@@ -776,7 +777,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
...
@@ -776,7 +777,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
goto
end
;
goto
end
;
}
}
end_server
(
mysql
);
end_server
(
mysql
);
if
(
mysql_reconnect
(
mysql
))
if
(
mysql_reconnect
(
mysql
)
||
stmt_skip
)
goto
end
;
goto
end
;
if
(
net_write_command
(
net
,(
uchar
)
command
,
header
,
header_length
,
if
(
net_write_command
(
net
,(
uchar
)
command
,
header
,
header_length
,
arg
,
arg_length
))
arg
,
arg_length
))
...
@@ -2523,6 +2524,9 @@ my_bool mysql_reconnect(MYSQL *mysql)
...
@@ -2523,6 +2524,9 @@ my_bool mysql_reconnect(MYSQL *mysql)
if
(
stmt
->
state
!=
MYSQL_STMT_INIT_DONE
)
if
(
stmt
->
state
!=
MYSQL_STMT_INIT_DONE
)
{
{
stmt
->
mysql
=
0
;
stmt
->
mysql
=
0
;
stmt
->
last_errno
=
CR_SERVER_LOST
;
strmov
(
stmt
->
last_error
,
ER
(
CR_SERVER_LOST
));
strmov
(
stmt
->
sqlstate
,
unknown_sqlstate
);
}
}
else
else
{
{
...
...
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