1. 06 Jun, 2020 4 commits
    • Alexander Barkov's avatar
      MDEV-20305 Data loss on DOUBLE and DECIMAL conversion to INT · 79cdd7e7
      Alexander Barkov authored
      Bit operators (~ ^ | & << >>) and the function BIT_COUNT()
      always called val_int() for their arguments.
      It worked correctly only for INT type arguments.
      
      In case of DECIMAL and DOUBLE arguments it did not work well:
      the argument values were truncated to the maximum SIGNED BIGINT value
      of 9223372036854775807.
      
      Fixing the code as follows:
      
      - If the argument if of an integer data type,
        it works using val_int() as before.
      
      - If the argument if of some other data type, it gets the argument value
        using val_decimal(), to avoid truncation, and then converts the result
        to ulonglong.
      
      Using Item_handled_func to switch between the two approaches easier.
      
      As an additional advantage, with Item_handled_func it will be easier
      to implement overloading in the future, so data type plugings will be able
      to define their own behavioir of bit operators and BIT_COUNT().
      
      Moving the code from the former val_int() implementations
      as methods to Longlong_null, to avoid code duplication in the
      INT and DECIMAL branches.
      79cdd7e7
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · a793ae5b
      Marko Mäkelä authored
      a793ae5b
    • Marko Mäkelä's avatar
      MDEV-22816 Assertion `node->space == fil_system.sys_space' failed in fil_aio_callback · 62516c53
      Marko Mäkelä authored
      fil_aio_callback(): Remove a bogus assertion that was added in
      commit b1ab211d (MDEV-15053).
      We will have !bpage for any write by buf_flush_freed_page().
      62516c53
    • Marko Mäkelä's avatar
      MDEV-15053 fixup: MSAN use-of-uninitialized-value · 095d656d
      Marko Mäkelä authored
      buf_page_init_for_read(): Initialize the output parameter of
      buf_buddy_alloc().
      095d656d
  2. 05 Jun, 2020 36 commits