summaryrefslogtreecommitdiff
path: root/sql-common/my_time.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.1 into 10.2Marko Mäkelä2019-08-201-1/+1
|\ | | | | | | | | | | | | | | | | For MDEV-15955, the fix in create_tmp_field_from_item() would cause a compilation error. After a discussion with Alexander Barkov, the fix was omitted and only the test case was kept. In 10.3 and later, MDEV-15955 is fixed properly by overriding create_tmp_field() in Item_func_user_var.
| * MDEV-19034 ASAN unknown-crash in get_date_time_separator with ↵Alexander Barkov2019-08-201-1/+1
| | | | | | | | PAD_CHAR_TO_FULL_LENGTH
* | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
|\ \ | |/
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| |\
| | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | * Update wrong zip-code
* | | MDEV-13384 - misc Windows warnings fixedVladislav Vaintroub2017-09-281-3/+3
| | |
* | | Fix many -Wconversion warnings.Marko Mäkelä2017-03-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define my_thread_id as an unsigned type, to avoid mismatch with ulonglong. Change some parameters to this type. Use size_t in a few more places. Declare many flag constants as unsigned to avoid sign mismatch when shifting bits or applying the unary ~ operator. When applying the unary ~ operator to enum constants, explictly cast the result to an unsigned type, because enum constants can be treated as signed. In InnoDB, change the source code line number parameters from ulint to unsigned type. Also, make some InnoDB functions return a narrower type (unsigned or uint32_t instead of ulint; bool instead of ibool).
* | | Merge branch '10.2' into bb-10.2-connector-c-integ-submSergei Golubchik2016-09-211-2/+2
|\ \ \ | |/ /
| * | Fixed compiler error and some warnings on windowsMonty2016-08-231-2/+2
| | |
* | | After-review changesSergei Golubchik2016-09-121-4/+0
| | | | | | | | | | | | | | | | | | * remove redundant code * fix tests * move declarations and defines where they belong
* | | MDEV-9293 - Use MariaDB's Connector/C in serverVladislav Vaintroub2016-08-251-1/+4
| | |
* | | Revert "MDEV-9293 Connector/C integration"Vladislav Vaintroub2016-08-191-4/+1
| | | | | | | | | | | | This reverts commit 7b89b9f5108c80f4f270da922d7e6c182a663719.
* | | MDEV-9293 Connector/C integrationVladislav Vaintroub2016-08-191-1/+4
|/ /
* | MDEV-8205 timediff returns null when comparing decimal time to time string valueAlexander Barkov2015-06-151-10/+2
| |
* | 5.5.38 mergeSergei Golubchik2014-06-061-3/+7
|\ \ | |/
| * Merge 5.3->5.5Alexander Barkov2014-06-041-4/+8
| |\
| | * MDEV-4858 Wrong results for a huge unsigned value inserted into a TIME columnAlexander Barkov2014-06-041-4/+8
| | | | | | | | | | | | | | | | | | | | | MDEV-6099 Bad results for DATE_ADD(.., INTERVAL 2000000000000000000.0 SECOND) MDEV-6097 Inconsistent results for CAST(int,decimal,double AS DATETIME) MDEV-6100 No warning on CAST(9000000 AS TIME)
* | | MDEV-6287 Bad warning level when inserting a DATETIME value into a TIME columnAlexander Barkov2014-06-021-1/+1
| | |
* | | MDEV-5372 Make "CAST(time_expr AS DATETIME)" compatible with MySQL-5.6 (and ↵Alexander Barkov2014-03-071-2/+5
| | | | | | | | | | | | the SQL Standard)
* | | 10.0-base mergeSergei Golubchik2013-12-161-2/+2
|\ \ \
| * \ \ 5.5 mergeSergei Golubchik2013-12-151-2/+2
| |\ \ \ | | |/ /
| | * | Merge 5.3->5.5Alexander Barkov2013-12-021-2/+2
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | pending merges: Alexander Barkov 2013-12-02 MDEV-4857 Wrong result of HOUR('1 00:00:00')
| | | * MDEV-4857 Wrong result of HOUR('1 00:00:00')Alexander Barkov2013-12-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: mysql-test/r/func_time.result mysql-test/t/func_time.test sql-common/my_time.c sql/item_func.h sql/item_timefunc.cc sql/mysql_priv.h sql/time.cc
* | | | MDEV-4871 Temporal literals do not accept nanosecondsAlexander Barkov2013-08-151-1/+1
| | | |
* | | | 10.0-monty mergeSergei Golubchik2013-07-211-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | includes: * remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING" * introduce LOCK_share, now LOCK_ha_data is strictly for engines * rea_create_table() always creates .par file (even in "frm-only" mode) * fix a 5.6 bug, temp file leak on dummy ALTER TABLE
| * | | | Temporary commit of 10.0-mergeMichael Widenius2013-03-261-1/+1
| | | | |
* | | | | 10.0-base mergeSergei Golubchik2013-07-181-9/+4
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | 5.5 mergeSergei Golubchik2013-07-171-9/+4
| |\ \ \ \ | | | |/ / | | |/| |
| | * | | Merging from 5.3Alexander Barkov2013-07-081-9/+4
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: include/my_time.h libmysql/libmysql.c mysql-test/r/adddate_454.result mysql-test/r/cast.result mysql-test/r/date_formats.result mysql-test/r/func_sapdb.result mysql-test/r/func_time.result mysql-test/r/mdev316.result mysql-test/r/parser.result mysql-test/r/partition_datatype.result mysql-test/r/partition_pruning.result mysql-test/r/type_date.result mysql-test/r/type_datetime.result mysql-test/suite/vcol/r/vcol_misc.result mysql-test/t/cast.test sql-common/my_time.c sql/field.cc sql/field_conv.cc sql/filesort.cc sql/item.cc sql/item.h sql/item_cmpfunc.cc sql/item_func.cc sql/item_strfunc.cc sql/item_timefunc.cc sql/sql_time.cc pending merges: Sergei Golubchik 2013-07-03 MDEV-4667 DATE('string') incompability betwe...
| | | * | MDEV-4667 DATE('string') incompability between mysql and mariadbSergei Golubchik2013-07-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup: remove TIME_FUZZY_DATE. Introduce TIME_FUZZY_DATES which means "very fuzzy, the resulting value is only used for comparison. It can be invalid date, fine, as long as it can be compared". Updated many tests results (they're better now).
* | | | | Merging temporal literalsAlexander Barkov2013-07-101-99/+126
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added: mysql-test/r/temporal_literal.result mysql-test/t/temporal_literal.test modified: client/mysqlbinlog.cc include/my_time.h mysql-test/r/cast.result mysql-test/r/partition_innodb.result mysql-test/t/cast.test mysql-test/t/partition_innodb.test sql-common/my_time.c sql/field.cc sql/item.cc sql/item.h sql/item_cmpfunc.cc sql/item_create.cc sql/item_create.h sql/item_strfunc.cc sql/item_timefunc.cc sql/item_timefunc.h sql/sql_select.cc sql/sql_time.cc sql/sql_time.h sql/sql_yacc.yy storage/spider/spd_db_mysql.cc pending merges: Alexander Barkov 2013-07-10 Adding support for the SQL-standard temporal...
| * | | | | Adding support for the SQL-standard temporal literals.Alexander Barkov2013-07-101-94/+128
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added: mysql-test/r/temporal_literal.result mysql-test/t/temporal_literal.test modified: client/mysqlbinlog.cc include/my_time.h mysql-test/r/cast.result mysql-test/r/partition_innodb.result mysql-test/t/cast.test mysql-test/t/partition_innodb.test sql-common/my_time.c sql/field.cc sql/item.cc sql/item.h sql/item_cmpfunc.cc sql/item_create.cc sql/item_create.h sql/item_strfunc.cc sql/item_timefunc.cc sql/item_timefunc.h sql/sql_select.cc sql/sql_time.cc sql/sql_time.h sql/sql_yacc.yy storage/spider/spd_db_mysql.cc
* | | | | Adding support for MySQL-5.6 temporal column types:Alexander Barkov2013-07-101-3/+52
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TIME, DATETIME, TIMESTAMP added: mysql-test/r/type_temporal_mysql56.result mysql-test/std_data/mysql56datetime.MYD mysql-test/std_data/mysql56datetime.MYI mysql-test/std_data/mysql56datetime.frm mysql-test/std_data/mysql56time.MYD mysql-test/std_data/mysql56time.MYI mysql-test/std_data/mysql56time.frm mysql-test/std_data/mysql56timestamp.MYD mysql-test/std_data/mysql56timestamp.MYI mysql-test/std_data/mysql56timestamp.frm mysql-test/suite/rpl/r/rpl_temporal_mysql56.result mysql-test/suite/rpl/t/rpl_temporal_mysql56.test mysql-test/t/type_temporal_mysql56.test sql/compat56.cc sql/compat56.h modified: client/mysqlbinlog.cc include/my_time.h include/mysql.h.pp include/mysql_com.h mysql-test/r/statistics.result mysql-test/r/strict.result mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result sql-common/my_time.c sql/CMakeLists.txt sql/field.cc sql/field.h sql/item.cc sql/item_strfunc.cc sql/item_sum.cc sql/item_timefunc.cc sql/log_event.cc sql/opt_range.cc sql/opt_table_elimination.cc sql/protocol.cc sql/rpl_utility.cc sql/rpl_utility.h sql/sql_partition.cc sql/sql_prepare.cc sql/sql_select.cc sql/sql_table.cc sql/table.cc storage/perfschema/pfs_engine_table.cc
* | | | remove ULL() and LL(), because they're totally unnecessarySergei Golubchik2013-04-071-15/+16
| |_|/ |/| | | | | | | | and sometimes harmful (used with expressions)
* | | MDEV-457 Inconsistent data truncation on datetime values with fractional ↵Sergei Golubchik2012-09-081-249/+160
|/ / | | | | | | | | | | seconds represented as strings with no delimiters New implementation for str_to_datetime. Fix MDEV-457 and related issues.
* | mergeVladislav Vaintroub2012-06-131-17/+80
|\ \ | |/
| * LP1008334 : Speedup specific datetime queries that got slower with ↵Vladislav Vaintroub2012-06-081-17/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduction of microseconds in 5.3 - Item::get_seconds() now skips decimal arithmetic, if decimals is 0. This significantly speeds up from_unixtime() if no fractional part is passed. - replace sprintfs used to format temporal values by hand-coded formatting Query1 (original query in the bug report) BENCHMARK(10000000,DATE_SUB(FROM_UNIXTIME(RAND() * 2147483648), INTERVAL (FLOOR(1 + RAND() * 365)) DAY)) Query2 (Variation of query1 that does not use fractional part in FROM_UNIXTIME parameter) BENCHMARK(10000000,DATE_SUB(FROM_UNIXTIME(FLOOR(RAND() * 2147483648)), INTERVAL (FLOOR(1 + RAND() * 365)) DAY)) Prior to the patch, the runtimes were (32 bit compilation/AMD machine) Query1: 41.53 sec Query2: 23.90 sec With the patch, the runtimes are Query1: 32.32 sec (speed up due to removing sprintf) Query2: 12.06 sec (speed up due to skipping decimal arithmetic)
| * mergeSergei Golubchik2012-04-051-2/+2
| |\
| | * mysql-5.1.62 mergeSergei Golubchik2012-04-051-2/+2
| | |\
* | | \ mysql-5.5.22 mergeSergei Golubchik2012-03-281-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/suite/innodb/t/group_commit_crash.test: remove autoincrement to avoid rbr being used for insert ... select mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test: remove autoincrement to avoid rbr being used for insert ... select mysys/my_addr_resolve.c: a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack mysys/stacktrace.c: my_vsnprintf() is ok here, in 5.5
| * \ \ \ Updated/added copyright headersMySQL Build Team2012-02-161-1/+1
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | Updated/added copyright headersKent Boortz2012-02-151-1/+1
| | |\ \ \
* | | \ \ \ merge with mysql-5.5.21Sergei Golubchik2012-03-091-1/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merging BUG#13458237 from 5.1.Alexander Barkov2012-01-241-1/+1
| |\ \ \ \ \ | | |/ / / /
| | * | | | BUG#13458237 - INCONSISTENT HANDLING OF INVALIDE DATES WITH ZERO DAY. ↵Alexander Barkov2012-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SIMILAR TO '2009-10-00' - Reverting the patch for Bug # 12584302 The patch will be reverted in 5.1 and 5.5. The patch will not be reverted in 5.6, the change will be properly documented in 5.6. - Backporting DBUG_ASSERT not to crash on '0000-01-00' (already fixed in mysql-trunk (5.6))
* | | | | | 5.3 mergeSergei Golubchik2012-01-131-1/+2
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | |
| * | | | | Merge with 5.2.Michael Widenius2011-12-111-2/+4
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
| | * | | | Initail merge with MySQL 5.1 (XtraDB still needs to be merged)Michael Widenius2011-11-211-2/+4
| | |\ \ \ \ | | | | |/ / | | | |/| | | | | | | | Fixed up copyright messages.
| | | * | | Updated/added copyright headersKent Boortz2011-07-031-1/+2
| | | |\ \ \
* | | | \ \ \ 5.3->5.5 mergeSergei Golubchik2011-11-221-1/+1
|\ \ \ \ \ \ \ | |/ / / / / /