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
d6672f71
Commit
d6672f71
authored
Nov 13, 2006
by
gkodinov/kgeorge@macbook.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge macbook.gmz:/Users/kgeorge/mysql/work/B19216-4.1-opt
into macbook.gmz:/Users/kgeorge/mysql/work/B19216-5.0-opt
parents
0be7e703
9a41822b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
sql-common/client.c
sql-common/client.c
+2
-0
sql/protocol.cc
sql/protocol.cc
+8
-8
sql/protocol.h
sql/protocol.h
+0
-1
No files found.
sql-common/client.c
View file @
d6672f71
...
@@ -1191,6 +1191,8 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
...
@@ -1191,6 +1191,8 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
for
(
row
=
data
->
data
;
row
;
row
=
row
->
next
,
field
++
)
for
(
row
=
data
->
data
;
row
;
row
=
row
->
next
,
field
++
)
{
{
uchar
*
pos
;
uchar
*
pos
;
/* fields count may be wrong */
DBUG_ASSERT
((
field
-
result
)
<
fields
);
cli_fetch_lengths
(
&
lengths
[
0
],
row
->
data
,
default_value
?
8
:
7
);
cli_fetch_lengths
(
&
lengths
[
0
],
row
->
data
,
default_value
?
8
:
7
);
field
->
catalog
=
strdup_root
(
alloc
,(
char
*
)
row
->
data
[
0
]);
field
->
catalog
=
strdup_root
(
alloc
,(
char
*
)
row
->
data
[
0
]);
field
->
db
=
strdup_root
(
alloc
,(
char
*
)
row
->
data
[
1
]);
field
->
db
=
strdup_root
(
alloc
,(
char
*
)
row
->
data
[
1
]);
...
...
sql/protocol.cc
View file @
d6672f71
...
@@ -46,7 +46,7 @@ bool Protocol_prep::net_store_data(const char *from, uint length)
...
@@ -46,7 +46,7 @@ bool Protocol_prep::net_store_data(const char *from, uint length)
packet
->
realloc
(
packet_length
+
9
+
length
))
packet
->
realloc
(
packet_length
+
9
+
length
))
return
1
;
return
1
;
char
*
to
=
(
char
*
)
net_store_length
((
char
*
)
packet
->
ptr
()
+
packet_length
,
char
*
to
=
(
char
*
)
net_store_length
((
char
*
)
packet
->
ptr
()
+
packet_length
,
(
ulonglong
)
length
);
length
);
memcpy
(
to
,
from
,
length
);
memcpy
(
to
,
from
,
length
);
packet
->
length
((
uint
)
(
to
+
length
-
packet
->
ptr
()));
packet
->
length
((
uint
)
(
to
+
length
-
packet
->
ptr
()));
return
0
;
return
0
;
...
@@ -280,8 +280,8 @@ send_ok(THD *thd, ha_rows affected_rows, ulonglong id, const char *message)
...
@@ -280,8 +280,8 @@ send_ok(THD *thd, ha_rows affected_rows, ulonglong id, const char *message)
}
}
buff
[
0
]
=
0
;
// No fields
buff
[
0
]
=
0
;
// No fields
pos
=
net_store_length
(
buff
+
1
,
(
ulonglong
)
affected_rows
);
pos
=
net_store_length
(
buff
+
1
,
affected_rows
);
pos
=
net_store_length
(
pos
,
(
ulonglong
)
id
);
pos
=
net_store_length
(
pos
,
id
);
if
(
thd
->
client_capabilities
&
CLIENT_PROTOCOL_41
)
if
(
thd
->
client_capabilities
&
CLIENT_PROTOCOL_41
)
{
{
DBUG_PRINT
(
"info"
,
DBUG_PRINT
(
"info"
,
...
@@ -456,7 +456,7 @@ void net_send_error_packet(THD *thd, uint sql_errno, const char *err)
...
@@ -456,7 +456,7 @@ void net_send_error_packet(THD *thd, uint sql_errno, const char *err)
ulonglong for bigger numbers.
ulonglong for bigger numbers.
*/
*/
char
*
net_store_length
(
char
*
pkg
,
uint
length
)
static
char
*
net_store_length_fast
(
char
*
pkg
,
uint
length
)
{
{
uchar
*
packet
=
(
uchar
*
)
pkg
;
uchar
*
packet
=
(
uchar
*
)
pkg
;
if
(
length
<
251
)
if
(
length
<
251
)
...
@@ -479,7 +479,7 @@ char *net_store_length(char *pkg, uint length)
...
@@ -479,7 +479,7 @@ char *net_store_length(char *pkg, uint length)
char
*
net_store_data
(
char
*
to
,
const
char
*
from
,
uint
length
)
char
*
net_store_data
(
char
*
to
,
const
char
*
from
,
uint
length
)
{
{
to
=
net_store_length
(
to
,
length
);
to
=
net_store_length
_fast
(
to
,
length
);
memcpy
(
to
,
from
,
length
);
memcpy
(
to
,
from
,
length
);
return
to
+
length
;
return
to
+
length
;
}
}
...
@@ -488,7 +488,7 @@ char *net_store_data(char *to,int32 from)
...
@@ -488,7 +488,7 @@ char *net_store_data(char *to,int32 from)
{
{
char
buff
[
20
];
char
buff
[
20
];
uint
length
=
(
uint
)
(
int10_to_str
(
from
,
buff
,
10
)
-
buff
);
uint
length
=
(
uint
)
(
int10_to_str
(
from
,
buff
,
10
)
-
buff
);
to
=
net_store_length
(
to
,
length
);
to
=
net_store_length
_fast
(
to
,
length
);
memcpy
(
to
,
buff
,
length
);
memcpy
(
to
,
buff
,
length
);
return
to
+
length
;
return
to
+
length
;
}
}
...
@@ -497,7 +497,7 @@ char *net_store_data(char *to,longlong from)
...
@@ -497,7 +497,7 @@ char *net_store_data(char *to,longlong from)
{
{
char
buff
[
22
];
char
buff
[
22
];
uint
length
=
(
uint
)
(
longlong10_to_str
(
from
,
buff
,
10
)
-
buff
);
uint
length
=
(
uint
)
(
longlong10_to_str
(
from
,
buff
,
10
)
-
buff
);
to
=
net_store_length
(
to
,
length
);
to
=
net_store_length
_fast
(
to
,
length
);
memcpy
(
to
,
buff
,
length
);
memcpy
(
to
,
buff
,
length
);
return
to
+
length
;
return
to
+
length
;
}
}
...
@@ -561,7 +561,7 @@ bool Protocol::send_fields(List<Item> *list, uint flags)
...
@@ -561,7 +561,7 @@ bool Protocol::send_fields(List<Item> *list, uint flags)
if
(
flags
&
SEND_NUM_ROWS
)
if
(
flags
&
SEND_NUM_ROWS
)
{
// Packet with number of elements
{
// Packet with number of elements
char
*
pos
=
net_store_length
(
buff
,
(
uint
)
list
->
elements
);
char
*
pos
=
net_store_length
(
buff
,
list
->
elements
);
(
void
)
my_net_write
(
&
thd
->
net
,
buff
,(
uint
)
(
pos
-
buff
));
(
void
)
my_net_write
(
&
thd
->
net
,
buff
,(
uint
)
(
pos
-
buff
));
}
}
...
...
sql/protocol.h
View file @
d6672f71
...
@@ -166,7 +166,6 @@ void send_ok(THD *thd, ha_rows affected_rows=0L, ulonglong id=0L,
...
@@ -166,7 +166,6 @@ void send_ok(THD *thd, ha_rows affected_rows=0L, ulonglong id=0L,
const
char
*
info
=
0
);
const
char
*
info
=
0
);
void
send_eof
(
THD
*
thd
);
void
send_eof
(
THD
*
thd
);
bool
send_old_password_request
(
THD
*
thd
);
bool
send_old_password_request
(
THD
*
thd
);
char
*
net_store_length
(
char
*
packet
,
uint
length
);
char
*
net_store_data
(
char
*
to
,
const
char
*
from
,
uint
length
);
char
*
net_store_data
(
char
*
to
,
const
char
*
from
,
uint
length
);
char
*
net_store_data
(
char
*
to
,
int32
from
);
char
*
net_store_data
(
char
*
to
,
int32
from
);
char
*
net_store_data
(
char
*
to
,
longlong
from
);
char
*
net_store_data
(
char
*
to
,
longlong
from
);
...
...
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