mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix to have a reserved OK byte (prepare result)
This commit is contained in:
@ -3925,7 +3925,7 @@ static my_bool read_prepare_result(MYSQL_STMT *stmt)
|
|||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
|
|
||||||
pos= (uchar*) mysql->net.read_pos;
|
pos= (uchar*) mysql->net.read_pos;
|
||||||
stmt->stmt_id= uint4korr(pos); pos+=4;
|
stmt->stmt_id= uint4korr(pos+1); pos+= 5;
|
||||||
field_count= uint2korr(pos); pos+= 2;
|
field_count= uint2korr(pos); pos+= 2;
|
||||||
param_count= uint2korr(pos); pos+= 2;
|
param_count= uint2korr(pos); pos+= 2;
|
||||||
|
|
||||||
|
@ -145,10 +145,11 @@ void free_prep_stmt(PREP_STMT *stmt, TREE_FREE mode, void *not_used)
|
|||||||
static bool send_prep_stmt(PREP_STMT *stmt, uint columns)
|
static bool send_prep_stmt(PREP_STMT *stmt, uint columns)
|
||||||
{
|
{
|
||||||
NET *net=&stmt->thd->net;
|
NET *net=&stmt->thd->net;
|
||||||
char buff[8];
|
char buff[9];
|
||||||
int4store(buff, stmt->stmt_id);
|
buff[0]= 0;
|
||||||
int2store(buff+4, columns);
|
int4store(buff+1, stmt->stmt_id);
|
||||||
int2store(buff+6, stmt->param_count);
|
int2store(buff+5, columns);
|
||||||
|
int2store(buff+7, stmt->param_count);
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
/* This should be fixed to work with prepared statements
|
/* This should be fixed to work with prepared statements
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user