1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-05 16:15:50 +03:00
Commit Graph

328 Commits

Author SHA1 Message Date
Andrew Hutchings
0983c1becf MCOL-2230 Fix TIMEDIFF() handling
TIMEDIFF would not compare datetime with string correctly, causing a
NULL saturation.
2019-06-10 16:46:24 +01:00
Andrew Hutchings
5e4f1b9933 Merge branch 'develop' into MCOL-265 2019-06-10 13:58:03 +01:00
David Hall
57152cf881 MCOL-1559 experimental 2019-05-23 10:42:25 -05:00
Andrew Hutchings
020b211bb7 Merge branch 'develop-1.2' into develop-merge-up-20190514 2019-05-14 13:58:33 +01:00
David Mott
f0dd02499a Remove unneeded include 2019-04-29 05:19:11 -05:00
Roman Nozdrin
9dc33c4e82 Another try to cope with warnings under gcc 8.2. 2019-04-29 11:05:03 +03:00
Patrick LeBlanc
cbbf267e88 MCOL-537, cleanup compiler warnings. Checkpointing a bunch of fixes.
Work in progress...
2019-04-29 10:56:48 +03:00
David Mott
4b9d046c6e Fully resolve potentially ambiguous symbols by removing using namespace statements from headers which have a cascading effect. This causes potential behavior changes when switching to c++11 since symbols can be exported from std and boost while both have been imported into the global namespace. 2019-04-29 01:21:15 -05:00
David Mott
e65f80f493 delete visual c++ project files. cmake can generate these if needed 2019-04-25 23:35:03 -05:00
Gagan Goel
e89d1ac3cf MCOL-265 Add support for TIMESTAMP data type 2019-04-23 00:00:09 -04:00
Roman Nozdrin
9ff348b97f MCOL-2233 substring_index() now returns correct value when
index value is negative.
The problem caused by unsigned type used to store negative
index value.
2019-03-13 13:02:17 +03:00
David Hall
c3f8148fff MCOL-2182 Change in MariaDB 10.3 allows for only 2 parameters to lpad and rpad 2019-03-08 15:14:42 -06:00
David Hall
3f2c753947 MCOL-1822-c final checkin 2019-03-05 09:33:39 -06:00
David Hall
a2aa4b8479 MCOL-1822 Intermediate checkin. DISTINCT not working. 2019-02-25 14:54:46 -06:00
David Hall
c5b9ae11e5 MCOL-1822 add LONG DOUBLE support 2019-01-29 09:55:43 -06:00
Gagan Goel
6deb5e1bfd MCOL-2057 Fix truncate(x,d) when d < 0 for unsigned int data types
For unsigned data types in the int family (tinyint, smallint, int, bigint),
truncate(x, d) now properly applies zeros when d < 0.
2019-01-08 20:15:04 -05:00
Andrew Hutchings
1834b64de8 Merge branch 'develop-1.1' into 1.1-merge-up-2018-11-23 2018-11-23 11:45:17 +00:00
Andrew Hutchings
b1d5f54abe MCOL-1868 Fix error in unused code
There was a a bad line in some code that we don't currently compile. This
patch fixes that code in case we use it in the future.
2018-11-14 14:29:58 +00:00
Andrew Hutchings
85121060fb Merge branch 'develop-1.1' into 1.1-merge-up-2018-11-08 2018-11-08 18:39:44 +00:00
Andrew Hutchings
65287a0613 MCOL-1826 Fix race in FLOAT/DOUBLE to string
In the FLOAT/DOUBLE to string conversions a class global string was used
to store the result. Unfortunately it is possible for an instance of
this class to be used by multiple threads of PrimProc simultaneously.
This would cause a race and data corruption or more likely a crash.

This fix passes a string object from the caller to use instead.
2018-10-22 17:56:49 +01:00
David.Hall
ca7cb9a7b1 Merge pull request #581 from mariadb-corporation/MCOL-1433b
MCOL-1433 Fix TIME for MAKEDATE/TIMEDIFF
2018-10-08 11:56:26 -05:00
Andrew Hutchings
6a72b28bab MCOL-1775 Fix addtime/subtime for WHERE
MariaDB server renamed addtime/subtime so we need to use the new names
for these functions.
2018-10-06 11:27:51 +01:00
Andrew Hutchings
a127f84793 MCOL-1433 Fix TIME for MAKEDATE/TIMEDIFF
Fix saturation behaviour for TIME with MAKEDATE() and TIMEDIFF()
2018-10-04 16:53:14 +01:00
David.Hall
23e99db0ea Merge pull request #545 from mariadb-corporation/1.1-merge-up-20180817
Merge develop-1.1 into develop
2018-08-20 14:07:35 -05:00
Andrew Hutchings
03da6df473 Merge branch 'develop-1.1' into 1.1-merge-up-20180817 2018-08-17 16:17:13 +01:00
Andrew Hutchings
580a3ec123 MCOL-1647 Fix TIME regressions
Fixes the following:

