summaryrefslogtreecommitdiff
path: root/sql/field.cc
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-16217: Assertion `!table || (!table->read_set || ↵bb-10.2-MDEV-16217Oleksandr Byelkin2018-11-141-2/+15
| | | | | | | | | bitmap_is_set(table->read_set, field_index))' failed in Field_num::get_date - clean up DEFAULT() to work only with default value and correctly print itself. - fix of DBUG_ASSERT about fields read/write - fix of field marking for write based really on the thd->mark_used_columns flag
* Merge branch '10.1' into 10.2Sergei Golubchik2018-09-241-1/+1
|\
| * Merge branch '10.0' into 10.1Sergei Golubchik2018-09-231-1/+2
| |\
| | * Merge remote-tracking branch 'origin/5.5' into 10.0Alexander Barkov2018-09-211-1/+2
| | |\
| | | * MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong resultAlexander Barkov2018-09-201-1/+2
| | | |
* | | | Merge branch '10.1' into 10.2Oleksandr Byelkin2018-09-141-6/+11
|\ \ \ \ | |/ / /
| * | | Merge branch '11.0' into 10.1Oleksandr Byelkin2018-09-061-6/+11
| |\ \ \ | | |/ /
| | * | MDEV-17067 Server crash in write_block_recordMonty2018-08-241-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that Create_field::create_length_to_internal_length() calculated a different pack_length for NEWDECIMAL compared to Field_new_decimal constructor which lead to some unused bytes in the middle of the record, which Aria didn't like.
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-08-021-1/+7
|\ \ \ \ | |/ / /
| * | | MDEV-16711 Crash in Field_blob::store() while reading statisticsIgor Babaev2018-07-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for the small InnoDB table This bug was introduced by the patch 6c414fcf89510215d6d3466eb9992d444eadae89. The patch has not taken into account that some objects of the Field_* types are created only for TABLE_SHARE and the field 'table' is set to NULL for them. In particular such are objects created to store statistical min/max values for columns.
* | | | MDEV-12574 MAX(old_decimal) produces a column of the old DECIMAL typeAlexander Barkov2018-06-251-9/+18
| | | |
* | | | MDEV-12809 Bad column type created for TEXT(1431655798) CHARACTER SET utf8Alexander Barkov2018-06-211-1/+1
| | | |
* | | | MDEV-15352 AUTO_INCREMENT breaks after updating a column value to a negative ↵Alexander Barkov2018-06-141-0/+10
| | | | | | | | | | | | | | | | number
* | | | register keyword c++17 warningEugene Kosov2018-04-241-1/+1
| | | |
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2018-02-111-0/+7
|\ \ \ \ | |/ / /
| * | | Merge remote-tracking branch 'origin/10.0' into 10.1Alexander Barkov2018-02-101-0/+7
| |\ \ \ | | |/ /
| | * | MDEV-15262 Wrong results for SELECT..WHERE ↵Alexander Barkov2018-02-091-0/+7
| | | | | | | | | | | | | | | | non_indexed_datetime_column=indexed_time_column
* | | | Merge branch 'github/10.1' into 10.2Sergei Golubchik2018-02-061-2/+2
|\ \ \ \ | |/ / /
| * | | Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-021-2/+2
| |\ \ \ | | |/ /
| | * | Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-241-2/+2
| | |\ \ | | | |/
| | | * BIT field woesSergei Golubchik2018-01-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * get_rec_bits() was always reading two bytes, even if the bit field contained only of one byte * In various places the code used field->pack_length() bytes starting from field->ptr, while it should be field->pack_length_in_rec() * Field_bit::key_cmp and Field_bit::cmp_max passed field_length as an argument to memcmp(), but field_length is the number of bits!
| * | | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-12-201-1/+8
| |\ \ \ | | |/ /
| | * | An after-fix for MDEV-14008 Assertion failing: `!is_set() || (m_status == ↵Alexander Barkov2017-12-201-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | DA_OK_BULK && is_bulk_op()) Fixing an additional failure discovered after a merge to 10.2
* | | | Fixed wrong arguments to printf and related functionsMonty2018-01-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other things, mainly to get create_mysqld_error_find_printf_error tool to work: - Added protection to not include mysqld_error.h twice - Include "unireg.h" instead of "mysqld_error.h" in server - Added protection if ER_XX messages are already defined - Removed wrong calls to my_error(ER_OUTOFMEMORY) as my_malloc() and my_alloc will do this automatically - Added missing %s to ER_DUP_QUERY_NAME - Removed old and wrong calls to my_strerror() when using MY_ERROR_ON_RENAME (wrong merge) - Fixed deadlock error message from Galera. Before the extra information given to ER_LOCK_DEADLOCK was missing because ER_LOCK_DEADLOCK doesn't provide any extra information. I kept #ifdef mysqld_error_find_printf_error_used in sql_acl.h to make it easy to do this kind of check again in the future
* | | | Merge 10.1 to 10.2Marko Mäkelä2017-12-191-0/+9
|\ \ \ \ | |/ / / | | | | | | | | | | | | Follow-up fix to MDEV-14008: Let Field_double::val_uint() silently return 0 on error
| * | | Merge 10.0 into 10.1Marko Mäkelä2017-12-181-2/+2
| |\ \ \ | | |/ /
| | * | MDEV-14008 Assertion failing: `!is_set() || (m_status == DA_OK_BULK && ↵Alexander Barkov2017-12-181-2/+2
| | | | | | | | | | | | | | | | is_bulk_op())
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-10-241-7/+7
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2017-10-221-7/+7
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.0Sergei Golubchik2017-10-181-7/+7
| | |\ \ | | | |/
| | | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2017-10-171-7/+7
| | | |\
| | | | * Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE (SIG 6 ↵Tor Didriksen2017-08-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -STRINGS/CTYPE-UTF8.C:5151) Backport from 5.7 to 5.5 Field_set::val_str() should return String("", 0, cs) rather than String(NULL, 0, cs)
| | | * | MDEV-13459 Warnings, when compiling with gcc-7.xSergei Golubchik2017-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | mostly caused by -Wimplicit-fallthrough
| | * | | MDEV-13175 Adding a new enum value at the end of a list triggers a table rebuildSergei Golubchik2017-07-201-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of 7e29f2d64fb from 10.1. Create_field does not set BINARY_FLAG, so the check didn't work at all. Also, character sets were already compared, so this check would've been redundant (if it would've worked).
| | * | | Silence bogus GCC 7 warnings -Wimplicit-fallthroughMarko Mäkelä2017-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not silence uncertain cases, or fix any bugs. The only functional change should be that ha_federated::extra() is not calling DBUG_PRINT to report an unhandled case for HA_EXTRA_PREPARE_FOR_DROP.
| * | | | bugfix: copy timestamps correctly in INSERT...SELECTSergei Golubchik2017-09-211-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | don't do it via MYSQL_TIME, that conversion is lossy around DST change dates.
* | | | | MDEV-14038 ALTER TABLE does not exit on error with InnoDB + bad default functionAlexander Barkov2017-10-111-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing Field::set_default from void to int. It now uses the same return value notation with Field::store*() and Item::save_in_field().
* | | | | MDEV-11586 UNION of FLOAT type results in erroneous precisionAlexander Barkov2017-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing the asymmetry in the array field_types_merge_rules[][] which caused data loss when mixing FLOAT + BIGINT in UNIONs or hybrid functions: 1. FLOAT + INT = DOUBLE 2. FLOAT + BIGINT = FLOAT 3. INT + FLOAT = DOUBLE 4. BIGINT + FLOAT = DOUBLE Now FLOAT + BIGINT (as in #2) also produces DOUBLE, like the cases #1,#3,#4 do.
* | | | | MDEV-13384 - misc Windows warnings fixedVladislav Vaintroub2017-09-281-16/+17
| | | | |
* | | | | MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.Vladislav Vaintroub2017-09-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix win64 pointer truncation warnings (usually coming from misusing 0x%lx and long cast in DBUG) - Also fix printf-format warnings Make the above mentioned warnings fatal. - fix pthread_join on Windows to set return value.
* | | | | bugfix: copy timestamps correctly in INSERT...SELECTSergei Golubchik2017-09-221-15/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement Field_timestamp::save_in_field(timestamp_field) that stores timestamp values without converting them to MYSQL_TIME and back, because this conversion is lossy around DST change time. This fixes main.old-mode test. This is 10.2 version of f8a800bec81
* | | | | MDEV-13868 cannot insert 1288481126 in a timestamp column in Europe/MoscowSergei Golubchik2017-09-221-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make insert NULL into a timestamp mark the field as having an explicit value. So that the field won't be assigned the value again in TABLE::update_default_field() make Item_func_now_local::save_in_field(timestamp_field) not to go through MYSQL_TIME - this conversion is lossy around DST change times. This fixes inserting a default value into a timestamp field.
* | | | | Merge 10.1 into 10.2Marko Mäkelä2017-05-221-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Silence bogus GCC 7 warnings -Wimplicit-fallthroughMarko Mäkelä2017-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not silence uncertain cases, or fix any bugs. The only functional change should be that ha_federated::extra() is not calling DBUG_PRINT to report an unhandled case for HA_EXTRA_PREPARE_FOR_DROP.
* | | | | Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mariarocksSergei Petrunia2017-03-111-13/+31
|\ \ \ \ \
| * | | | | MDEV-10201 Bad results for CREATE TABLE t1 (a INT DEFAULT b, b INT DEFAULT 4)Sergei Golubchik2017-02-131-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optionally do table->update_default_fields() even for INSERT that supposedly provides values for all column. Because these "values" might be DEFAULT, which would need table->update_default_fields() at the end. Also set Item_default_value::used_tables() from the default expression. Non-zero used_field() means that mysql_insert() will initialize all fields to their default values (with restore_record()) even if all columns are later provided with values. Because default expressions may refer to other columns and they must be initialized.
| * | | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-02-101-9/+13
| |\ \ \ \ \ | | |/ / / /
| | * | | | MDEV-11712: ArmHF EXPLAIN JSON garbage longlong values printedVicențiu Ciorbaru2017-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Make sure printing with snprintf uses the correct typed parameters.
| | * | | | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-01-161-6/+9
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge remote-tracking branch 'origin/5.5' into 10.0vicentiu2017-01-061-6/+9
| | | |\ \ \ | | | | |/ /