summaryrefslogtreecommitdiff
path: root/sql/protocol.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-04-01 20:29:45 +0400
committerAlexander Barkov <bar@mariadb.com>2019-04-02 17:04:20 +0400
commit4d12a6458e96bf5e20c7109969fbd34bfd1cbaf5 (patch)
treed29922b69ffbe4a4637fb5ab4f5bcc965d7dab2b /sql/protocol.h
parente10f9e6c810bf0ced6d79f486d6625d2ed04932e (diff)
downloadmariadb-git-4d12a6458e96bf5e20c7109969fbd34bfd1cbaf5.tar.gz
MDEV-19125 Change Send_field::type from enum_field_types to Type_handler*
Diffstat (limited to 'sql/protocol.h')
-rw-r--r--sql/protocol.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/protocol.h b/sql/protocol.h
index 248f18e33df..70a097c9e32 100644
--- a/sql/protocol.h
+++ b/sql/protocol.h
@@ -22,6 +22,7 @@
#include "sql_error.h"
#include "my_decimal.h" /* my_decimal */
+#include "sql_type.h"
class i_string;
class Field;
@@ -40,7 +41,12 @@ protected:
String *convert;
uint field_pos;
#ifndef DBUG_OFF
- enum enum_field_types *field_types;
+ const Type_handler **field_handlers;
+ bool valid_handler(uint pos, protocol_send_type_t type) const
+ {
+ return field_handlers == 0 ||
+ field_handlers[field_pos]->protocol_send_type() == type;
+ }
#endif
uint field_count;
#ifndef EMBEDDED_LIBRARY