1. 07 Feb, 2017 1 commit
    • Alexander Barkov's avatar
      MDEV-12001 Split Item_func_round::fix_length_and_dec to virtual methods in Type_handler · 3f83801d
      Alexander Barkov authored
      This patch makes the following changes (according to the task description):
      - Adds Type_handler::Item_func_round_fix_length_and_dec().
      - Splits the code from Item_func_round::fix_length_and_dec() into new
        Item_func_round methods fix_arg_int(), fix_arg_decimal(), fix_arg_double().
      - Calls the new Item_func_round methods from the relevant implementations of
        Type_handler_xxx::Item_func_round_fix_length_and_dec().
      - Adds a new error message ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
      - Makes ROUND() return the new error for GEOMETRY
      
      Additionally:
      - Inherits Item_func_round directly from Item_func_numhybrid as it
        uses nothing from Item_func_num1.
      - Fixes "MDEV-12000 ROUND(expr,const_expr_returning_NULL) creates DOUBLE(0,0)".
        Now if args[1] returns NULL, the data type is set to DOUBLE with
        NOT_FIXED_DEC decimals instead of 0 decimals.
      3f83801d
  2. 02 Feb, 2017 2 commits
  3. 01 Feb, 2017 13 commits
    • Igor Babaev's avatar
      69114862
    • Nirbhay Choubey's avatar
    • Alexander Barkov's avatar
      MDEV-11913 Split sp_get_item_value() into methods in Type_handler · 02a4bbb4
      Alexander Barkov authored
      This patch also fixes:
       MDEV-11815 SP variables of temporal data types do not replicate correctly
      Temporal values are now printed in temporal literal format, with the
      SQL-standard data type prefix:
        TIME'10:20:30', DATE'2001-01-01', TIMESTAMP'2001-01-01 10:20:30'
      Previously temporal values were printed using the text string notation, e.g.
       _latin1'10:20:30' COLLATE latin1_swedish_ci, hence the bug.
      02a4bbb4
    • Georg Richter's avatar
      Fix for MDEV-11174: · 23628d12
      Georg Richter authored
      A GCM encrypted ciphertext must contain an authentication tag with AES_BLOCK_SIZE length, so we need to check that the length of ciphertext is at least AES_BLOCK_SIZE.
      23628d12
    • Marko Mäkelä's avatar
      Clean up a test. · e1977712
      Marko Mäkelä authored
      Import and adapt the changes from MySQL 5.7.
      e1977712
    • Marko Mäkelä's avatar
      Shut down InnoDB after aborted startup. · 81b7fe9d
      Marko Mäkelä authored
      This fixes memory leaks in tests that cause InnoDB startup to fail.
      
      buf_pool_free_instance(): Also free buf_pool->flush_rbt, which would
      normally be freed when crash recovery finishes.
      
      fil_node_close_file(), fil_space_free_low(), fil_close_all_files():
      Relax some debug assertions to tolerate !srv_was_started.
      
      innodb_shutdown(): Renamed from innobase_shutdown_for_mysql().
      Changed the return type to void. Do not assume that all subsystems
      were started.
      
      que_init(), que_close(): Remove (empty functions).
      
      srv_init(), srv_general_init(): Remove as global functions.
      
      srv_free(): Allow srv_sys=NULL.
      
      srv_get_active_thread_type(): Only return SRV_PURGE if purge really
      is running.
      
      srv_shutdown_all_bg_threads(): Do not reset srv_start_state. It will
      be needed by innodb_shutdown().
      
      innobase_start_or_create_for_mysql(): Always call srv_boot() so that
      innodb_shutdown() can assume that it was called. Make more subsystems
      dependent on SRV_START_STATE_STAT.
      
      srv_shutdown_bg_undo_sources(): Require SRV_START_STATE_STAT.
      
      trx_sys_close(): Do not assume purge_sys!=NULL. Do not call
      buf_dblwr_free(), because the doublewrite buffer can exist while
      the transaction system does not.
      
      logs_empty_and_mark_files_at_shutdown(): Do a faster shutdown if
      !srv_was_started.
      
      recv_sys_close(): Invoke dblwr.pages.clear() which would normally
      be invoked by buf_dblwr_process().
      
      recv_recovery_from_checkpoint_start(): Always release log_sys->mutex.
      
      row_mysql_close(): Allow the subsystem not to exist.
      81b7fe9d
    • Marko Mäkelä's avatar
      MDEV-11671 Duplicated message for innodb_page_size · 774056c8
      Marko Mäkelä authored
      Display a NOTE, not a WARNING for non-default page size.
      774056c8
    • Marko Mäkelä's avatar
      Actually invoke free() in ut_allocator::deallocate(). · 16bc16f9
      Marko Mäkelä authored
      The necessary call was inadvertently commented out in a
      merge of MySQL 5.7.14 to MariaDB 10.2.1
      (commit fec844ac).
      16bc16f9
    • Marko Mäkelä's avatar
      Make the innochecksum tests more robust. · a5d8dc18
      Marko Mäkelä authored
      As noted in MDEV-11947, we should disable the InnoDB doublewrite buffer
      during the tests, because when rewriting page checksums, innochecksum
      would skip the pages that are in the doublewrite buffer area. Because
      the doublewrite buffer is emptied on server startup and not shutdown,
      we should initially start with the doublewrite buffer disabled, so that
      there will be no warning messages for wrong page checksums in the
      doublewrite buffer.
      
      Also, correct the obvious typo where restart_options should have been
      $restart_parameters, so that InnoDB is actually verifying that the
      checksums were rewritten.
      a5d8dc18
    • Igor Babaev's avatar
      Adjusted tests after the fix for bug mdev-9976. · ba8ab6a7
      Igor Babaev authored
      Now ROWS is a reserved key word, so cannot be used
      as an alias name.
      ba8ab6a7
    • Igor Babaev's avatar
      Fixed bug mdev-9976. · 9073f9fd
      Igor Babaev authored
      This bug happens due to a conflict in the construct window_spec.
      (win_ref conflicts with the non-reserved key word ROWS).
      The standard SQL-2003 says that ROWS is a reserved key word.
      Made this key word reserved in our grammar and removed
      the conflict.
      9073f9fd
    • Igor Babaev's avatar
      Fixed bug mdev-10875. · 81c1abe8
      Igor Babaev authored
      Now, after the implementation of mdev-8646
      "Re-engineer the code for post-join operations"
      create_sort_index() can be called for subqueries.
      81c1abe8
    • Alexander Barkov's avatar
  4. 31 Jan, 2017 4 commits
  5. 30 Jan, 2017 5 commits
  6. 29 Jan, 2017 3 commits
  7. 28 Jan, 2017 3 commits
    • Igor Babaev's avatar
      Fixed bug mdev-10773. · abfcdb8f
      Igor Babaev authored
      The temporary tables created for recursive table references
      should be closed in close_thread_tables(), because they might
      be used in the statements like ANALYZE WITH r AS (...) SELECT * from r
      where r is defined through recursion.
      abfcdb8f
    • Sergei Golubchik's avatar
      mysqlbinlog memory leaks · 64b5e942
      Sergei Golubchik authored
      that failed main.mysqlbinlog
      64b5e942
    • Sergei Golubchik's avatar
      cleanup: thd_destructor_proxy · 30ba3100
      Sergei Golubchik authored
      1. wait for thd_destructor_proxy thread to start after creating it.
         this ensures that the thread is ready to receive a shutdown signal
         whenever we want to send it.
      2. join it at shutdown, this guarantees that no innodb THD will exist
         after innobase_end().
      
      this fixes crashes and memory leaks in main.mysqld_option_err
      (were innodb was started and then immediately shut down).
      30ba3100
  8. 27 Jan, 2017 9 commits