diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2014-10-10 21:30:23 +0400 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2014-10-10 21:30:23 +0400 |
commit | e6152f929369758691d863191f58d71d48b3d6c6 (patch) | |
tree | 99fce01b13ab8fa20c766fc6bcc61648c3cb67d9 /sql/protocol.h | |
parent | 988f3fbed947af76f9958802d0aae40925f309e4 (diff) | |
download | mariadb-git-e6152f929369758691d863191f58d71d48b3d6c6.tar.gz |
MDEV-6702: analyze_stmt test fails in --embedded 10.1
Provide Protocol_discard::storeXXX functions for all kinds
of objects that could be stored. Failure to so would caused
crashes in embedded server which attempted to collect the
stored info.
This also reduces the amount of copy operations for non-embedded
case.
Diffstat (limited to 'sql/protocol.h')
-rw-r--r-- | sql/protocol.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/sql/protocol.h b/sql/protocol.h index 5129f68d706..048db940804 100644 --- a/sql/protocol.h +++ b/sql/protocol.h @@ -243,6 +243,47 @@ public: return 0; } + void prepare_for_resend() + { +#ifndef DBUG_OFF + field_pos= 0; +#endif + } + + /* + Provide dummy overrides for any storage methods so that we + avoid allocating and copying of data + */ + virtual bool store_null() + { return false; } + virtual bool store_tiny(longlong from) + { return false; } + virtual bool store_short(longlong from) + { return false; } + virtual bool store_long(longlong from) + { return false; } + virtual bool store_longlong(longlong from, bool unsigned_flag) + { return false; } + virtual bool store_decimal(const my_decimal *) + { return false; } + virtual bool store(const char *from, size_t length, CHARSET_INFO *cs) + { return false; } + virtual bool store(const char *from, size_t length, + CHARSET_INFO *fromcs, CHARSET_INFO *tocs) + { return false; } + virtual bool store(MYSQL_TIME *time, int decimals) + { return false; } + virtual bool store_date(MYSQL_TIME *time) + { return false; } + virtual bool store_time(MYSQL_TIME *time, int decimals) + { return false; } + virtual bool store(float nr, uint32 decimals, String *buffer) + { return false; } + virtual bool store(double from, uint32 decimals, String *buffer) + { return false; } + virtual bool store(Field *field) + { return false; } + }; |