summaryrefslogtreecommitdiff
path: root/sql/field.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2015-12-291-0/+29
|\
| * Merge remote-tracking branch 'origin/10.0' into 10.1Alexander Barkov2015-12-291-0/+29
| |\
| | * Merge remote-tracking branch 'origin/5.5' into 10.0Alexander Barkov2015-12-291-0/+29
| | |\
| | | * MDEV-9319 ALTER from a bigger to a smaller blob type truncates too much dataAlexander Barkov2015-12-291-0/+29
| | | |
| | | * Fixed warnings and errors found by buildbotMonty2015-07-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | field.cc - Fixed warning about overlapping memory copy (backport from 10.0) Item_subselect.cc - Fixed core dump in main.view - Problem was that thd->lex->current_select->master_unit()->item was not set, which caused crash in maxr_as_dependent sql/mysqld.cc - Got error on shutdown as we where freeing mutex before all THD objects was freed (~THD uses some mutex). Fixed by during shutdown freeing THD inside mutex. sql/log.cc - log_space_lock and LOCK_log where locked in inconsistenly. Fixed by not having a log_space_lock around purge_logs. sql/slave.cc - Remove unnecessary log_space_lock - Move cond_broadcast inside lock to ensure we don't miss the signal
* | | | Adding "const" qualifier to methods Field::eq_def() andAlexander Barkov2015-12-281-3/+3
| | | | | | | | | | | | | | | | Copy_field::get_copy_func().
* | | | Changing the parameter of Field::eq_def() from "Field *" to "const Field *"Alexander Barkov2015-12-241-3/+3
| | | |
* | | | MDEV-9316 Add Field::store_hex_hybrid()Alexander Barkov2015-12-231-0/+25
| | | |
* | | | Moving the "ha_field_option_struct *option_struct" member fromAlexander Barkov2015-12-041-1/+0
| | | | | | | | | | | | | | | | | | | | Column_definition to Create_field, as it's not needed neither for make_field(), nor for SP variables, SP parameters, SP return values.
* | | | MDEV-9238 Wrap create_virtual_tmp_table() into a class, split into different ↵Alexander Barkov2015-12-041-111/+0
| | | | | | | | | | | | | | | | steps
* | | | MDEV-8718 - Obsolete sql_strmake() in favor of THD::strmake() and thd_strmake()Sergey Vojtovich2015-11-261-1/+1
| | | |
* | | | MDEV-8095 Split Create_fieldAlexander Barkov2015-11-251-3/+0
| | | | | | | | | | | | | | | | | | | | Part2: moving a few other fields from Column_definition to Create_field. sizeof(sp_variable) is now 200 bytes (vs 248 bytes in 10.1)
* | | | A joint patch for:Alexander Barkov2015-11-251-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - MDEV-8093 sql_yacc.yy: add %type create_field for field_spec and column_def and partially: - MDEV-8095 Split Create_field
* | | | cleanup: remove Field->stored_in_db, Create_field->stored_in_dbSergei Golubchik2015-11-241-30/+13
|/ / / | | | | | | | | | | | | and don't set Create_field->sql_type to MYSQL_TYPE_VIRTUAL temporarily only to change it again few lines later.
* | | Don't store vcol bitmaps in TABLE if table doesn't have virtual fields.Monty2015-11-101-1/+1
| | | | | | | | | | | | (Makes TABLE a bit smaller)
* | | MDEV-8992 MariaDB crashes when accessing table with GIS features.Alexey Botchkov2015-11-011-0/+3
| | | | | | | | | | | | we don't test for not-existing gis extra in FRM.
* | | MDEV-8948 ALTER ... INPLACE does work for BINARY, BLOBmariadb-10.1.8Alexander Barkov2015-10-151-8/+14
| | |
* | | Adding "virtual bool Field::can_optimize_range(...)" and moving the codeAlexander Barkov2015-10-021-0/+31
| | | | | | | | | | | | | | | | | | from Item_bool_func::get_mm_leaf() into Field_xxx::can_optimize_range(). This reduces the total amount of virtual calls. Also, it's a prerequisite change for the pluggable data types.
* | | MDEV-8658 DATE(zerofill_column) and DATE(COALESCE(zerofill_column)) return ↵Alexander Barkov2015-09-231-0/+18
| | | | | | | | | | | | | | | | | | different results MDEV-8660 TIME(int_zerofill_column) returns a wrong result
* | | MDEV-3929 Add system variable explicit_defaults_for_timestamp for ↵Alexander Barkov2015-09-221-4/+13
| | | | | | | | | | | | compatibility with MySQL
* | | MDEV-8466 CAST works differently for DECIMAL/INT vs DOUBLE for empty stringsAlexander Barkov2015-09-171-196/+239
| | | | | | | | | | | | MDEV-8468 CAST and INSERT work differently for DECIMAL/INT vs DOUBLE for a string with trailing spaces
* | | MDEV-8372 Use helper methods introduced in MDEV-7824 all around the codeAlexander Barkov2015-09-151-5/+3
| | |
* | | MDEV-8369 Unexpected impossible WHERE for a condition on a ZEROFILL fieldAlexander Barkov2015-09-111-30/+1
| | | | | | | | | | | | | | | Disable IDENTITY_SUBST propagation for ZEROFILL columns, as discussed with Sergei.
* | | MDEV-8706 Wrong result for SELECT..WHERE time_column=TIMESTAMP'2015-08-30 ↵Alexander Barkov2015-09-091-5/+54
| | | | | | | | | | | | 00:00:00' AND time_column='00:00:00'
* | | MDEV-8741 Equal field propagation leaves some remainders after simplifying ↵Alexander Barkov2015-09-091-13/+6
| | | | | | | | | | | | WH ERE zerofill_column=2010 AND zerofill_column>=2010
* | | MDEV-8766 Wrong result for SELECT..WHERE LENGTH(time_column)=8 AND ↵Alexander Barkov2015-09-081-2/+24
| | | | | | | | | | | | time_column=TIMESTAMP'2001-01-01 10:20:31'
* | | MDEV-8699 Wrong result for SELECT..WHERE ↵Alexander Barkov2015-09-071-0/+72
| | | | | | | | | | | | HEX(date_column)!='323030312D30312D3031' AND date_column='2001-01-01x'
* | | MDEV-8704 Wrong result for SELECT..WHERE LENGTH(double_column)!=6 AND ↵Alexander Barkov2015-09-071-0/+22
| | | | | | | | | | | | double_column=100e0
* | | MDEV-8703 Wrong result for SELECT..WHERE LENGTH(decimal_10_1_column)!=3 AND ↵Alexander Barkov2015-09-071-14/+43
| | | | | | | | | | | | decimal_10_1_column=1.10
* | | Field_num::get_equal_const_item() appeared to be in a wrong file (item.cc).Alexander Barkov2015-09-071-0/+19
| | | | | | | | | | | | Moving to field.cc.
* | | MDEV-8729 Wrong result for SELECT..WHERE HEX(enum_column)='61' AND ↵Alexander Barkov2015-09-061-1/+103
| | | | | | | | | | | | enum_column='a '
* | | A clean-up after the patch for MDEV-8747 and MDEV-8749:Alexander Barkov2015-09-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | removing IMPOSSIBLE_RESULT from Item_result, as it's not needed any more. The fact that an Item is not in a comparison context is now always designated by IDENTITY_SUBST in Subst_constraint. Previously IMPOSSIBLE_RESULT and IDENTITY_SUBST co-existed but actually meant the same thing.
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-09-031-20/+18
|\ \ \ | |/ / | | | | | | | | | referenced_by_foreign_key2(), needed for InnoDB to compile, was taken from 10.0-galera
| * | MDEV-8472 BINARY, VARBINARY and BLOB return different warnings on CAST to ↵Alexander Barkov2015-07-161-20/+18
| | | | | | | | | | | | DECIMAL
* | | MDEV-6152: Remove calls to current_thd while creating ItemMonty2015-09-011-108/+135
| | | | | | | | | | | | | | | Part 5: Removing calls to current_thd in net_read calls, creating fields, query_cache, acl and some other places where thd was available
* | | MDEV-8707 Wrong result forAlexander Barkov2015-08-311-0/+41
| | | | | | | | | | | | SELECT..WHERE varchar_column=DATE'2001-01-01' AND varchar_column='2001-01-01'
* | | Clean-up: moving compare_collation() from Item to Item_bool_func.Alexander Barkov2015-08-211-8/+8
| | |
* | | Stage 2 of MDEV-6152:Monty2015-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Added mem_root to all calls to new Item - Added private method operator new(size_t size) to Item to ensure that we always use a mem_root when creating an item. This saves use once call to current_thd per Item creation
* | | MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)Sergey Vojtovich2015-08-211-3/+2
| | | | | | | | | | | | | | | | | | | | | Added mandatory thd parameter to Item (and all derivative classes) constructor. Added thd parameter to all routines that may create items. Also removed "current_thd" from Item::Item. This reduced number of pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
* | | Ensure that fields declared with NOT NULL doesn't have DEFAULT values if not ↵Monty2015-08-181-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified and if not timestamp or auto_increment In original code, sometimes one got an automatic DEFAULT value in some cases, in other cases not. For example: create table t1 (a int primary key) - No default create table t2 (a int, primary key(a)) - DEFAULT 0 create table t1 SELECT .... - Default for all fields, even if they where defined as NOT NULL ALTER TABLE ... MODIFY could sometimes add an unexpected DEFAULT value. The patch is quite big because we had some many test cases that used CREATE ... SELECT or CREATE ... (...PRIMARY KEY(xxx)) which doesn't have an automatic DEFAULT anymore. Other things: - Removed warnings from InnoDB when waiting from semaphore (got this when testing things with --big)
* | | Merge branch '10.1' of github.com:MariaDB/server into 10.1Monty2015-07-091-4/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: sql/item_subselect.cc Fixed also typo in comment
| * | | Removing unused String declaration in Create_field::Create_fieldAlexander Barkov2015-07-071-7/+3
| | | |
* | | | - Renaming variables so that they don't shadow others (After this patch one ↵Monty2015-07-061-67/+76
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | can compile with -Wshadow and get much fewer warnings) - Changed ER(ER_...) to ER_THD(thd, ER_...) when thd was known or if there was many calls to current_thd in the same function. - Changed ER(ER_..) to ER_THD_OR_DEFAULT(current_thd, ER...) in some places where current_thd is not necessary defined. - Removing calls to current_thd when we have access to thd Part of this is optimization (not calling current_thd when not needed), but part is bug fixing for error condition when current_thd is not defined (For example on startup and end of mysqld) Notable renames done as otherwise a lot of functions would have to be changed: - In JOIN structure renamed: examined_rows -> join_examined_rows record_count -> join_record_count - In Field, renamed new_field() to make_new_field() Other things: - Added DBUG_ASSERT(thd == tmp_thd) in Item_singlerow_subselect() just to be safe. - Removed old 'tab' prefix in JOIN_TAB::save_explain_data() and use members directly - Added 'thd' as argument to a few functions to avoid calling current_thd.
* | | Merge tag 'mariadb-10.0.20' into 10.1Sergei Golubchik2015-06-271-99/+94
|\ \ \ | |/ /
| * | Merge branch 'bb-10.0-serg' into 10.0Sergei Golubchik2015-06-121-1/+9
| |\ \
| | * \ Merge branch '5.5' into 10.0Sergei Golubchik2015-06-111-1/+9
| | |\ \ | | | |/
| | | * MDEV-4922 Stored Procedure - Geometry parameter not working.Alexey Botchkov2015-06-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Fhe GEOMETRY field should be handled just as the BLOB field. So that was fiexed in field_conv. One additional bug was found and fixed meanwhile - thet the geometry field subtypes should also be merged for UNION command.
| | | * MDEV-7269 mysqlbinlog Don't know how to handle column type=0 meta=0 (0000)#Alexander Barkov2015-06-041-1/+1
| | | | | | | | | | | | | | | | MDEV-8267 Add /*old*/ comment into I_S.COLUMN_TYPE for old DECIMAL
| * | | Adding a few warning related protected methods in Field and reducingAlexander Barkov2015-06-111-109/+93
| |/ / | | | | | | | | | some duplicate code.
* | | MDEV-7824 [Bug #68041] Zero date can be inserted in strict no-zero mode ↵Alexander Barkov2015-06-261-28/+88
| | | | | | | | | | | | through a default value