summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-09-13 11:04:23 +0400
committerAlexander Barkov <bar@mariadb.com>2019-09-13 11:47:43 +0400
commitc924e39fab54ed63a427c27d39778eacd961764b (patch)
tree35f8f4bba60407a93b5e546a18fc11e2bc448aa5 /sql/field.h
parent368e64aaedfd18e9cc685140a898321f9977b425 (diff)
downloadmariadb-git-c924e39fab54ed63a427c27d39778eacd961764b.tar.gz
MDEV-18153 Assertion `0' or Assertion `btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIME_ROUND_FRACTIONAL
Conversion to a temporal data type resulting into a lower precision depends on TIME_ROUND_FRACTIONAL. Taking into account this dependency in: - indexed generated virtual column expressions - persistent virtual column expressions A warning is now issued if conversion from the generation expression to the column data type depends on TIME_ROUND_FRACTIONAL. The warning will be changed to error in 10.5
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index 271177d4eb5..b16e738d639 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1215,6 +1215,11 @@ public:
{
return 0;
}
+ virtual sql_mode_t conversion_depends_on_sql_mode(THD *thd,
+ Item *expr) const
+ {
+ return (sql_mode_t) 0;
+ }
virtual sql_mode_t can_handle_sql_mode_dependency_on_store() const
{
return 0;
@@ -2827,6 +2832,7 @@ public:
const Type_handler *type_handler() const { return &type_handler_timestamp; }
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
Copy_func *get_copy_func(const Field *from) const;
+ sql_mode_t conversion_depends_on_sql_mode(THD *, Item *) const;
int store(const char *to,size_t length,CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);
@@ -3185,6 +3191,7 @@ public:
return real_type() == from->real_type() &&
decimals() == from->decimals();
}
+ sql_mode_t conversion_depends_on_sql_mode(THD *, Item *) const;
int store_time_dec(const MYSQL_TIME *ltime, uint dec);
int store(const char *to,size_t length,CHARSET_INFO *charset);
int store(double nr);
@@ -3329,6 +3336,7 @@ public:
}
const Type_handler *type_handler() const { return &type_handler_datetime; }
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONGLONG; }
+ sql_mode_t conversion_depends_on_sql_mode(THD *, Item *) const;
int store(const char *to, size_t length, CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);