Commit graph

1167 commits

Author SHA1 Message Date
Alexander Barkov
35cbbd4d70 MDEV-20809 EXTRACT from INET6 value does not produce any warnings
Disallowing EXTRACT(xxx FROM inet6arg) as fix time.
Adding a new method Type_handler::can_return_extract_source().
2020-06-01 10:35:01 +04:00
Alexander Barkov
f1e13fdc8d MDEV-21581 Helper functions and methods for CHARSET_INFO 2020-01-28 12:29:23 +04:00
Alexander Barkov
497ee33848 MDEV-21497 Make Field_time, Field_datetime, Field_timestamp abstract
- Making classes Field_time, Field_datetime, Field_timestamp abstract
- Adding instantiable Field_time0, Field_datetime0, Field_timestamp0 classes
- Removing redundant cast in field_conv.cc, item_timefunc.cc, sp.cc in calls for set_time() and get_timestamp()
- Replacing store_TIME() to store_timestamp() in log.cc and removing redundant cast
2020-01-16 09:59:39 +04:00
Marko Mäkelä
8cc15c036d Merge 10.4 into 10.5 2019-12-27 21:17:16 +02:00
Marko Mäkelä
4c25e75ce7 Merge 10.3 into 10.4 2019-12-27 18:20:28 +02:00
Alexander Barkov
1d9532cd8b After-merge cleanup 2019-12-27 18:22:16 +04:00
Marko Mäkelä
5ab70e7f68 Merge 10.2 into 10.3 2019-12-27 15:14:48 +02:00
Alexander Barkov
3dfe1ba3b8 MDEV-21388 Wrong result of DAYNAME()=xxx in combination with condition_pushdown_for_derived=on 2019-12-24 15:05:52 +04:00
Alexander Barkov
5392726e3c MDEV-20818 ER_CRASHED_ON_USAGE or Assertion `length <= column->length' failed in write_block_record on temporary table
The patch for `MDEV-20795 CAST(inet6 AS BINARY) returns wrong result`
unintentionally changed what Item_char_typecast::type_handler()
returns. This broke UNIONs with the BINARY() function, as the Aria
engine started to get columns of unexpected data types.

Restoring previous behaviour, to return
  Type_handler::string_type_handler(max_length).

The prototype for Item_handed_func::return_type_handler() has changed
from:
  const Type_handler *return_type_handler() const
to:
  const Type_handler *return_type_handler(const Item_handled_func *) const
2019-10-14 08:21:08 +04:00
Alexander Barkov
6860d6f8be Fixing a mysqld crash on Ubuntu-10.2 (Quantal) 2019-10-12 15:28:40 +04:00
Alexander Barkov
b5fae7f743 MDEV-20795 CAST(inet6 AS BINARY) returns wrong result 2019-10-11 14:50:11 +04:00
Marko Mäkelä
1333da90b5 Merge 10.4 into 10.5 2019-09-24 10:07:56 +03:00
Alexander Barkov
bf617c3654 MDEV-20423 Assertion 0' failed or btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL 2019-09-18 09:51:13 +04:00
Alexander Barkov
c1599821a5 Merge remote-tracking branch 'origin/10.4' into 10.5 2019-08-13 23:49:10 +04:00
Alexander Barkov
0e0d57141e MDEV-20331 Add class Type_numeric_attributes 2019-08-12 21:46:20 +04:00
Alexander Barkov
c99f9766b1 MDEV-19166 Assertion `!is_zero_datetime()' failed in Timestamp_or_zero_datetime::tv 2019-08-05 14:41:17 +04:00
Alexander Barkov
061a0f0b8d MDEV-20175 Move Type_handler_row from Type_collection_std to Type_collection_row 2019-07-25 14:49:33 +04:00
Alexander Barkov
3e7e87ddcc MDEV-19897 Rename source code variable names from utf8 to utf8mb3 2019-06-28 12:37:04 +04:00
Alexander Barkov
cfbd714868 MDEV-19774 Assertion `sec.se c() <= 0x7FFFFFFFL' failed in Item_func_from_unixtime::get_date 2019-06-20 09:48:34 +04:00
Oleksandr Byelkin
c07325f932 Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
Marko Mäkelä
be85d3e61b Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
Marko Mäkelä
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
Vicențiu Ciorbaru
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
Vicențiu Ciorbaru
5543b75550 Update FSF Address
* Update wrong zip-code
2019-05-11 21:29:06 +03:00
Alexander Barkov
ea5cda5269 MDEV-18402 Assertion `sec.sec() <= 59' failed in Item_func_maketime::get_date 2019-04-02 11:40:22 +04:00
Marko Mäkelä
514b305dfb Merge 10.3 into 10.4
The MDEV-17262 commit 26432e49d3
was skipped. In Galera 4, the implementation would seem to require
changes to the streaming replication.

