diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-08-07 15:28:58 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-11-14 10:27:41 +0100 |
commit | 01d3e401971ab51bb4a2b9c8438b27d0161267f9 (patch) | |
tree | b0bc95136b3a2d2cfa5557149019030a8b3e4e78 /sql/field.cc | |
parent | c688ab29ca83d2676d948477b585b3f278f38bbd (diff) | |
download | mariadb-git-bb-10.2-MDEV-16217.tar.gz |
MDEV-16217: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed in Field_num::get_datebb-10.2-MDEV-16217
- clean up DEFAULT() to work only with default value and correctly print
itself.
- fix of DBUG_ASSERT about fields read/write
- fix of field marking for write based really on the thd->mark_used_columns flag
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sql/field.cc b/sql/field.cc index caa84dc9932..6cd8940a893 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -70,8 +70,21 @@ const char field_separator=','; #define BLOB_PACK_LENGTH_TO_MAX_LENGH(arg) \ ((ulong) ((1LL << MY_MIN(arg, 4) * 8) - 1)) -#define ASSERT_COLUMN_MARKED_FOR_READ DBUG_ASSERT(!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))) -#define ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED DBUG_ASSERT(is_stat_field || !table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || (table->vcol_set && bitmap_is_set(table->vcol_set, field_index)))) +// Column marked for read or the field set to read out or record[0] or [1] +#define ASSERT_COLUMN_MARKED_FOR_READ \ + DBUG_ASSERT(!table || \ + (!table->read_set || \ + bitmap_is_set(table->read_set, field_index) || \ + (!(ptr >= table->record[0] && \ + ptr < table->record[0] + table->s->reclength)))) + +#define ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED \ + DBUG_ASSERT(is_stat_field || !table || \ + (!table->write_set || \ + bitmap_is_set(table->write_set, field_index) || \ + (!(ptr >= table->record[0] && \ + ptr < table->record[0] + table->s->reclength))) || \ + (table->vcol_set && bitmap_is_set(table->vcol_set, field_index))) #define FLAGSTR(S,F) ((S) & (F) ? #F " " : "") |