summaryrefslogtreecommitdiff
path: root/sql/sql_time.h
Commit message (Collapse)AuthorAgeFilesLines
* Changing field::field_name and Item::name to LEX_CSTRINGMonty2017-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benefits of this patch: - Removed a lot of calls to strlen(), especially for field_string - Strings generated by parser are now const strings, less chance of accidently changing a string - Removed a lot of calls with LEX_STRING as parameter (changed to pointer) - More uniform code - Item::name_length was not kept up to date. Now fixed - Several bugs found and fixed (Access to null pointers, access of freed memory, wrong arguments to printf like functions) - Removed a lot of casts from (const char*) to (char*) Changes: - This caused some ABI changes - lex_string_set now uses LEX_CSTRING - Some fucntions are now taking const char* instead of char* - Create_field::change and after changed to LEX_CSTRING - handler::connect_string, comment and engine_name() changed to LEX_CSTRING - Checked printf() related calls to find bugs. Found and fixed several errors in old code. - A lot of changes from LEX_STRING to LEX_CSTRING, especially related to parsing and events. - Some changes from LEX_STRING and LEX_STRING & to LEX_CSTRING* - Some changes for char* to const char* - Added printf argument checking for my_snprintf() - Introduced null_clex_str, star_clex_string, temp_lex_str to simplify code - Added item_empty_name and item_used_name to be able to distingush between items that was given an empty name and items that was not given a name This is used in sql_yacc.yy to know when to give an item a name. - select table_name."*' is not anymore same as table_name.* - removed not used function Item::rename() - Added comparision of item->name_length before some calls to my_strcasecmp() to speed up comparison - Moved Item_sp_variable::make_field() from item.h to item.cc - Some minimal code changes to avoid copying to const char * - Fixed wrong error message in wsrep_mysql_parse() - Fixed wrong code in find_field_in_natural_join() where real_item() was set when it shouldn't - ER_ERROR_ON_RENAME was used with extra arguments. - Removed some (wrong) ER_OUTOFMEMORY, as alloc_root will already give the error. TODO: - Check possible unsafe casts in plugin/auth_examples/qa_auth_interface.c - Change code to not modify LEX_CSTRING for database name (as part of lower_case_table_names)
* Merge branch '10.0' into 10.1Sergei Golubchik2016-02-231-1/+2
|\
| * Merge branch '5.5' into 10.0Sergei Golubchik2016-02-151-1/+2
| |\
| | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-02-091-1/+2
| | |\ | | | | | | | | | | | | | | | | reverted about half of commits as either not applicable or outright wrong
| | | * Bug #21564557: INCONSISTENT OUTPUT FROM 5.5 AND 5.6Sreeharsha Ramanavarapu2015-12-311-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%M" Issue: ----- When an invalid date is supplied to the UNIX_TIMESTAMP function from STR_TO_DATE, no check is performed before converting it to a timestamp value. SOLUTION: --------- Add the check_date function and only if it succeeds, proceed to the timestamp conversion. No warning will be returned for dates having zero in month/date, since partial dates are allowed. UNIX_TIMESTAMP will return only a zero for such values. The problem has been handled in 5.6+ with WL#946.
| | | * Updated/added copyright headersKent Boortz2011-06-301-1/+1
| | | |
| | | * WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-311-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h
* | | MDEV-8766 Wrong result for SELECT..WHERE LENGTH(time_column)=8 AND ↵Alexander Barkov2015-09-081-0/+61
| | | | | | | | | | | | time_column=TIMESTAMP'2001-01-01 10:20:31'
* | | MDEV-8336 The meaning of NO_ZERO_DATE is not clear for DATETIME.Alexander Barkov2015-07-081-2/+13
|/ / | | | | | | | | | | In some cases NO_ZERO_DATE did not allow datetime values with zero date part and non-zero time part (e.g. '0000-00-00 10:20:30.123456'). Allowing values of this kind in all known pieces of the code.
* | MDEV-6065 MySQL Bug#13623473 "MISSING ROWS ON SELECT AND JOIN WITH ↵Sergei Golubchik2014-06-111-0/+1
| | | | | | | | | | | | TIME/DATETIME COMPARE" fix for ref like "indexed_time = datetime"
* | 5.5.38 mergeSergei Golubchik2014-06-061-1/+1
|\ \ | |/
| * Merge 5.3->5.5Alexander Barkov2014-06-041-1/+1
| |
* | 5.5 mergeSergei Golubchik2014-05-091-0/+3
|\ \ | |/
| * Merge from 5.3Alexander Barkov2014-04-181-0/+3
| |
* | MDEV-5372 Make "CAST(time_expr AS DATETIME)" compatible with MySQL-5.6 (and ↵Alexander Barkov2014-03-071-2/+29
| | | | | | | | the SQL Standard)
* | 10.0-base mergeSergei Golubchik2014-02-031-0/+1
|\ \ | |/
| * Merge 5.3 -> 5.5Alexander Barkov2014-01-271-1/+2
| |
* | 10.0-base mergeSergei Golubchik2013-12-161-0/+1
|\ \ | |/
| * Merge 5.3->5.5Alexander Barkov2013-12-021-0/+1
| | | | | | | | | | | | pending merges: Alexander Barkov 2013-12-02 MDEV-4857 Wrong result of HOUR('1 00:00:00')
| * Merge from 5.3Alexander Barkov2013-06-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified: mysql-test/r/type_date.result mysql-test/r/type_datetime.result mysql-test/r/type_time.result mysql-test/t/type_date.test mysql-test/t/type_datetime.test mysql-test/t/type_time.test sql/item_func.cc sql/item_timefunc.cc sql/sql_time.cc sql/sql_time.h pending merges: Alexander Barkov 2013-06-28 MDEV-4634 Crash in CONVERT_TZ
| * Merging MDEV-4635 from 5.3.Alexander Barkov2013-06-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, fixing a bug in STR_TO_DATE(). It erroneously returned error in strict mode for dates like '0000-01-01' (zero year, but non-zero month and day). According to the manual: - NO_ZERO_DATE disallows 0000-00-00 (all date parts are zeros) - NO_ZERO_IN_DATE disallows zero month (YYYY-00-DD) or day (YYYY-MM-00). 0000-01-01 is a valid date, even in strict mode. modified: mysql-test/r/func_time.result mysql-test/r/strict.result mysql-test/t/func_time.test mysql-test/t/strict.test sql/item_timefunc.cc sql/sql_time.h pending merges: Alexander Barkov 2013-06-17 MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DAT...
* | MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD()Alexander Barkov2013-08-221-0/+2
| |
* | 10.0-monty mergeSergei Golubchik2013-07-211-3/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | 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
| * | Applied all changes from Igor and SanjaMichael Widenius2013-06-151-3/+4
| |/
* | Adding support for the SQL-standard temporal literals.Alexander Barkov2013-07-101-11/+25
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 5.3 mergeSergei Golubchik2012-08-311-1/+1
|
* mergeSergei Golubchik2011-11-031-7/+7
|\
| * compilation warnings on WindowsSergei Golubchik2011-11-021-7/+7
| |
* | mysql-5.5.18 mergeSergei Golubchik2011-11-031-1/+1
|\ \ | |/ |/|
| * Updated/added copyright headersKent Boortz2011-06-301-1/+1
| |
* | merge with 5.3Sergei Golubchik2011-10-191-15/+27
|/ | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
* WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-311-0/+101
This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h