In the tests archive.rnd_pos main.profiling, disable_ps_protocol
for SHOW STATUS and SHOW PROFILE commands until MDEV-18974
has been fixed.
2019-03-20 10:41:32 +02:00
Sergei Golubchik
b64fde8f38 Merge branch '10.2' into 10.3 2019-03-17 13:06:41 +01:00
Sergei Golubchik
0508d327ae Merge branch '10.1' into 10.2 2019-03-15 21:00:41 +01:00
Alexander Barkov
ddfa722a03 MDEV-18626 ASAN stack-buffer-overflow in int10_to_str / make_date_time upon DATE_FORMAT 2019-03-14 14:40:33 +04:00
Alexander Barkov
cb66cdc6f8 MDEV-14926 AddressSanitizer: heap-use-after-free in make_date_time on weird combination of functions 2019-03-14 10:05:38 +04:00
Marko Mäkelä
b5763ecd01 Merge 10.3 into 10.4 2018-12-18 11:33:53 +02:00
Marko Mäkelä
45531949ae Merge 10.2 into 10.3 2018-12-18 09:15:41 +02:00
Alexey Botchkov
c4ab352b67 MDEV-14576 Include full name of object in message about incorrect value for column.
The error message modified.
Then the TABLE_SHARE::error_table_name() implementation taken from 10.3,
          to be used as a name of the table in this message.
2018-12-16 02:21:41 +04:00
Alexander Barkov
34eb98387f MDEV-13995 MAX(timestamp) returns a wrong result near DST change 2018-12-10 19:25:12 +04:00
Alexander Barkov
4447a02cf1 MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMP 2018-11-26 08:10:47 +04:00
Alexander Barkov
740ce108a5 MDEV-17792 New class Timestamp and cleanups in Date, Datetime, Field for rounding 2018-11-22 14:53:25 +04:00
Alexander Barkov
d2ba9edd66 MDEV-17740 Extend EXTRACT(x AS DAY*) to understand long time intervals 2018-11-17 10:14:44 +04:00
Alexander Barkov
a5e2a14ef3 MDEV-17634 Regression: TIME(0)=TIME('z') returns NULL vs 1 2018-11-07 14:42:36 +04:00
Alexander Barkov
f7179c4432 MDEV-17460 Move the code from Item_extract::val_int() to a new class Extract_source 2018-10-16 11:14:39 +04:00
Alexander Barkov
1c5fd80a04 Fixing a test failure on 32bit platforms in the new MDEV-17434 code 2018-10-16 06:59:30 +04:00
Alexander Barkov
22e75434e7 MDEV-17434 EXTRACT(DAY FROM negative_time) returns wrong result 2018-10-15 17:46:25 +04:00
Marko Mäkelä
444c380ceb Merge 10.3 into 10.4 2018-10-05 08:09:49 +03:00
Alexander Barkov
e5aebc1408 A cleanup for MDEV-17317 Add THD* parameter into Item::get_date() and stricter data type control to "fuzzydate"
Fixing C++ function check_date() to get the "fuzzydate" as
date_mode_t rather than ulonglong, so conversion from
date_time_t to ulonglong is now done inside C++ check_date(),
and no conversion is needed in the callers' code.

As an additional safety, modified the code not to pass
TIME_FUZZY_DATE to the low level C functions:
- check_date()
- str_to_datetime()
- str_to_time()
- number_to_datetime()
because TIME_FUZZY_DATE is known only on the C++ level,
C functions do not know it.

Soon we'll be adding more flags into the C++ level (i.e. to date_time_t),
e.g. for rounding. It's a good idea to prevent passing C++ specific
flags into pure C routines before this change.

Asserts were added into the affected C functions to verify
that the caller passed only known C level flags.
2018-10-01 12:34:03 +04:00
Sergei Golubchik
57e0da50bb Merge branch '10.2' into 10.3 2018-09-28 16:37:06 +02:00
Alexander Barkov
ad8e02ac45 MDEV-17317 Add THD* parameter into Item::get_date() and stricter data type control to "fuzzydate" 2018-09-28 14:01:17 +04:00
Alexander Barkov
25ad38abe5 MDEV-17288 Replace Item_func::get_arg0_date() to Date/Datetime methods 2018-09-25 10:07:45 +04:00
Sergei Golubchik
5ae8fce50b Merge branch '10.1' into 10.2 2018-09-24 11:46:08 +02:00
Sergei Golubchik
1fc5a6f30c Merge branch '10.0' into 10.1 2018-09-23 12:58:11 +02:00
Alexander Barkov
80bcb05b24 Merge remote-tracking branch 'origin/5.5' into 10.0 2018-09-21 08:37:42 +04:00
Alexander Barkov
935a163dd9 MDEV-17244 MAKETIME(900,0,0.111) returns a wrong result 2018-09-20 16:51:56 +04:00