← Back to team overview

maria-developers team mailing list archive

Re: [Commits] Rev 3991: MDEV-5138 Numerous test failures in "mtr --ps --embedded"


Hi, Sergei.

> Why does Protocol::net_store_data() have to be virtual?

Well it doen't have to be virtual, but it's the nicest solution i came up with.
All the related code is in the sql/protocol.cc

In fact only reason is the Protocol::store_string_aux() function that calls the ::net_store_data()
Both Protocol_text::store() and Protocol_binary::store() in turn call the Protocol::store_string_aux(). As the ::net_store_data() has to work differently for Protocol_binary and Protocol_text, I saw options either to create two absolutely same Protocol_text::store_string_aux() and
Protocol_binary::store_string_aux() or make the net_store_data() virtual.

Best regards.

18.03.2014 20:24, Sergei Golubchik wrote:
Hi, Holyfoot!

On Nov 30, holyfoot@xxxxxxxxxxxx wrote:
At file:///home/hf/wmar/mdev-5138/

revno: 3991
revision-id: holyfoot@xxxxxxxxxxxx-20131130132432-etlmes8qhhqhr1iu
parent: elenst@xxxxxxxxxxxxxx-20131128160251-vn857wx5qlon6j1p
committer: Alexey Botchkov <holyfoot@xxxxxxxxxxxx>
branch nick: mdev-5138
timestamp: Sat 2013-11-30 17:24:32 +0400
   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
Why does Protocol::net_store_data() have to be virtual?
(if it doesn't, Protocol::net_store_data_cs doesn't have to be virtual
either and doesn't have to be renamed)