mariadb/libmysqld
Alexander Barkov b25ad1bc47 MDEV-18408 Assertion `0' failed in Item::val_native_result / Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon mysqld_list_fields after crash recovery
The problem happened because Item_ident_for_show did not implement val_native().

Solution:

- Removing class Item_ident_for_show
- Implementing a new method Protocol::send_list_fields() instead,
  which accepts a List<Field> instead of List<Item> as input.
  Now no any Item creation is done during mysqld_list_fields().

Adding helper methods, to reuse the code easier:
- Moved a part of Protocol::send_result_set_metadata(),
  responsible for sending an individual field metadata,
  into a new method Protocol_text::store_field_metadata().
  Reusing it in both send_list_fields() and send_result_set_metadata().
- Adding Protocol_text::store_field_metadata()
- Adding Protocol_text::store_field_metadata_for_list_fields()

Note, this patch also automatically fixed another bug:

MDEV-18685 mysql_list_fields() returns DEFAULT 0 instead of DEFAULT NULL for view columns

The reason for this bug was that Item_ident_for_show::val_xxx() and get_date()
did not check field->is_null() before calling field->val_xxx()/get_date().
Now the default value is correctly sent by Protocol_text::store(Field*).
2019-02-25 12:29:42 +04:00
..
examples MDEV-17868 mysqltest fails to link with system PCRE libraries 2019-01-24 10:34:05 +01:00
client_settings.h remove libmysql/ 2016-09-12 17:51:49 +02:00
CMakeLists.txt Merge branch '10.4' into bb-10.4-mdev16188 2019-02-15 20:31:58 +01:00
emb_qcache.cc Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2018-02-04 18:40:06 +04:00
emb_qcache.h Added DBUG_ASSERT_AS_PRINTF compile flag 2017-08-24 01:05:50 +02:00
embedded_priv.h Updated/added copyright headers 2011-06-30 17:46:53 +02:00
lib_sql.cc MDEV-18408 Assertion `0' failed in Item::val_native_result / Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon mysqld_list_fields after crash recovery 2019-02-25 12:29:42 +04:00
libmysql.c MDEV-17740 Extend EXTRACT(x AS DAY*) to understand long time intervals 2018-11-17 10:14:44 +04:00
libmysqld.c Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7 2018-05-14 11:28:13 +05:30
libmysqld.def merge with 5.3 2011-10-19 21:45:18 +02:00
libmysqld.rc
resource.h