summaryrefslogtreecommitdiff
path: root/sql/unireg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/unireg.h')
-rw-r--r--sql/unireg.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/unireg.h b/sql/unireg.h
index e9c62334e86..03d63d0fd06 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -188,6 +188,21 @@ enum extra2_field_flags {
VERS_OPTIMIZED_UPDATE= 1 << INVISIBLE_MAX_BITS
};
+static inline size_t extra2_read_len(const uchar **extra2, const uchar *end)
+{
+ size_t length= *(*extra2)++;
+ if (length)
+ return length;
+
+ if ((*extra2) + 2 >= end)
+ return 0;
+ length= uint2korr(*extra2);
+ (*extra2)+= 2;
+ if (length < 256 || *extra2 + length > end)
+ return 0;
+ return length;
+}
+
int rea_create_table(THD *thd, LEX_CUSTRING *frm,
const char *path, const char *db, const char *table_name,
HA_CREATE_INFO *create_info, handler *file,