summaryrefslogtreecommitdiff
path: root/mysql-test/main/type_float.test
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.8 into 10.9Marko Mäkelä2022-12-131-0/+10
|\
| * Merge 10.4 into 10.5Marko Mäkelä2022-12-131-0/+10
| |\
| | * Merge 10.3 into 10.4Marko Mäkelä2022-12-131-0/+10
| | |\
| | | * MDEV-29473 UBSAN: Signed integer overflow: X * Y cannot be represented in ↵Alexander Barkov2022-11-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | type 'int' in strings/dtoa.c Fixing a few problems relealed by UBSAN in type_float.test - multiplication overflow in dtoa.c - uninitialized Field::geom_type (and Field::srid as well) - Wrong call-back function types used in combination with SHOW_FUNC. Changes in the mysql_show_var_func data type definition were not properly addressed all around the code by the following commits: b4ff64568c88ab3ce559e7bd39853d9cbf86704a 18feb62feeb833494d003615861b9c78ec008a90 0ee879ff8ac1b80cd9a963015344f5698a81f309 Adding a helper SHOW_FUNC_ENTRY() function and replacing all mysql_show_var_func declarations using SHOW_FUNC to SHOW_FUNC_ENTRY, to catch mysql_show_var_func in the future at compilation time.
* | | | Merge branch 'bb-10.8-all-builders' into bb-10.9-all-buildersLena Startseva2022-09-271-0/+6
|\ \ \ \ | |/ / /
| * | | MDEV-27691: make working view-protocolLena Startseva2022-09-261-0/+3
| |/ / | | | | | | | | | Update tests for version 10.5
| * | Merge branch 'bb-10.3-all-builders' into bb-10.4-all-buildersLena Startseva2022-09-231-0/+3
| |\ \ | | |/
| | * MDEV-27691: make working view-protocolLena Startseva2022-09-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Tests with checking metadata or that cannot be run with the view-protocol are excluded from --view-protocol. For tests that do not allow the use of an additional connection, the util connection is disabled with "--disable_service_connection". Also cases with bugs for --view-protocol are disabled.
* | | MDEV-27712 Reduce the size of Lex_length_and_dec_st from 16 to 8Alexander Barkov2022-03-221-0/+41
|/ / | | | | | | | | | | | | User visible change: Removing the length specified by user from error messages: ER_TOO_BIG_SCALE and ER_TOO_BIG_PRECISION as discussed with Sergei.
* | Merge mariadb-10.4.14Marko Mäkelä2020-08-101-0/+14
|\ \
| * \ Merge branch '10.3' into 10.4Oleksandr Byelkin2020-08-031-0/+14
| |\ \ | | |/
| | * Merge branch '10.2' into 10.3Oleksandr Byelkin2020-08-031-0/+14
| | |
* | | MDEV-23415 Server crash or Assertion `dec_length <= str_length' failed in ↵Alexander Barkov2020-08-081-0/+20
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_func_format::val_str_ascii Problem: The crash happened in FORMAT(double, dec>=31, 'de_DE'). The patch for MDEV-23118 (commit 0041dacc1b8e85e1958355d1cfdc36055b05a884) did not take into account that String::set_real() has a limit of 31 (FLOATING_POINT_DECIMALS) fractional digits. So for the range of 31..38 digits, set_real() switches to use: - my_fcvt() - decimal point notation, e.g. 1.9999999999 - my_gcvt() - scientific notation, e.g. 1e22 my_gcvt() returned a shorter string than Item_func_format::val_str_ascii() expected to get after the my_fcvt() call, so it crashed on assert. Solution: We cannot extend set_real() to use the my_fcvt() mode for the range of 31..38 fractional digits, because set_real() is used in a lot of places and such a change will break everything. Introducing String::set_fcvt() which always prints using my_fcvt() for the whole range of decimals 0..38, supported by the FORMAT() function.
* | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-1/+68
|\ \ | |/
| * MDEV-16872 Add CAST(expr AS FLOAT)Alexander Barkov2019-05-161-0/+39
| |
| * MDEV-19468 Hybrid type expressions return wrong format for FLOATAlexander Barkov2019-05-151-0/+37
| |
* | Merge 10.3 into 10.4Marko Mäkelä2018-10-051-0/+30
|\ \ | |/
| * Merge branch '10.2' into 10.3Sergei Golubchik2018-09-281-0/+30
| |
* | MDEV-11361 Equal condition propagation does not work for DECIMAL and ↵Alexander Barkov2018-06-081-0/+21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | temporal dynamic SQL parameters MDEV-16426 Optimizer erroneously treats equal constants of different formats as same A cleanup for MDEV-14630: fixing a crash in Item_decimal::eq(). Problems: - old implementations of Item_decimal::eq() and Item_temporal_literal::eq() were not symmetric with Item_param::eq(), this caused MDEV-11361. - old implementations for DECIMAL and temporal data types did not take into account that in case when eq() is called with binary_cmp==true, {{eq()}} should check not only equality of the two values, but also equality if their decimal precision. This cuases MDEV-16426. - Item_decimal::eq() crashes with "item" pointing to a non-DECIMAL value. Before MDEV-14630 non-DECIMAL values were filtered out by the test: type() == item->type() as literals of different types had different type(). After MDEV-14630 type() for literals of all data types return CONST_ITEM. This caused failures in tests: ./mtr engines/iuds.insert_number ./mtr --ps --embedded main.explain_slowquerylog (revealed by buildbot) The essence of the fix: Making literals and Item_param reuse the same code to avoid asymmetries between Item_param::eq(Item_literal) and Item_literal::eq(Item_param), now and in the future, and to avoid code duplication between Item_literal and Item_param. Adding tests for "decimals" for DECIMAL and temporal data types, to treat constants of different scale as not equal when "binary_cmp" is "true". Details: 1. Adding a helper class Item_const to extract constant values from Items easier 2. Deriving Item_basic_value from Item_const 3. Joining Type_handler::Item_basic_value_eq() and Item_basic_value_bin_eq() into a single method with an extra "binary_cmp" argument (it looks simple this way) and renaming the new method to Item_const_eq(). Modifying its implementations to operate with Item_const instead of Item_basic_value. 4. Adding a new class Type_handler_hex_hybrid, to handle hex constants like 0x616263. 5. Removing Item::VARBIN_ITEM and fixing Item_hex_constant to use type_handler_hex_hybrid instead of type_handler_varchar. Item_hex_hybrid::type() now returns CONST_ITEM, like all other literals do. 6. Move virtual methods Item::type_handler_for_system_time() and Item::cast_to_int_type_handler() from Item to Type_handler. 7. Removing Item_decimal::eq() and Item_temporal_literal::eq(). These classes are now handled by the generic Item_basic_value::eq(). 8. Implementing Type_handler_temporal_result::Item_const_eq() and Type_handler_decimal_result::Item_const_eq(), this fixes MDEV-11361. 9. Adding tests for "decimals" into Type_handler_decimal_result::Item_const_eq() and Type_handler_temporal_result::Item_const_eq() in case if "binary_cmp" is true. This fixes MDEV-16426. 10. Moving Item_cache out of Item_basic_value. They share nothing. It simplifies implementation of Item_basic_value::eq(). Deriving Item_cache directly from Item. 11. Adding class DbugStringItemTypeValue, which used Item::print() internally, and using in instead of the old debug printing code. This gives nicer output in func_debug.result. Changes N5 and N6 do not directly relate to the bugs fixed, but make the code fully symmetric across all literal types. Without a new handler Type_handler_hex_hybrid we'd have to keep two code branches (for regular literals and for hex hybrid literals).
* Create 'main' test directory and move 't' and 'r' thereMichael Widenius2018-03-291-0/+553