An error occurred fetching the project authors.
  1. 26 Feb, 2016 1 commit
  2. 24 Feb, 2016 1 commit
  3. 22 Feb, 2016 1 commit
    • Raghavendra D Prabhu's avatar
      PXC-391: Avoid Total Order Isolation (TOI) for LOCAL sql admin commands. · 1077eef9
      Raghavendra D Prabhu authored
      The admin commands in question are:
          > OPTIMIZE
          > REPAIR
          > ANALYZE
      
      For LOCAL or NO_WRITE_TO_BINLOG invocations of these commands, ie
      
          OPTIMIZE LOCAL TABLE <t1>
      
      they are not binlogged as expected.
      
      Also, in addition, they are not executed under TOI.
      
      Hence, they are not propagated to other nodes.
      
      The effect is same as that of wsrep_on=0.
      
      Also added tests for this.
      
      A WSREP_DEBUG for wsrep_register_hton has also been added.
      
      The galera_flush_local test has also been updated for verifying that effects
      of  NO_WRITE_TO_BINLOG / LOCAL are equivalent to wsrep_on=0 from wsrep
      perspective.
      
      (cherry picked from commit 5065122f94a8002d4da231528a46f8d9ddbffdc2)
      
      Conflicts:
      	sql/sql_admin.cc
      	sql/sql_reload.cc
      	sql/wsrep_hton.cc
      1077eef9
  4. 22 Jan, 2016 1 commit
  5. 13 Nov, 2015 1 commit
    • Ajo Robert's avatar
      Bug#19817021 CRASH IN TABLE_LIST::PREPARE_SECURITY WHEN · 15de3c62
      Ajo Robert authored
      DOING BAD DDL IN PREPARED STATEMENT
      
      Analysis
      ========
      A repeat execution of the prepared statement 'ALTER TABLE v1
      CHECK PARTITION' where v1 is a view leads to server exit.
      
      ALTER TABLE ... CHECK PARTITION is not applicable for views
      and check for the same check is missing. This leads to
      further execution and creation of derived table for the view
      (Allocated under temp_table mem_root). Any reference to open
       view or related pointers from second execution leads to
      server exit as the same was freed at previous execution closure.
      
      Fix:
      ======
      Added check for view in mysql_admin_table() on PARTITION
      operation. This will prevent mysql_admin_table() from
      going ahead and creating temp table and related issues.
      Changed message on admin table view operation error to
      be more appropriate.
      15de3c62
  6. 27 Aug, 2015 1 commit
  7. 21 Aug, 2015 2 commits
    • Monty's avatar
      Stage 2 of MDEV-6152: · 1bae0d9e
      Monty authored
      - 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
      1bae0d9e
    • Sergey Vojtovich's avatar
      MDEV-8010 - Avoid sql_alloc() in Items (Patch #1) · 31e365ef
      Sergey Vojtovich authored
      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.
      31e365ef
  8. 06 Jul, 2015 1 commit
    • Monty's avatar
      - Renaming variables so that they don't shadow others (After this patch one... · 7332af49
      Monty authored
      - Renaming variables so that they don't shadow others (After this patch one 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.
      7332af49
  9. 01 Jun, 2015 1 commit
  10. 09 May, 2015 1 commit
    • Sergei Golubchik's avatar
      MDEV-8115 mysql_upgrade crashes the server with REPAIR VIEW · e1868fd6
      Sergei Golubchik authored
      on REPAIR don't do table-specific stuff for views
      (because even if the view has a temp table opened for it,
      it's not opened all the way down the engine. In particular,
      Aria crashes in maria_status() because MARIA_HA* info - that is
      table->table->file->file - is NULL)
      e1868fd6
  11. 07 May, 2015 1 commit
    • Sergei Golubchik's avatar
      MDEV-8115 mysql_upgrade crashes the server with REPAIR VIEW · 0014bdc7
      Sergei Golubchik authored
      on REPAIR don't do table-specific stuff for views
      (because even if the view has a temp table opened for it,
      it's not opened all the way down the engine. In particular,
      Aria crashes in maria_status() because MARIA_HA* info - that is
      table->table->file->file - is NULL)
      0014bdc7
  12. 29 Apr, 2015 1 commit
  13. 12 Apr, 2015 2 commits
  14. 08 Apr, 2015 1 commit
    • Kristian Nielsen's avatar
      MDEV-7888, MDEV-7929: Parallel replication hangs sometimes on ANALYZE TABLE or DDL · 3b961347
      Kristian Nielsen authored
      The hangs occur when the group_commit_orderer object is freed before the last
      mark_start_commit() call on it - this loses the wakeup to other waiting worker
      threads, causing them to hang until killed manually.
      
      The object was freed because wakeup_subsequent_commits() was called two early
      in two places. For MDEV-7888, during ANALYZE TABLE, and for MDEV-7929 during
      record_gtid() after processing a DDL event. The group_commit_orderer object
      can be freed when its last transaction has called wait_for_prior_commit().
      
      Fix by implementing a suspend/resume mechanism for wakeup_subsequent_commits()
      that can be used in places where a transaction is committed without this being
      the commit of the actual replication event group.
      
      Also add a protection mechanism (that asserts in debug builds) which can
      prevent the too-early free and hang if other similar bugs should remain in
      other parts of the code.
      3b961347
  15. 11 Mar, 2015 1 commit
  16. 30 Sep, 2014 1 commit
    • Michael Widenius's avatar
      MDEV-5120 Test suite test maria-no-logging fails · 70823e1d
      Michael Widenius authored
      The reason for the failure was a bug in an include file on debian that causes 'struct stat'
      to have different sized depending on the environment.
      
      This patch fixes so that we always include my_global.h or my_config.h before we include any other files.
      
      Other things:
      - Removed #include <my_global.h> in some include files; Better to always do this at the top level to have as few
        "always-include-this-file-first' files as possible.
      - Removed usage of some include files that where already included by my_global.h or by other files.
      
      
      client/mysql_plugin.c:
        Use my_global.h first
      client/mysqlslap.c:
        Remove duplicated include files
      extra/comp_err.c:
        Remove duplicated include files
      include/m_string.h:
        Remove duplicated include files
      include/maria.h:
        Remove duplicated include files
      libmysqld/emb_qcache.cc:
        Use my_global.h first
      plugin/semisync/semisync.h:
        Use my_pthread.h first
      sql/datadict.cc:
        Use my_global.h first
      sql/debug_sync.cc:
        Use my_global.h first
      sql/derror.cc:
        Use my_global.h first
      sql/des_key_file.cc:
        Use my_global.h first
      sql/discover.cc:
        Use my_global.h first
      sql/event_data_objects.cc:
        Use my_global.h first
      sql/event_db_repository.cc:
        Use my_global.h first
      sql/event_parse_data.cc:
        Use my_global.h first
      sql/event_queue.cc:
        Use my_global.h first
      sql/event_scheduler.cc:
        Use my_global.h first
      sql/events.cc:
        Use my_global.h first
      sql/field.cc:
        Use my_global.h first
        Remove duplicated include files
      sql/field_conv.cc:
        Use my_global.h first
      sql/filesort.cc:
        Use my_global.h first
        Remove duplicated include files
      sql/gstream.cc:
        Use my_global.h first
      sql/ha_ndbcluster.cc:
        Use my_global.h first
      sql/ha_ndbcluster_binlog.cc:
        Use my_global.h first
      sql/ha_ndbcluster_cond.cc:
        Use my_global.h first
      sql/ha_partition.cc:
        Use my_global.h first
      sql/handler.cc:
        Use my_global.h first
      sql/hash_filo.cc:
        Use my_global.h first
      sql/hostname.cc:
        Use my_global.h first
      sql/init.cc:
        Use my_global.h first
      sql/item.cc:
        Use my_global.h first
      sql/item_buff.cc:
        Use my_global.h first
      sql/item_cmpfunc.cc:
        Use my_global.h first
      sql/item_create.cc:
        Use my_global.h first
      sql/item_geofunc.cc:
        Use my_global.h first
      sql/item_inetfunc.cc:
        Use my_global.h first
      sql/item_row.cc:
        Use my_global.h first
      sql/item_strfunc.cc:
        Use my_global.h first
      sql/item_subselect.cc:
        Use my_global.h first
      sql/item_sum.cc:
        Use my_global.h first
      sql/item_timefunc.cc:
        Use my_global.h first
      sql/item_xmlfunc.cc:
        Use my_global.h first
      sql/key.cc:
        Use my_global.h first
      sql/lock.cc:
        Use my_global.h first
      sql/log.cc:
        Use my_global.h first
      sql/log_event.cc:
        Use my_global.h first
      sql/log_event_old.cc:
        Use my_global.h first
      sql/mf_iocache.cc:
        Use my_global.h first
      sql/mysql_install_db.cc:
        Remove duplicated include files
      sql/mysqld.cc:
        Remove duplicated include files
      sql/net_serv.cc:
        Remove duplicated include files
      sql/opt_range.cc:
        Use my_global.h first
      sql/opt_subselect.cc:
        Use my_global.h first
      sql/opt_sum.cc:
        Use my_global.h first
      sql/parse_file.cc:
        Use my_global.h first
      sql/partition_info.cc:
        Use my_global.h first
      sql/procedure.cc:
        Use my_global.h first
      sql/protocol.cc:
        Use my_global.h first
      sql/records.cc:
        Use my_global.h first
      sql/records.h:
        Don't include my_global.h
        Better to do this at the upper level
      sql/repl_failsafe.cc:
        Use my_global.h first
      sql/rpl_filter.cc:
        Use my_global.h first
      sql/rpl_gtid.cc:
        Use my_global.h first
      sql/rpl_handler.cc:
        Use my_global.h first
      sql/rpl_injector.cc:
        Use my_global.h first
      sql/rpl_record.cc:
        Use my_global.h first
      sql/rpl_record_old.cc:
        Use my_global.h first
      sql/rpl_reporting.cc:
        Use my_global.h first
      sql/rpl_rli.cc:
        Use my_global.h first
      sql/rpl_tblmap.cc:
        Use my_global.h first
      sql/rpl_utility.cc:
        Use my_global.h first
      sql/set_var.cc:
        Added comment
      sql/slave.cc:
        Use my_global.h first
      sql/sp.cc:
        Use my_global.h first
      sql/sp_cache.cc:
        Use my_global.h first
      sql/sp_head.cc:
        Use my_global.h first
      sql/sp_pcontext.cc:
        Use my_global.h first
      sql/sp_rcontext.cc:
        Use my_global.h first
      sql/spatial.cc:
        Use my_global.h first
      sql/sql_acl.cc:
        Use my_global.h first
      sql/sql_admin.cc:
        Use my_global.h first
      sql/sql_analyse.cc:
        Use my_global.h first
      sql/sql_audit.cc:
        Use my_global.h first
      sql/sql_base.cc:
        Use my_global.h first
      sql/sql_binlog.cc:
        Use my_global.h first
      sql/sql_bootstrap.cc:
        Use my_global.h first
        Use my_global.h first
      sql/sql_cache.cc:
        Use my_global.h first
      sql/sql_class.cc:
        Use my_global.h first
      sql/sql_client.cc:
        Use my_global.h first
      sql/sql_connect.cc:
        Use my_global.h first
      sql/sql_crypt.cc:
        Use my_global.h first
      sql/sql_cursor.cc:
        Use my_global.h first
      sql/sql_db.cc:
        Use my_global.h first
      sql/sql_delete.cc:
        Use my_global.h first
      sql/sql_derived.cc:
        Use my_global.h first
      sql/sql_do.cc:
        Use my_global.h first
      sql/sql_error.cc:
        Use my_global.h first
      sql/sql_explain.cc:
        Use my_global.h first
      sql/sql_expression_cache.cc:
        Use my_global.h first
      sql/sql_handler.cc:
        Use my_global.h first
      sql/sql_help.cc:
        Use my_global.h first
      sql/sql_insert.cc:
        Use my_global.h first
      sql/sql_lex.cc:
        Use my_global.h first
      sql/sql_load.cc:
        Use my_global.h first
      sql/sql_locale.cc:
        Use my_global.h first
      sql/sql_manager.cc:
        Use my_global.h first
      sql/sql_parse.cc:
        Use my_global.h first
      sql/sql_partition.cc:
        Use my_global.h first
      sql/sql_plugin.cc:
        Added comment
      sql/sql_prepare.cc:
        Use my_global.h first
      sql/sql_priv.h:
        Added error if we use this before including my_global.h
        This check is here becasue so many files includes sql_priv.h first.
      sql/sql_profile.cc:
        Use my_global.h first
      sql/sql_reload.cc:
        Use my_global.h first
      sql/sql_rename.cc:
        Use my_global.h first
      sql/sql_repl.cc:
        Use my_global.h first
      sql/sql_select.cc:
        Use my_global.h first
      sql/sql_servers.cc:
        Use my_global.h first
      sql/sql_show.cc:
        Added comment
      sql/sql_signal.cc:
        Use my_global.h first
      sql/sql_statistics.cc:
        Use my_global.h first
      sql/sql_table.cc:
        Use my_global.h first
      sql/sql_tablespace.cc:
        Use my_global.h first
      sql/sql_test.cc:
        Use my_global.h first
      sql/sql_time.cc:
        Use my_global.h first
      sql/sql_trigger.cc:
        Use my_global.h first
      sql/sql_udf.cc:
        Use my_global.h first
      sql/sql_union.cc:
        Use my_global.h first
      sql/sql_update.cc:
        Use my_global.h first
      sql/sql_view.cc:
        Use my_global.h first
      sql/sys_vars.cc:
        Added comment
      sql/table.cc:
        Use my_global.h first
      sql/thr_malloc.cc:
        Use my_global.h first
      sql/transaction.cc:
        Use my_global.h first
      sql/uniques.cc:
        Use my_global.h first
      sql/unireg.cc:
        Use my_global.h first
      sql/unireg.h:
        Removed inclusion of my_global.h
      storage/archive/ha_archive.cc:
        Added comment
      storage/blackhole/ha_blackhole.cc:
        Use my_global.h first
      storage/csv/ha_tina.cc:
        Use my_global.h first
      storage/csv/transparent_file.cc:
        Use my_global.h first
      storage/federated/ha_federated.cc:
        Use my_global.h first
      storage/federatedx/federatedx_io.cc:
        Use my_global.h first
      storage/federatedx/federatedx_io_mysql.cc:
        Use my_global.h first
      storage/federatedx/federatedx_io_null.cc:
        Use my_global.h first
      storage/federatedx/federatedx_txn.cc:
        Use my_global.h first
      storage/heap/ha_heap.cc:
        Use my_global.h first
      storage/innobase/handler/handler0alter.cc:
        Use my_global.h first
      storage/maria/ha_maria.cc:
        Use my_global.h first
      storage/maria/unittest/ma_maria_log_cleanup.c:
        Remove duplicated include files
      storage/maria/unittest/test_file.c:
        Added comment
      storage/myisam/ha_myisam.cc:
        Move sql_plugin.h first as this includes my_global.h
      storage/myisammrg/ha_myisammrg.cc:
        Use my_global.h first
      storage/oqgraph/oqgraph_thunk.cc:
        Use my_config.h and my_global.h first
        One could not include my_global.h before oqgraph_thunk.h (don't know why)
      storage/spider/ha_spider.cc:
        Use my_global.h first
      storage/spider/hs_client/config.cpp:
        Use my_global.h first
      storage/spider/hs_client/escape.cpp:
        Use my_global.h first
      storage/spider/hs_client/fatal.cpp:
        Use my_global.h first
      storage/spider/hs_client/hstcpcli.cpp:
        Use my_global.h first
      storage/spider/hs_client/socket.cpp:
        Use my_global.h first
      storage/spider/hs_client/string_util.cpp:
        Use my_global.h first
      storage/spider/spd_conn.cc:
        Use my_global.h first
      storage/spider/spd_copy_tables.cc:
        Use my_global.h first
      storage/spider/spd_db_conn.cc:
        Use my_global.h first
      storage/spider/spd_db_handlersocket.cc:
        Use my_global.h first
      storage/spider/spd_db_mysql.cc:
        Use my_global.h first
      storage/spider/spd_db_oracle.cc:
        Use my_global.h first
      storage/spider/spd_direct_sql.cc:
        Use my_global.h first
      storage/spider/spd_i_s.cc:
        Use my_global.h first
      storage/spider/spd_malloc.cc:
        Use my_global.h first
      storage/spider/spd_param.cc:
        Use my_global.h first
      storage/spider/spd_ping_table.cc:
        Use my_global.h first
      storage/spider/spd_sys_table.cc:
        Use my_global.h first
      storage/spider/spd_table.cc:
        Use my_global.h first
      storage/spider/spd_trx.cc:
        Use my_global.h first
      storage/xtradb/handler/handler0alter.cc:
        Use my_global.h first
      storage/xtradb/handler/i_s.cc:
        Use my_global.h first
      70823e1d
  17. 26 Aug, 2014 2 commits
  18. 21 Aug, 2014 1 commit
  19. 12 Aug, 2014 1 commit
  20. 06 Aug, 2014 1 commit
  21. 03 Jun, 2014 1 commit
    • unknown's avatar
      MDEV-5262, MDEV-5914, MDEV-5941, MDEV-6020: Deadlocks during parallel · 629b8229
      unknown authored
      replication causing replication to fail.
      
      In parallel replication, we run transactions from the master in parallel, but
      force them to commit in the same order they did on the master. If we force T1
      to commit before T2, but T2 holds eg. a row lock that is needed by T1, we get
      a deadlock when T2 waits until T1 has committed.
      
      Usually, we do not run T1 and T2 in parallel if there is a chance that they
      can have conflicting locks like this, but there are certain edge cases where
      it can occasionally happen (eg. MDEV-5914, MDEV-5941, MDEV-6020). The bug was
      that this would cause replication to hang, eventually getting a lock timeout
      and causing the slave to stop with error.
      
      With this patch, InnoDB will report back to the upper layer whenever a
      transactions T1 is about to do a lock wait on T2. If T1 and T2 are parallel
      replication transactions, and T2 needs to commit later than T1, we can thus
      detect the deadlock; we then kill T2, setting a flag that causes it to catch
      the kill and convert it to a deadlock error; this error will then cause T2 to
      roll back and release its locks (so that T1 can commit), and later T2 will be
      re-tried and eventually also committed.
      
      The kill happens asynchroneously in a slave background thread; this is
      necessary, as the reporting from InnoDB about lock waits happen deep inside
      the locking code, at a point where it is not possible to directly call
      THD::awake() due to mutexes held.
      
      Deadlock is assumed to be (very) rarely occuring, so this patch tries to
      minimise the performance impact on the normal case where no deadlocks occur,
      rather than optimise the handling of the occasional deadlock.
      
      Also fix transaction retry due to deadlock when it happens after a transaction
      already signalled to later transactions that it started to commit. In this
      case we need to undo this signalling (and later redo it when we commit again
      during retry), so following transactions will not start too early.
      
      Also add a missing thd->send_kill_message() that got triggered during testing
      (this corrects an incorrect fix for MySQL Bug#58933).
      629b8229
  22. 07 May, 2014 1 commit
  23. 27 Mar, 2014 1 commit
  24. 03 May, 2014 1 commit
    • Michael Widenius's avatar
      Added new states to be able to better diagnose where server hangs. · a10a9448
      Michael Widenius authored
      - Table locks now ends with state "After table lock"
      - Open table now ends with state "After opening tables"
      - All calls to close_thread_tables(), not only from mysql_execute_command(), has state "closing tables"
      - Added state "executing" for mysql admin commands, like CACHE INDEX, REPAIR TABLE etc.
      - Added state "Finding key cache" for CACHE INDEX
      - Added state "Filling schema table" when we generate temporary table for SHOW commands and information schema.
      
      Other things:
      Add limit from innobase for thread_sleep_delay. This fixed a failing tests case.
      Added db.opt to support-files to make 'make package' work
      
      
      mysql-test/suite/funcs_1/datadict/processlist_val.inc:
        Use new state
      mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result:
        Updated test result because of new state
      mysql-test/suite/funcs_1/r/processlist_val_no_prot.result:
        Updated test result because of new state
      sql/CMakeLists.txt:
        Have option files in support-files
      sql/lock.cc:
        Added new state 'After table lock'
      sql/sql_admin.cc:
        Added state "executing" and "Sending data" for mysql admin commands, like CACHE INDEX, REPAIR TABLE etc.
        Added state "Finding key cache"
      sql/sql_base.cc:
        open tables now ends with state "After table lock", instead of NULL
      sql/sql_parse.cc:
        Moved state "closing tables" to close_thread_tables()
      sql/sql_show.cc:
        Added state "Filling schema table" when we generate temporary table for SHOW commands and information schema.
      storage/xtradb/buf/buf0buf.c:
        Removed compiler warning
      storage/xtradb/handler/ha_innodb.cc:
        Add limit from innobase for thread_sleep_delay. This fixed a failing tests case.
      support-files/db.opt:
        cmakes needs this to create data/test directory
      a10a9448
  25. 19 Feb, 2014 1 commit
    • Sergey Vojtovich's avatar
      MDEV-5314 - Compiling fails on OSX using clang · d12c7adf
      Sergey Vojtovich authored
      This is port of fix for MySQL BUG#17647863.
      
      revno: 5572
      revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj
      committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
      timestamp: Thu 2013-10-31 00:22:43 +0100
      message:
        Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM
      
        Rename test() macro to MY_TEST() to avoid conflict with libc++.
      d12c7adf
  26. 22 Jan, 2014 1 commit
    • Michael Widenius's avatar
      Fix for MDEV-5547: Bad error message when moving very old .frm files to MariaDB 5.5. · 04bee0af
      Michael Widenius authored
      mysql_upgrade --help now also prints out --default options and variable values.
      mysql_upgrade now prints permission errors.
      mysql_upgrade doesn't print some non essential info if --silent is used.
      Added handler error message about incompatible versions
      Fixed that mysqlbug and mysql_install_db have the executable flag set.
      Removed executable flag for some non executable files.
      Changed in mysql_install_db askmonty.org to mariadb.com.
      Ensured that all client executables prints --default options the same way.
      Allow REPAIR ... USE_FRM for old .frm files if the are still compatible.
      Extended shown error for storage engine messages.
      
      
      client/mysql.cc:
        print_defaults() should be first (as in all other programs)
      client/mysql_upgrade.c:
        --help now also prints out --default options and variable values
        Print out error if wrong permissions
        Don't print info if --silent
      client/mysqladmin.cc:
        print_defaults() should be first (as in all other programs)
      client/mysqlbinlog.cc:
        Added print_defaults() to --help
      client/mysqlcheck.c:
        Added empty line in --help
      client/mysqlimport.c:
        Added empty line in --help
      client/mysqlshow.c:
        Made --help compatible
      client/mysqlslap.c:
        Made --help compatible
      client/mysqltest.cc:
        Added print_defaults() to --help
      include/handler_ername.h:
        Added handler error message
      include/my_base.h:
        Added handler error message
      mysql-test/r/mysql_upgrade.result:
        Updated results
      mysql-test/r/repair.result:
        Added test case for better error messages
      mysql-test/std_data/host_old.MYD:
        Added test case for better error messages
      mysql-test/std_data/host_old.MYI:
        Added test case for better error messages
      mysql-test/std_data/host_old.frm:
        Added test case for better error messages
      mysql-test/t/repair.test:
        Added test case for better error messages
      mysys/my_handler_errors.h:
        Added handler error message
      scripts/CMakeLists.txt:
        Fixed that mysqlbug and mysql_install_db have the executable flag set
      scripts/mysql_install_db.sh:
        askmonty.org -> mariadb.com
      sql/ha_partition.cc:
        Sometimes table_type() can be called for errors even if partition didn't manage to open any files
      sql/handler.cc:
        Write clear text for not handled, but defined error messages.
      sql/share/errmsg-utf8.txt:
        Extended shown error for storage engine messages
      sql/sql_admin.cc:
        Allow REPAIR ... USE_FRM for old .frm files if the are still compatible
      storage/myisam/ha_myisam.cc:
        Use new error message
      04bee0af
  27. 25 Sep, 2013 1 commit
  28. 20 Aug, 2013 2 commits
    • Dmitry Lenev's avatar
      Fix for bug#14188793 - "DEADLOCK CAUSED BY ALTER TABLE DOEN'T CLEAR · fc2c6692
      Dmitry Lenev authored
      STATUS OF ROLLBACKED TRANSACTION" and bug #17054007 - "TRANSACTION
      IS NOT FULLY ROLLED BACK IN CASE OF INNODB DEADLOCK".
      
      The problem in the first bug report was that although deadlock involving
      metadata locks was reported using the same error code and message as InnoDB
      deadlock it didn't rollback transaction like the latter. This caused
      confusion to users as in some cases after ER_LOCK_DEADLOCK transaction
      could have been restarted immediately and in some cases rollback was
      required.
      
      The problem in the second bug report was that although InnoDB deadlock
      caused transaction rollback in all storage engines it didn't cause release
      of metadata locks. So concurrent DDL on the tables used in transaction was
      blocked until implicit or explicit COMMIT or ROLLBACK was issued in the
      connection which got InnoDB deadlock.
      
      The former issue has stemmed from the fact that when support for detection
      and reporting metadata locks deadlocks was added we erroneously assumed
      that InnoDB doesn't rollback transaction on deadlock but only last statement
      (while this is what happens on InnoDB lock timeout actually) and so didn't
      implement rollback of transactions on MDL deadlocks.
      
      The latter issue was caused by the fact that rollback of transaction due
      to deadlock is carried out by setting THD::transaction_rollback_request
      flag at the point where deadlock is detected and performing rollback
      inside of trans_rollback_stmt() call when this flag is set. And
      trans_rollback_stmt() is not aware of MDL locks, so no MDL locks are
      released.
      
      This patch solves these two problems in the following way:
      
      - In case when MDL deadlock is detect transaction rollback is requested
        by setting THD::transaction_rollback_request flag.
      
      - Code performing rollback of transaction if THD::transaction_rollback_request
        is moved out from trans_rollback_stmt(). Now we handle rollback request
        on the same level as we call trans_rollback_stmt() and release statement/
        transaction MDL locks.
      fc2c6692
    • Dmitry Lenev's avatar
      Fix for bug#14188793 - "DEADLOCK CAUSED BY ALTER TABLE DOEN'T CLEAR · b07ec61f
      Dmitry Lenev authored
      STATUS OF ROLLBACKED TRANSACTION" and bug #17054007 - "TRANSACTION
      IS NOT FULLY ROLLED BACK IN CASE OF INNODB DEADLOCK".
      
      The problem in the first bug report was that although deadlock involving
      metadata locks was reported using the same error code and message as InnoDB
      deadlock it didn't rollback transaction like the latter. This caused
      confusion to users as in some cases after ER_LOCK_DEADLOCK transaction
      could have been restarted immediately and in some cases rollback was
      required.
      
      The problem in the second bug report was that although InnoDB deadlock
      caused transaction rollback in all storage engines it didn't cause release
      of metadata locks. So concurrent DDL on the tables used in transaction was
      blocked until implicit or explicit COMMIT or ROLLBACK was issued in the
      connection which got InnoDB deadlock.
      
      The former issue has stemmed from the fact that when support for detection
      and reporting metadata locks deadlocks was added we erroneously assumed
      that InnoDB doesn't rollback transaction on deadlock but only last statement
      (while this is what happens on InnoDB lock timeout actually) and so didn't
      implement rollback of transactions on MDL deadlocks.
      
      The latter issue was caused by the fact that rollback of transaction due
      to deadlock is carried out by setting THD::transaction_rollback_request
      flag at the point where deadlock is detected and performing rollback
      inside of trans_rollback_stmt() call when this flag is set. And
      trans_rollback_stmt() is not aware of MDL locks, so no MDL locks are
      released.
      
      This patch solves these two problems in the following way:
      
      - In case when MDL deadlock is detect transaction rollback is requested
        by setting THD::transaction_rollback_request flag.
      
      - Code performing rollback of transaction if THD::transaction_rollback_request
        is moved out from trans_rollback_stmt(). Now we handle rollback request
        on the same level as we call trans_rollback_stmt() and release statement/
        transaction MDL locks.
      b07ec61f
  29. 14 Aug, 2013 1 commit
    • Sergey Vojtovich's avatar
      MDEV-4702 - Reduce usage of LOCK_open · b7f9c894
      Sergey Vojtovich authored
      Following variables do not require LOCK_open protection anymore:
      - table_def_cache (renamed to tdc_hash) is protected by rw-lock
        LOCK_tdc_hash;
      - table_def_shutdown_in_progress doesn't need LOCK_open protection;
      - last_table_id use atomics;
      - TABLE_SHARE::ref_count (renamed to TABLE_SHARE::tdc.ref_count)
        is protected by TABLE_SHARE::tdc.LOCK_table_share;
      - TABLE_SHARE::next, ::prev (renamed to tdc.next and tdc.prev),
        oldest_unused_share, end_of_unused_share are protected by
        LOCK_unused_shares;
      - TABLE_SHARE::m_flush_tickets (renamed to tdc.m_flush_tickets)
        is protected by TABLE_SHARE::tdc.LOCK_table_share;
      - refresh_version (renamed to tdc_version) use atomics.
      b7f9c894
  30. 12 Aug, 2013 2 commits
  31. 13 Jul, 2013 1 commit
  32. 09 Jul, 2013 1 commit
    • Sergey Petrunya's avatar
      Fix merge.test failure · 56a6e71f
      Sergey Petrunya authored
      - Problem: mysql_admin_table() calls open_temporary_tables(). This 
        causes assertion failure, because mysql_execute_command() has 
        already called open_temporary_tables()
      - Solution: call close_thread_tables() at the start of 
        mysql_admin_table(), like mysql-5.6 does 
      56a6e71f
  33. 27 Jun, 2013 2 commits
    • Michael Widenius's avatar
      Fixed some wrong format strings. · ecf9b1b7
      Michael Widenius authored
      Fixed OPTIMIZE with innodb
      
      
      include/my_sys.h:
        Removed ATTRIBUTE_FORMAT() as it gave warnings for %'s
      sql/log_event.cc:
        Optimization: 
        use my_b_write() and my_b_write_byte() instead of my_b_printf()
        use strmake() instead of my_snprintf()
      sql/sql_admin.cc:
        Fixed bug in admin_recreate_table()
        Fixed OPTIMIZE with innodb
      sql/sql_table.cc:
        Indentation fixes
      strings/my_vsnprintf.c:
        Changed fprintf() to fputs()
      ecf9b1b7
    • unknown's avatar
      merge of 2876.430.11 & 2876.430.1 · 70092601
      unknown authored
      CF_PREOPEN_TMP_TABLES & CF_HA_CLOSE & Patch for Bug#11746602 (27480: Extend CREATE TEMPORARY TABLES 
        privilege to allow temp table operations).
      70092601
  34. 17 Jun, 2013 1 commit
    • Michael Widenius's avatar
      Fixed some merge issues: · 2534521f
      Michael Widenius authored
      - temporary tables now works
      - mysql-system_tables updated to not use temporary tables
      - PASSWORD() function fixed
      - Support for STATS_AUTO_RECALC, STATS_PERSISTENT and STATS_SAMPLE_PAGES table options
      2534521f