* Read past buffer end in intToDatetime / intToTime
* Allow intToTime to convert datetime
* Allow intToTime to convert shortened time values
* Allow stringToTime to convert datetime and int time values
* Fix saturation / bad values in intToTime and stringToTime
* Fix TIME return in STR_TO_DATE()
* Fix NULL return on type inequality for TIMEDIFF()
* Fix zero day calculation error in ADDTIME()/SUBTIME()
* Fix DATETIME to int calculation error in aggregate bit operations
* Make the new harderning flags optional with -DSECURITY_HARDENED_NEW
2018-08-17 07:55:51 +01:00
Andrew Hutchings
443a2867c4 MCOL-1385 Initial 10.3 support 2018-08-02 14:55:01 +01:00
David Hall
db4279dac7 MCOL-1535 caseOperationType adjusted for new simple case order 2018-07-23 17:32:38 -05:00
Andrew Hutchings
fb8aab959d MCOL-1433 Fix some functions for TIME
Fixes the following:

* CAST() (as DATE/DATETIME)
* DATE()
* DATE_FORMAT()
* MAKEDATE()
* NULLIF()
* TIMEDIFF()
* TO_DAYS() / DATEDIFF()
2018-07-12 15:13:43 +01:00
Andrew Hutchings
8c90419852 Fix merge and coding style issues 2018-06-22 15:31:31 +01:00
David.Hall
1caa98ff46 Merge pull request #494 from mariadb-corporation/MCOL-1433
MCOL-1433 Fix several functions for TIME handling
2018-06-11 10:20:49 -05:00
Andrew Hutchings
d9e6ba90ad MCOL-1433 Fix several functions for TIME handling
This fixes hex() so that it outputs the hex of the ASCII for the time
data to make it aligned with MariaDB. It also fixes the following
functions so that they use NOW() as a DATETIME with the input TIME added
to it:

* weekday()
* yearweek()
* monthname()
* last_day()
* year()
* weekofyear()
* week()
* to_days()
* quarter()
* month()
* dayofyear()
* dayofweek()
* dayofmonth()
* day()
* date()
2018-06-08 14:58:08 +01:00
David.Hall
53b29a03ad Merge pull request #492 from mariadb-corporation/MCOL-392-fixes
Fix a bunch of issues around TIME data type
2018-06-07 09:18:56 -05:00
Andrew Hutchings
92cb6345fb MCOL-1428 Fix SUBTIME() with day in WHERE
SUBTIME() with day number used the DATETIME funciton instead of TIME so
got stuck in an endless loop. Now uses the TIME calculations instead.
2018-06-04 22:03:50 +01:00
Andrew Hutchings
fd6a2f46a5 MCOL-1429 Fix DAYNAME()/MONTHNAME() NULL result
For NULL result -1 cast to a uint was used as an array index. This
caused crashes with TIME data type.
2018-06-04 20:47:33 +01:00
Andrew Hutchings
f850f8b0d0 MCOL-807 HOUR() is always positive
It is undocumented but when MariaDB gets a negative time in the HOUR()
function it always returns a positive value. This does the same for us.
2018-06-04 15:17:56 +01:00
Andrew Hutchings
1d8964ec0d Fix code style 2018-05-31 14:44:48 +01:00
Andrew Hutchings
53f281933a Merge branch 'develop-1.1' into 1.1-merge-up-20180531 2018-05-31 14:43:52 +01:00
Andrew Hutchings
baf42e7b4a MCOL-1390 Fix SUBSTRING_INDEX for negative count
If negative count number is more than the number of characters in the
string then it should always return the string.

For example if a table contains SUBSTRING_INDEX('zzz', 'z', -5) should
return 'zzz'. Before this patch it would return NULL.
2018-05-10 18:32:22 +01:00
Andrew Hutchings
305bae1bcb MCOL-1402 Fix addtime/subtime
The changes to addtime/subtime for TIME datatype broke the handling of
the adding and subtracting of time. This fixes that.
2018-05-09 20:34:56 +01:00
Andrew Hutchings
c40903de9b MCOL-392 Apply astyle
Make this branch apply our style guidelines
2018-05-01 09:52:26 +01:00
Andrew Hutchings
4ef4286022 MCOL-392 Fix time_to_sec() for negative time 2018-05-01 07:25:25 +01:00
Andrew Hutchings
dfc351b730 MCOL-392 fix negative zero hours
Also fix some functions that were not behaving correctly
2018-04-30 22:08:10 +01:00
Andrew Hutchings
3c090647af MCOL-392 Fix microsecond and nullif for TIME 2018-04-30 11:34:58 +01:00
Andrew Hutchings
a5f2f80bed MCOL-392 Fix case 2018-04-30 10:41:52 +01:00
Andrew Hutchings
fc05a9c6c2 MCOL-392 Fix greatest() and least() for time 2018-04-30 09:42:41 +01:00
Andrew Hutchings
957dc44615 MCOL-392 Function fixes
Fixes most of the functions in funcexp so that time and datetime's
microseconds are handled correctly
2018-04-30 09:42:41 +01:00
Andrew Hutchings
dba04e8b72 MCOL-392 Fix cpimport and >8bit positive hour 2018-04-30 09:42:41 +01:00
Andrew Hutchings
edb2e2f36d MCOL-392 Fix negative time handling 2018-04-30 09:42:41 +01:00
Andrew Hutchings
3c1ebd8b94 MCOL-392 Add initial TIME datatype support 2018-04-30 09:42:41 +01:00