diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2014-04-15 18:08:33 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2014-04-15 18:08:33 +0500 |
commit | 7d1033115a5c04a30a9a044ceb8f71047162d200 (patch) | |
tree | d73836be955a8238c62ea6f8163fc013d6073a11 /sql/protocol.cc | |
parent | 05722f06b212f0229dbc541b3d370319712d156a (diff) | |
download | mariadb-git-7d1033115a5c04a30a9a044ceb8f71047162d200.tar.gz |
MDEV-5138 Numerous test failures in "mtr --ps --embedded".
The function Protocol::net_store_data(a, b, CHARSET_A, CHARSET_B) should
be adapted to be working in the embedded server as it's done
with the Protocol::net_store_data(a, b).
That new function renamed as net_store_data_cs, so we can make it
virtual.
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index 2f19843e3e2..ac9fb1e9384 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -64,7 +64,7 @@ bool Protocol_binary::net_store_data(const uchar *from, size_t length) /* - net_store_data() - extended version with character set conversion. + net_store_data_cs() - extended version with character set conversion. It is optimized for short strings whose length after conversion is garanteed to be less than 251, which accupies @@ -76,8 +76,12 @@ bool Protocol_binary::net_store_data(const uchar *from, size_t length) */ #ifndef EMBEDDED_LIBRARY -bool Protocol::net_store_data(const uchar *from, size_t length, +bool Protocol::net_store_data_cs(const uchar *from, size_t length, CHARSET_INFO *from_cs, CHARSET_INFO *to_cs) +#else +bool Protocol_binary::net_store_data_cs(const uchar *from, size_t length, + CHARSET_INFO *from_cs, CHARSET_INFO *to_cs) +#endif { uint dummy_errors; /* Calculate maxumum possible result length */ @@ -117,7 +121,6 @@ bool Protocol::net_store_data(const uchar *from, size_t length, packet->length((uint) (to - packet->ptr())); return 0; } -#endif /** @@ -1007,7 +1010,7 @@ bool Protocol::store_string_aux(const char *from, size_t length, tocs != &my_charset_bin) { /* Store with conversion */ - return net_store_data((uchar*) from, length, fromcs, tocs); + return net_store_data_cs((uchar*) from, length, fromcs, tocs); } /* Store without conversion */ return net_store_data((uchar*) from, length); |