An error occurred fetching the project authors.
  1. 13 Mar, 2012 1 commit
  2. 02 Dec, 2011 1 commit
    • Vladislav Vaintroub's avatar
      Fixed crashes found by application verifier: · c4f5908a
      Vladislav Vaintroub authored
      - leaking mutex in lf_hash_destroy
      - pthread_getspecific() before pthread_key_create() in my_thread_var_dbug()
      (called by static C++ object constructors called in sys_vars)
      - perfschema destroys mutexes that were  not created.
      c4f5908a
  3. 27 Nov, 2011 1 commit
    • Sergei Golubchik's avatar
      compilation fixes · dfc1901e
      Sergei Golubchik authored
      cmake/maintainer.cmake:
        don't do -Werror just yet
      config.h.cmake:
        according to MSDN PSAPI_VERSION should be 1 in a portable application
      mysys/my_thr_init.c:
        first, reset THR_KEY_mysys, and then free dbug data,
        because dbug data are automacially created on the next dbug call,
        unless THR_KEY_mysys is null.
      dfc1901e
  4. 10 Jul, 2011 2 commits
    • Sergei Golubchik's avatar
      fix memory leaks and other problems found by safemalloc · 49501b4c
      Sergei Golubchik authored
      client/mysql_upgrade.c:
        missing DBUG_RETURN
      client/mysqladmin.cc:
        client plugin memory wasn't freed
      client/mysqlcheck.c:
        client plugin memory, defaults, a result set, a command-line option value were not freed.
        missing DBUG_RETURN.
      client/mysqldump.c:
        client plugin memory wasn't freed
      client/mysqlslap.c:
        client plugin memory wasn't freed
      client/mysqltest.cc:
        hopeless. cannot be fixed.
      mysql-test/valgrind.supp:
        Bug#56666 is now fixed.
      mysys/array.c:
        really, don't allocate if the caller didn't ask to.
      mysys/my_init.c:
        safemalloc checks must be done at the very end
      mysys/my_thr_init.c:
        not needed anymore
      sql-common/client.c:
        memory leak
      sql/log.cc:
        log_file was not closed, memory leak.
      sql/mysqld.cc:
        fix bug#56666 (causing many P_S related memory leaks).
        close_active_mi() not called for --bootstrap, memory leak.
      sql/sql_lex.cc:
        redo Lex->mi handling
      sql/sql_lex.h:
        redo Lex->mi handling
      sql/sql_plugin.cc:
        plugins having PLUGIN_VAR_MEMALLOC string variables have this variables allocated in every THD.
        The memory was freed in ~THD but only if plugin was still active. If plugin was unloaded the
        variable was not found and the memory was lost. By loading and unloading plugins an arbitrary
        amount of memory can be lost.
      sql/sql_repl.cc:
        redo Lex->mi handling
      sql/sql_yacc.yy:
        completely wrong handling of Lex->mi - run-time memory leak, by repeating the statement
        arbitrary amount of memory can be lost.
        
        Lex->mi.repl_ignore_server_ids_opt was allocated when parsing CHANGE MASTER,
        and freed after executing the statement. if parser failed on syntax (or another)
        error the statement was never executed. Lex->mi was simply bzero-ed for the next
        CHANGE MASTER  statement.
      sql/table.cc:
        didn't compile
      storage/perfschema/pfs_lock.h:
        Bug#56666 is fixed
      49501b4c
    • Sergei Golubchik's avatar
      small dbug cleanup · 02b82326
      Sergei Golubchik authored
      02b82326
  5. 30 Jun, 2011 1 commit
  6. 25 Apr, 2011 1 commit
  7. 13 Apr, 2011 1 commit
  8. 01 Mar, 2011 2 commits
    • Magne Mahre's avatar
      Post-push cleanup, for Bug#11763065 et al. · a4481d32
      Magne Mahre authored
      a4481d32
    • Magne Mahre's avatar
      Bug#11765237 - 58179: CANNOT START MYSQLD WITH APP VERIFIER · c4715a80
      Magne Mahre authored
      Bug#11763065 - 55730: KILL_SERVER() CALLS SETEVENT ON A NULL 
                     HANDLE, SMEM_EVENT_CONNECT_REQUEST
            
      Application Verifier is a Microsoft tool used for
      detecting certain classes of programming errors.
      In particular, MS Windows OS resource usage is
      monitored for wrong usage (handles, thread local
      storage, critical sections, ...)
            
      In MySQL 5.5.x, an error was introduced where an
      object on thread local storage was used before the
      TLS and the object was created.
            
      The fix has been to move the mysys initialization
      to an earlier stage in the boot process when built for
      Windows.  For non-win builds, the init already happens
      early.
      
      Some un-tangling of calls to my_init(), my_basic_init()
      and my_thread_global_init() was done.  There is no
      longer a need to do init in steps, so the full my_init()
      is called instead of my_init_basic().
            
      In addition,  Bug#11763065 was fixed.  The event handle
      'smem_event_connect_request' is only created if
      'opt_enable_shared_memory' is set.  When killing the
      server, an event was flagged on the handle
      unconditionally.  Added a test, so it will only be
      flagged if created.
      
      
      include/my_pthread.h:
        my_thread_basic_global_init is no longer
        necessary, and the my_thread_basic_global_reinit 
        function is renamed to reflect that it now
        reinits mutexes and condvars originating from
        my_thread_global_init
      mysys/my_thr_init.c:
        Reorganized code.
      c4715a80
  9. 12 Jan, 2011 1 commit
    • Davi Arnaut's avatar
      Bug#42054: SELECT CURDATE() is returning bad value · eb589393
      Davi Arnaut authored
      The problem from a user point of view was that on Solaris the
      time related functions (e.g. NOW(), SYSDATE(), etc) would always
      return a fixed time.
      
      This bug was happening due to a logic in the time retrieving
      wrapper function which would only call the time() function every
      half second. This interval between calls would be calculated
      using the gethrtime() and the logic relied on the fact that time
      returned by it is monotonic.
      
      Unfortunately, due to bugs in the gethrtime() implementation,
      there are some cases where the time returned by it can drift
      (See Solaris bug id 6600939), potentially causing the interval
      calculation logic to fail.
      
      Since newer versions of Solaris (10+) have alleviated the
      performance degradation associated with time(2), the solution is
      to simply directly rely on time() at each invocation.
      
      This simplification has an upside that it allows us to eliminate
      a lock which was used to control access to the variables used
      to track the half second interval, thus improving the overall
      scalability of timekeeping related functions (e.g. NOW()).
      
      Benchmarks runs have shown no significant degradation associated
      with this change. With this, there are actually improvements in
      performance for cases involving many connections.
      
      In summary, the changes introduced by this patch are:
      
      a) my_time() and my_micro_time_and_time() no longer use gethrtime().
         Instead, time() and gettimeofdate() are used correspondingly.
      
      b) my_micro_time() is changed to not use gethrtime() so as to
         have the same time source as my_micro_time_and_time().
         There shouldn't be any performance impact from this change
         since this function is used only a few times during statement
         execution and, on Solaris, gettimeofday() shows acceptable
         performance.
      
      mysys/my_getsystime.c:
        Use time() even if gethrtime() is available. Remove logic which
        relied on gethrtime() to only call time() every half second.
        Since gethrtime() is not used anymore, also remove it from
        my_micro_time() to keep a common time source.
        
        Also, function comments are cleaned up (fixed typos and wrong
        information) and converted to doxygen.
      mysys/my_thr_init.c:
        Remove mutex which is no longer used.
      mysys/mysys_priv.h:
        Remove mutex which is no longer used.
      eb589393
  10. 11 Jan, 2011 1 commit
    • Magne Mahre's avatar
      Remove configuration preprocessor symbols 'THREAD' · 8ede0759
      Magne Mahre authored
      and 'THREAD_SAFE_CLIENT'.
        
      As of MySQL 5.5, we no longer support non-threaded
      builds.   This patch removes all references to the
      obsolete THREAD and THREAD_SAFE_CLIENT preprocessor
      symbols.  These were used to distinguish between
      threaded and non-threaded builds.
      8ede0759
  11. 23 Aug, 2010 1 commit
  12. 29 Jan, 2010 1 commit
    • Michael Widenius's avatar
      Patch set contributed by Alex Budovski (MCA) · e9bce6c9
      Michael Widenius authored
      Fix for Bug#31173: mysqlslap.exe crashes if called without any parameters
      
      .bzrignore:
        Fixed .bzrignore rules. Many were simply not ignoring what they were meant to.
      client/mysqlslap.c:
        Fixed bug for Bug#31173: mysqlslap.exe crashes if called without any parameters
        The original patch could cause memory leaks and odd problems depending on how connection was made.
        This code ensures that all mysql_options() are set for each mysql_real_connect().
        (This patch by Monty)
      mysys/my_thr_init.c:
        Fixed multiply-initialized critical section on Windows, due to code incorrectly
        checking the wrong field in an attempt to prevent multiple-initialization.
      sql-common/client.c:
        Don't use shared memory if it's not set (for example after failed mysql_real_connect).
        Ensure that mysql_close() resets all resources so that it's safe to call it twice.
        (Patch by monty, related to Bug#31173: mysqlslap.exe crashes if called without any parameters)
      sql/CMakeLists.txt:
         Added page fault counters for SHOW PROFILE on Windows.
      sql/mysqld.cc:
        Fixed attempt to set a NULL event. The code now only sets the event if appropriate (i.e. shared memory is being used)
      sql/sql_profile.cc:
        Added page fault counters for SHOW PROFILE on Windows.
      sql/sql_profile.h:
        Added page fault counters for SHOW PROFILE on Windows.
      sql/udf_example.def:
        Some cleanup functions were not exported from udf_example.dll, causing them to
        never be executed, and as a result multiple-initialization of kernel objects
        occurred and resources were not being freed correctly.
      storage/maria/ma_close.c:
        Condition variable share->key_del_cond was never being destroyed, while its
        containing heap block was being freed in maria_close(), leaking kernel
        resources.
      e9bce6c9
  13. 20 Jan, 2010 1 commit
  14. 16 Jan, 2010 1 commit
    • Vladislav Vaintroub's avatar
      Bug#50362: · 50895913
      Vladislav Vaintroub authored
      Init MY_PTHREAD_MUTEX_FAST prior to first usage to avoid crash on
      FreeBSD
      50895913
  15. 07 Jan, 2010 1 commit
  16. 17 Dec, 2009 1 commit
    • Satya B's avatar
      Fix for Bug#37408 - Compressed MyISAM files should not require/use mmap() · cf9966f8
      Satya B authored
                        
      When compressed myisam files are opened, they are always memory mapped
      sometimes causing memory swapping problems.
      
      When we mmap the myisam compressed tables of size greater than the memory 
      available, the kswapd0 process utilization is very high consuming 30-40% of 
      the cpu. This happens only with linux kernels older than 2.6.9
      
      With newer linux kernels, we don't have this problem of high cpu consumption
      and this option may not be required.
       
      The option 'myisam_mmap_size' is added to limit the amount of memory used for
      memory mapping of myisam files. This option is not dynamic.
      
      The default value on 32 bit system is 4294967295 bytes and on 64 bit system it
      is 18446744073709547520 bytes.
      
      Note: Testcase only tests the option variable. The actual bug has be to 
      tested manually.
      
      include/my_global.h:
        Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap()
        
        define SIZE_T_MAX
      include/myisam.h:
        Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap()
        
        declare 'myisam_mmap_size' and 'myisam_mmap_used' variables and the mutex
        THR_LOCK_myisam_mmap
      myisam/mi_packrec.c:
        Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap()
        
        add 'myisam_mmap_size' option which limits the memory available to mmap of 
        myisam files
      myisam/mi_static.c:
        Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap()
        
        declare 'myisam_mmap_size' and 'myisam_mmap_used' variables and the mutex
        THR_LOCK_myisam_mmap
      myisam/myisamdef.h:
        Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap()
        
        move MEMMAP_EXTRA_MARGIN to myisam.h so that it can be used in mysqld.cc
      mysql-test/r/variables.result:
        Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap()
        
        Testcase for BUG#37408 to test the myisam_mmap_size option
      mysql-test/t/variables.test:
        Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap()
        
        Testcase for BUG#37408 to test the myisam_mmap_size option
      mysys/my_thr_init.c:
        Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap()
        
        intialize the lock THR_LOCK_myisam_mmap
      sql/mysqld.cc:
        Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap()
        
        add the 'myisam_mmap_size' option
      sql/set_var.cc:
        Fix for Bug #37408 - Compressed MyISAM files should not require/use mmap()
        
        add the 'myisam_mmap_size' to the SHOW VARIABLES list
      cf9966f8
  17. 10 Dec, 2009 1 commit
  18. 18 Nov, 2009 1 commit
  19. 30 Oct, 2009 1 commit
  20. 30 Sep, 2009 3 commits
    • Vladislav Vaintroub's avatar
      backport of · 4acaca02
      Vladislav Vaintroub authored
      Revision: 
      2597.72.1 revid:sp1r-Reggie@core.-20080403153947-15243
      removed instances of __NT__ from code. We now only build "NT" binaries
      4acaca02
    • Vladislav Vaintroub's avatar
      Backport of this changeset · 14c2cfb5
      Vladislav Vaintroub authored
      http://lists.mysql.com/commits/59686
      
      Cleanup pthread_self(), pthread_create(), pthread_join() implementation on Windows.
      Prior implementation is was unnecessarily complicated and even differs in embedded
      and non-embedded case.
            
      Improvements in this patch:
      * pthread_t is now the unique thread ID, instead of HANDLE returned by beginthread
            
      This simplifies pthread_self() to be just straight GetCurrentThreadId().
      prior it was much  art involved in passing the beginthread() handle from the caller
      to the TLS structure in the child thread ( did not work for the main thread of
      course)
            
      * remove MySQL specific my_thread_init()/my_thread_end() from pthread_create.
      No automagic is done on Unix on pthread_create(). Having the same on Windows will 
      improve portability and avoid extra #ifdef's
            
      * remove redefinition of getpid() - it was defined as GetCurrentThreadId()
      14c2cfb5
    • Vladislav Vaintroub's avatar
      Windows improvements : manual backport of · 2bc1930c
      Vladislav Vaintroub authored
      htttp://lists.mysql.com/commits/50957?f=plain
            
      Always use TLS functions instead of __declspec(thread) to access 
      thread local storage variables.
      The change removes the necessity to recomplile the same source
      files twice -  with USE_TLS for DLLs and without USE_TLS for EXEs.
      Real benefit of this change is better readability and maintainability
      of TLS functions within MySQL.
                    
      There is a performance loss using TlsXXX functions compared to __declspec 
      but the difference is negligible in practice. In a sysbench-like benchmark 
      I ran with with TlsGetValue, pthread_[get|set]_specific was called 600000000 
      times and took 0.17sec of total 35min CPU time, or 0.008%.
      2bc1930c
  21. 24 Sep, 2009 1 commit
    • Magnus Blåudd's avatar
      Bug#42850 race condition in my_thr_init.c · 9eab1cdb
      Magnus Blåudd authored
       - Create the "dummy" thread joinable and wait for it to
         exit before continuing in 'my_thread_global_init'
       - This way we know that the pthread library is initialized
         by one thread only
      9eab1cdb
  22. 12 Feb, 2009 1 commit
    • Guilhem Bichot's avatar
      Fixing problems of previous 5.1-main->5.1-maria merge: · b90ff534
      Guilhem Bichot authored
      - adding back Serg's "mtr --list-options"
      - safe_mutex deadlock detector started raising wrong deadlock warnings, fixed
      here by a backport from 6.0-main.
      
      include/my_pthread.h:
        Porting changes done to 6.0-main which satisfy the safe_mutex deadlock detector (those
        in 5.1-main don't), see chad@mysql.com-20090126155607-n0j3zbmgbfepnmmo for explanations
      mysql-test/mysql-test-run.pl:
        adding back Serg's --list-options
      mysys/my_init.c:
        Porting changes done to 6.0-main which satisfy the safe_mutex deadlock detector (those
        in 5.1-main don't), see chad@mysql.com-20090126155607-n0j3zbmgbfepnmmo for explanations
      mysys/my_thr_init.c:
        Porting changes done to 6.0-main which satisfy the safe_mutex deadlock detector (those
        in 5.1-main don't), see chad@mysql.com-20090126155607-n0j3zbmgbfepnmmo for explanations
      b90ff534
  23. 15 Jan, 2009 1 commit
    • Sergei Golubchik's avatar
      post-review fixes · 9c96fde1
      Sergei Golubchik authored
      include/atomic/generic-msvc.h:
        prevent possible compiler warnings
      include/lf.h:
        comments, better definition for LF_HASH_OVERHEAD
      include/maria.h:
        define MARIA_CANNOT_ROLLBACK here
      include/my_pthread.h:
        avoid possible name clash
      include/waiting_threads.h:
        comments, const, move WT_RESOURCE to waiting_threads.c
      mysql-test/suite/maria/r/maria_notembedded.result:
        new test
      mysql-test/suite/maria/t/maria_notembedded.test:
        new test - 5-way deadlock
      mysys/lf_hash.c:
        better definition for LF_HASH_OVERHEAD
      mysys/my_static.c:
        comment
      mysys/my_thr_init.c:
        casts
      mysys/waiting_threads.c:
        comments, asserts, etc
      server-tools/instance-manager/parse.cc:
        fix my_init_dynamic_array() to follow new calling conventions
      sql/mysqld.cc:
        call wt_init after set_proper_floating_point_mode
      sql/sql_class.h:
        comment
      storage/maria/ha_maria.cc:
        move MARIA_CANNOT_ROLLBACK to a common header
      storage/maria/ma_commit.c:
        comment
      storage/maria/ma_write.c:
        comments, check for HA_ERR_FOUND_DUPP_KEY
      storage/maria/trnman.c:
        comments, assert
      storage/maria/trnman.h:
        comments
      storage/maria/unittest/trnman-t.c:
        be paranoid
      unittest/mysys/lf-t.c:
        comments
      unittest/mysys/waiting_threads-t.c:
        comments, safety, memory leak
      9c96fde1
  24. 04 Dec, 2008 1 commit
    • Vladislav Vaintroub's avatar
      Bug#38522: 5 seconds delay when closing application using embedded server · 8f500c52
      Vladislav Vaintroub authored
                        
      The problem here is that embedded server starts handle_thread manager 
      thread  on mysql_library_init() does not stop it on mysql_library_end().
      At shutdown, my_thread_global_end() waits for thread count to become 0,
      but since we did not stop the thread it will give up after 5 seconds.
                   
      Solution is to move shutdown for handle_manager thread from kill_server()
      (mysqld specific) to clean_up() that is used by both embedded and mysqld.
                  
      This patch also contains some refactorings - to avoid duplicate code,
      start_handle_manager() and stop_handle_manager() functions are introduced.
      Unused variables are eliminated. handle_manager does not rely on global
      variable abort_loop anymore to stop (abort_loop is not set for embedded).
                  
      Note: Specifically on Windows and when using DBUG version of libmysqld, 
      the complete solution requires removing obsolete code my_thread_init() 
      from my_thread_var(). This has a side effect that a DBUG statement 
      after my_thread_end() can cause thread counter to be incremented, and 
      embedded will hang for some seconds. Or worse, my_thread_init() will 
      crash if critical sections have been deleted by the global cleanup 
      routine that runs in a different thread. 
      
      This patch also fixes and revert prior changes for Bug#38293 
      "Libmysqld crash in mysql_library_init if language file missing".
      
      Root cause of the crash observed in Bug#38293  was bug in my_thread_init() 
      described above
      
      
      
      
      client/mysql.cc:
        sql_protocol_typelib is not exported from libmysqld
        (does not make sense either)
        thus excluded from embedded client
      dbug/dbug.c:
        revert changes for Bug#38293
      include/my_dbug.h:
        revert changes for Bug#38293
      libmysql/libmysql.c:
        Removed DBUG_POP call, because when called after my_end(), will access
        THR_key_mysys that is already deleted. The result of pthread_get_specific
        is not predictable in this case and hence DBUG_POP can crash.
      libmysqld/examples/CMakeLists.txt:
        Revert changes for Bug#38293.
      libmysqld/lib_sql.cc:
        code to start handle manager is factored out into 
        start_handle_manager() function
      libmysqld/libmysqld.def:
        Revert changes for Bug #38293
        Remove excessive exports from libmysqld, export what API documents.
      mysys/my_thr_init.c:
        Remove windows-DLL-specific workaround for something (old code, no documentation for
        what specifically). The problem is that even after my_thread_end() is finished, 
        DBUG statement can initiate my_thread_init(). This does not happen anywhere else and 
        should not happen on  Windows either.
      sql/mysql_priv.h:
        - new functions start_handle_manager() and stop_handle_manager()
        - move manager_thread_in_use  variable to sql_manager.cc and made
        it static
        - remove manager_status, as it is unused
      sql/mysqld.cc:
        Code to start/stop handle_manager thread is factored out into start_handle_manager()
      8f500c52
  25. 02 Dec, 2008 1 commit
    • Michael Widenius's avatar
      WL#3262 add mutex lock order checking to safemutex (also called safe_mutex_deadlock_detector) · 32f81bab
      Michael Widenius authored
      This writes a warning on stderr if one uses mutex in different order,
      like if one in one case would lock mutex in the order A,B and in another case
      would lock mutex in the order B,A
      This is inspired by and loosely based on the LOCKDEP patch by Jonas
      Wrong mutex order is either fixed or mutex are marked with MYF_NO_DEADLOCK_DETECTION
      if used inconsistently (need to be fixed by server team)
      
      KNOWN_BUGS.txt:
        Added information that one need to dump and restore Maria tables
      include/hash.h:
        Added prototype function for walking over all elements in a hash
      include/my_pthread.h:
        Added my_pthread_mutex_init() and my_pthread_mutex_lock(); These should be used if one wants to disable mutex order checking.
        Changed names of the nonposix mutex_init functions to not conflict with my_phread_mutex_init()
        Added and extended structures for mutex deadlock detection.
        New arguments to sage_mutex_init() and safe_mutex_lock() to allow one to disable mutex order checking.
        Added variable 'safe_mutex_deadlock_detector' to enable/disable deadlock detection for all pthread_mutex_init()
      mysys/Makefile.am:
        Added cleaning of test files
        Added test_thr_mutex
      mysys/hash.c:
        Added hash_iterate() to iterate over all elements in a hash
        More comments
      mysys/my_init.c:
        Added calls to destory all mutex uses by mysys()
        Added waiting for threads to end before calling TERMINATE() to list not freed memory
      mysys/my_pthread.c:
        Changed names to free my_pthread_mutex_init() for mutex-lock-order-checking
      mysys/my_sleep.c:
        Fixed too long wait if using 1000000L as argument
      mysys/my_thr_init.c:
        Mark THR_LOCK_threads and THR_LOCK_malloc to not have mutex deadlock detection.
        (We can't have it enabled for this as these are internal mutex used by the detector  
        Call my_thread_init() early as we need thread specific variables enabled for the following pthread_mutex_init()
        Move code to wait for threads to end to my_wait_for_other_threads_to_die()
        Don't destroy mutex and conditions unless all threads have died
        Added my_thread_destroy_mutex() to destroy all mutex used by the mysys thread system
        Name the thread specific mutex as "mysys_var->mutex"
        Added my_thread_var_mutex_in_use() to return pointer to mutex in use or 0 if thread variables are not initialized
      mysys/mysys_priv.h:
        Added prototypes for functions used internally with mutex-wrong-usage detection
      mysys/thr_mutex.c:
        Added runtime detection of mutex used in conflicting order
        See WL#3262 or test_thr_mutex.c for examples
        The base idea is for each mutex have two hashes:
        - mutex->locked_mutex points to all mutex used after this one
        - mutex->used_mutex points to all mutex which has this mutex in it's mutex->locked_mutex
        There is a wrong mutex order if any mutex currently locked before this mutex is in the mutex->locked_mutex hash
      sql/event_queue.cc:
        Mark mutex used inconsistently (need to be fixed by server team)
      sql/event_scheduler.cc:
        Declare the right order to take the mutex
      sql/events.cc:
        Mark mutex used inconsistently (need to be fixed by server team)
      sql/ha_ndbcluster_binlog.cc:
        Mark mutex used inconsistently (need to be fixed by server team)
      sql/log.cc:
        Mark mutex used inconsistently (need to be fixed by server team)
      sql/mysqld.cc:
        Use pthread_mutex_trylock instead of pthread_mutex_unlock() when sending kill signal to thread
        This is needed to avoid wrong mutex order as normally one takes 'current_mutex' before mysys_var->mutex.
        Added call to free sp cache.
        Add destruction of LOCK_server_started and COND_server_started.
        Added register_mutex_order() function to register in which order mutex should be taken
        (to initiailize mutex_deadlock_detector).
        Added option to turn off safe_mutex_deadlock_detector
      sql/protocol.cc:
        Fixed wrong argument to DBUG_PRINT (found by valgrind)
      sql/rpl_mi.cc:
        Mark mutex used inconsistently (need to be fixed by server team)
      sql/set_var.cc:
        Remove wrong locking of LOCK_global_system_variables when reading and setting log variables
        (would cause inconsistent mutex order).
        Update global variables outside of logger.unlock() as LOCK_global_system_variables has to be taken before logger locks
        Reviewed by gluh
      sql/sp_cache.cc:
        Added function to destroy mutex used by sp cache
      sql/sp_cache.h:
        Added function to destroy mutex used by sp cache
      sql/sql_class.cc:
        Use pthread_mutex_trylock instead of pthread_mutex_unlock() when sending kill signal to thread
        This is needed to avoid wrong mutex order as normally one takes 'current_mutex' before mysys_var->mutex.
        Register order in which LOCK_delete and mysys_var->mutex is taken
      sql/sql_insert.cc:
        Give a name for Delayed_insert::mutex
        Mark mutex used inconsistently (need to be fixed by server team)
        Move closing of tables outside of di->mutex (to avoid wrong mutex order)
      sql/sql_show.cc:
        Don't keep LOCK_global_system_variables locked over value->show_type() as this leads to wrong mutex order
      storage/innobase/handler/ha_innodb.cc:
        Disable safe_muted_deadlock_detector for innobase intern mutex (to speed up page cache initialization)
      storage/maria/ha_maria.cc:
        Added flag to ha_maria::info() to signal if we need to lock table share or not.
        This is needed to avoid locking mutex in wrong order
      storage/maria/ha_maria.h:
        Added flag to ha_maria::info() to signal if we need to lock table share or not.
      storage/maria/ma_close.c:
        Destroy key_del_lock
        Simplify freeing ftparser_param
      storage/maria/ma_key.c:
        Better comment
      storage/maria/ma_loghandler.c:
        Mark mutex used inconsistently (need to be fixed by sanja)
      storage/maria/ma_state.c:
        More comments
      storage/maria/ma_test1.c:
        Ensure that safe_mutex_deadlock_detector is always on (should be, this is just for safety)
      storage/maria/ma_test2.c:
        Ensure that safe_mutex_deadlock_detector is always on (should be, this is just for safety)
      32f81bab
  26. 29 Jul, 2008 1 commit
    • Sergei Golubchik's avatar
      WL#3064 - waiting threads - wait-for graph and deadlock detection · 6ba12f07
      Sergei Golubchik authored
      client/mysqltest.c:
        compiler warnings
      configure.in:
        remove old tests for unused programs
        disable the use of gcc built-ins if smp assembler atomics were selected explictily.
        add waiting_threads.o to THREAD_LOBJECTS
      include/lf.h:
        replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
        the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
        scheduler.
        constructor/destructor in lf-alloc
      include/my_pthread.h:
        shuffle set_timespec/set_timespec_nsec macros a bit to be able to fill
        several timeout structures with only one my_getsystime() call
      include/waiting_threads.h:
        waiting threads - wait-for graph and deadlock detection
      mysys/Makefile.am:
        add waiting_threads.c
      mysys/lf_alloc-pin.c:
        replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
        the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
        scheduler.
        constructor/destructor in lf-alloc
      mysys/lf_hash.c:
        constructor/destructor in lf-alloc
      mysys/my_thr_init.c:
        remember end-of-stack pointer in the mysys_var
      mysys/waiting_threads.c:
        waiting threads - wait-for graph and deadlock detection
      storage/maria/ha_maria.cc:
        replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
        the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
        scheduler.
      storage/maria/ma_commit.c:
        replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
        the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
        scheduler.
      storage/maria/trnman.c:
        replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
        the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
        scheduler.
      storage/maria/trnman_public.h:
        replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
        the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
        scheduler.
      storage/maria/unittest/trnman-t.c:
        replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
        the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
        scheduler.
      unittest/mysys/Makefile.am:
        add waiting_threads-t
      unittest/mysys/lf-t.c:
        factor out the common code for multi-threaded stress unit tests
        move lf tests to a separate file
      unittest/mysys/my_atomic-t.c:
        factor out the common code for multi-threaded stress unit tests
        move lf tests to a separate file
      unittest/mysys/thr_template.c:
        factor out the common code for multi-threaded stress unit tests
      unittest/mysys/waiting_threads-t.c:
        wt tests
      6ba12f07
  27. 18 Mar, 2008 1 commit
  28. 26 Feb, 2008 1 commit
    • unknown's avatar
      Bug#34424 query_cache_debug.test leads to valgrind warnings · bf9bb656
      unknown authored
      Bug#34678 @@debug variable's incremental mode
      
      The problem is that the per-thread debugging settings stack wasn't
      being deallocated before the thread termination, leaking the stack
      memory. The chosen solution is to push a new state if the current
      is set to the initial settings and pop it (free) once the thread
      finishes.
      
      
      dbug/dbug.c:
        Move dbug parser out of _db_set_ to a separate function and
        make _db_set_ push a new stack if the corrent one is set to
        the initial settings.
      dbug/user.r:
        Update DBUG_SET description.
      mysql-test/t/disabled.def:
        Re-enable test case which triggered the leak.
      mysys/my_thr_init.c:
        Pop a pushed state, nop if stack is empty.
      sql/set_var.cc:
        Handle incremental debug settings.
      mysql-test/r/variables_debug.result:
        Add new test case result for Bug#34678
      mysql-test/t/variables_debug.test:
        Add new test case for Bug#34678
      bf9bb656
  29. 07 Feb, 2008 1 commit
    • unknown's avatar
      Fixes for DBUG_ABORT() · 0954594b
      unknown authored
      BitKeeper/deleted/.del-.tree-is-private:
        Delete: .tree-is-private
      include/my_dbug.h:
        To disable the popup of abort() we use _CrtReportMode/File()
        (thanks Wlad)
      mysys/my_thr_init.c:
        Visual Studio 2005 does not allow overloading library functions.
      0954594b
  30. 06 Feb, 2008 1 commit
    • unknown's avatar
      Fixes for running maria-recovery*.test and maria-purge.test under · 7300af84
      unknown authored
      Windows.
      
      
      include/my_dbug.h:
        a DBUG expression to force a flush of the trace file then an abort of the process
      mysql-test/include/wait_until_connected_again.inc:
        mysqladmin waits for pid file to be gone only under Unix; so
        maria_empty_logs.inc cannot wait for mysqld to be gone, so
        wait_until_connected_again.inc may send its "show status" to a 
        not-yet-dead server hence the 1053 error ("server shutdown in progress")
      mysys/my_thr_init.c:
        overload abort() under Windows, to not have an annoying CRT popup
        ("ignore/abort/retry" buttons) each time a test intentionally
        crashes mysqld
      sql/handler.cc:
        use new expression
      sql/log.cc:
        use new expression
      sql/mysql_priv.h:
        use new expression
      storage/maria/ha_maria.cc:
        use new expression
      storage/maria/ma_blockrec.c:
        use new expression
      storage/maria/ma_check.c:
        use new expression
      storage/maria/ma_checkpoint.c:
        use new expression
      storage/maria/ma_control_file.c:
        Can't yet lock control file under Windows (test suite problems,
        plus concerns about stray lock preventing a fast restart after crash).
      storage/maria/ma_loghandler.c:
        A file which should be closed, otherwise translog_purge() (the caller)
        cannot delete logs.
      7300af84
  31. 16 Dec, 2007 1 commit
    • unknown's avatar
      Fixed bug in undo_key_delete; Caused crashed key files in recovery · cc589bef
      unknown authored
      Maria is now used for internal temporary tables in MySQL
      Better usage of VARCHAR and long strings in temporary tables
      Use packed fields if BLOCK_RECORD is used
      null_bytes are not anymore stored in a separate field
      New interface to remember and restore scan position
      Fixed bugs in unique handling
      Don't sync Maria temporary tables
      Lock control file while it's used to stop several processes from using it
      Changed value of MA_DONT_OVERWRITE_FILE as it collided with MY_SYNC_DIR
      Split MY_DONT_WAIT into MY_NO_WAIT and MY_SHORT_WAIT (for my_lock())
      Added MY_FORCE_LOCK
      
      
      include/my_sys.h:
        Changed value of MA_DONT_OVERWRITE_FILE as it collided with MY_SYNC_DIR
        Split MY_DONT_WAIT into MY_NO_WAIT and MY_SHORT_WAIT (for my_lock())
        Added MY_FORCE_LOCK
      include/myisam.h:
        Make MyISAM columndef compile time compatible with Maria
      mysql-test/lib/mtr_process.pl:
        Removed confusing warning (It's common that there is a lot of other files than pid files)
      mysql-test/mysql-test-run.pl:
        Added --sync-frm to speed up tests
      mysql-test/r/maria-recovery.result:
        Updated results from wrong push
      mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
        Marked test as --big
      mysys/my_lock.c:
        If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
        If MY_NO_WAIT is given, return at once if lock is occupied
        If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
      mysys/my_thr_init.c:
        Fix that we don't give name to thread before it's properly initied
      sql/handler.cc:
        Added myisam.h
      sql/handler.h:
        Changes to use Maria for internal temporary tables
        Removed not needed argument to restart_rnd_next()
        Added function remember_rnd_pos()
      sql/my_lock.c:
        If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
        If MY_NO_WAIT is given, return at once if lock is occupied
        If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
      sql/mysql_priv.h:
        Added maria_hton
      sql/sql_class.h:
        Changes to use Maria for internal temporary tables
      sql/sql_select.cc:
        Changes to use Maria for internal temporary tables
        Temporary tables didn't properly switch to dynamic row format if long strings was used
        Better usage of VARCHAR in temporary tables
        Use new interface to restart scan in duplicate removal
      sql/sql_select.h:
        Changes to use Maria for internal temporary tables
      sql/sql_show.cc:
        Changes to use Maria for internal temporary tables
        Removed all end space
      sql/sql_table.cc:
        Set HA_OPTION_PACK_RECORD if we are not using default or static record
      sql/sql_union.cc:
        If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
        If MY_NO_WAIT is given, return at once if lock is occupied
        If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
      sql/sql_update.cc:
        If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
        If MY_NO_WAIT is given, return at once if lock is occupied
        If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
      storage/maria/ha_maria.cc:
        Use packed fields
        null_bytes are not anymore stored in a separate field
        Changes to use Maria for internal temporary tables
        Give warning if we try to do an ALTER TABLE to a unusable row format
      storage/maria/ha_maria.h:
        Allow Maria with block format to restart scanning at given position
      storage/maria/ma_blockrec.c:
        Added functions to remember and restore scan position
        Allocate cur_row.extents so that we don't have to do a malloc on first read
        Fixed bug when using packed row without packed strings
        Removed unneeded calls to free_full_pages()
        Fixed unlikely bug when using old bitmap to read head page and head page had gone away
        Remember row position when doing undo of delete and update row (needed for undo of key delete)
      storage/maria/ma_blockrec.h:
        Added functions to remember and restore scan position
      storage/maria/ma_close.c:
        Don't sync temporary tables
      storage/maria/ma_control_file.c:
        Lock control file while it's used to stop several processes from using it
      storage/maria/ma_create.c:
        Fixed bug when using FIELD_NORMAL that was longer than FULL_PAGE_SIZE
        Fixed bug that casued fields to not be ordered according to offset
        Fixed bug in unique creation
      storage/maria/ma_delete.c:
        Don't write record reference when deleting key.
        (Rowid is likely to be different when we undo this)
      storage/maria/ma_dynrec.c:
        Fixed core dump when comparing records (happended in unique handling)
      storage/maria/ma_extra.c:
        MY_DONT_WAIT -> MY_SHORT_WAIT
        Removed TODO comment. (Was not relevant as all other instances are guranteed to be closed when we the code is excecuted)
        Added DBUG_ASSERT() to prove above.
      storage/maria/ma_key_recover.c:
        CLR's for UNDO_ROW_DELETE and UNDO_ROW_UPDATE now include rowid for the row.
        This was needed for undo_key_delete to work, as undo of delete row is likely to put row in a new position.
        undo_delete_key now doesn't include row position
      storage/maria/ma_open.c:
        Added virtual functions for remembering and restoring scan position
        Fixed wrong key search method when using multi-byte character sets (Bug#32705)
        Store original column number in index file
        
        NOTE: Index files are now incompatible with previous versions!
        (Ok as we haven't yet made a public Maria release)
      storage/maria/ma_recovery.c:
        Set info->cur_row.lastpos when reading CLR's for UNDO_ROW_DELETE or UNDO_ROW_UPDATE
      storage/maria/ma_scan.c:
        Added default function to remember and restore scan position
      storage/maria/maria_def.h:
        Added virtual functions & variables to remember and restore scan position
        Added MARIA_MAX_CONTROL_FILE_LOCK_RETRY
      storage/myisam/ha_myisam.cc:
        Fixed compiler errors as columdef->type is now an enum, not an integer
        Added functions to remember and restore scan position
      storage/myisam/ha_myisam.h:
        Added functions to remember and restore scan position
      storage/myisam/mi_check.c:
        MY_DONT_WAIT -> MY_SHORT_WAIT
      storage/myisam/mi_extra.c:
        MY_DONT_WAIT -> MY_SHORT_WAIT
      storage/myisam/mi_open.c:
        MY_DONT_WAIT -> MY_SHORT_WAIT
      storage/myisam/myisamdef.h:
        MY_DONT_WAIT -> MY_SHORT_WAIT
      cc589bef
  32. 12 Dec, 2007 1 commit
    • unknown's avatar
      Removed MARIA_BASE min_row_length (duplicate of min_block_length) · 8224c76f
      unknown authored
      Cleanup of recent code changes in dbug and my_thr_init
      Added name for each safe_mutex (for better DBUG and error reporting)
      Fixed that sort_info.max_records is calculated correctly. This fixed a bug in maria_chk
      Removed duplicate printing of mutex address in dbug log
      
      
      dbug/dbug.c:
        Cleanup of recent code changes
      include/my_pthread.h:
        Added name for each safe_mutex (for better DBUG and error reporting)
      mysys/my_thr_init.c:
        Cleanup of recent code changes
      mysys/thr_mutex.c:
        Added name for each safe_mutex (for better DBUG and error reporting)
      mysys/wqueue.c:
        Removed some mutex printing (as it's done now when we take mutex)
      storage/maria/Makefile.am:
        Fixed that 'make tags' works with xemacs
      storage/maria/ma_blockrec.c:
        base.min_row_length -> base.min_block_length
        (As they where basicly the same variable)
      storage/maria/ma_check.c:
        Moved more common stuff to initialize_variables_for_repair
        Fixed that sort_info.max_records is calculated correctly. This fixed a bug in maria_chk
      storage/maria/ma_create.c:
        More comments
        Fixed that min_pack_length is calculated more correctly
        Removed duplicate variable base.min_row_length
      storage/maria/ma_loghandler.c:
        Removed duplicate printing of mutex address
      storage/maria/ma_open.c:
        Removed base.min_row_length
      storage/maria/ma_packrec.c:
        Removed not anymore needed code
        (One should not change any .base variables as this will affect repair with unpack)
      storage/maria/maria_def.h:
        Removed base.min_row_length
      8224c76f
  33. 10 Dec, 2007 2 commits
    • unknown's avatar
      Fixed some compiler errors · abe1031e
      unknown authored
      mysys/my_thr_init.c:
        Added missing DBUG_OFF
      storage/maria/ma_loghandler.c:
        Fixed wrong macro
      abe1031e
    • unknown's avatar
      Added MARIA_SHARE *share to a lot of places to make code simpler · 2f6f08ed
      unknown authored
      Changed info->s -> share to get more efficent code
      Updated arguments to page accessor functions to use MARIA_SHARE * instead of MARIA_HA *.
      Tested running tests in quick mode (no balance page on insert and only when critical on delete)
      Fixed bug in underflow handling in quick mode
      Fixed bug in log handler where it accessed not initialized variable
      Fixed bug in log handler where it didn't free mutex in unlikely error condition
      Removed double write of page in case of of some underflow conditions
      Added DBUG_PRINT in safemutex lock/unlock
      
      
      dbug/dbug.c:
        Compile without SAFE_MUTEX (to be able to use DBUG_PRINT in safe_mutex code)
        Use calls to get/set my_thread_var->dbug. (Make dbug independent of compile time options for mysys)
      include/my_pthread.h:
        Added prototypes for my_thread_var_get_dbug() & my_thread_var_set_dbug()
      mysql-test/lib/mtr_report.pl:
        Don't check warnings in log files if we are using --extern
      mysys/my_thr_init.c:
        Added my_thread_var_get_dbug() & my_thread_var_set_dbug()
      mysys/thr_mutex.c:
        Added DBUG printing of addresses to mutex for lock/unlock
      storage/maria/ma_blockrec.c:
        Fixed comment
      storage/maria/ma_check.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
      storage/maria/ma_close.c:
        Indentation fixes
      storage/maria/ma_create.c:
        Calculate min_key_length correctly
      storage/maria/ma_dbug.c:
        Indentation fixes
      storage/maria/ma_delete.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
        Removed some writing of key pages that underflow (will be written by caller)
        Fixed crashing bug in underflow handling when using quick mode
      storage/maria/ma_delete_all.c:
        Indentation fixes
      storage/maria/ma_dynrec.c:
        Indentation fixes
      storage/maria/ma_extra.c:
        Fixed indentation
        Removed old useless code
        Reset share->changed if we have written state
      storage/maria/ma_ft_update.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
      storage/maria/ma_info.c:
        Indentation fixes
      storage/maria/ma_key_recover.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
      storage/maria/ma_locking.c:
        Indentation fixes
      storage/maria/ma_loghandler.c:
        Removed wrapper functions translog_mutex_lock and translog_mutex_unlock (safemutex now does same kind of printing)
        Renamed LOGREC_REDO_INSERT_ROW_BLOB to LOGREC_REDO_INSERT_NOT_USED to mark it free
        Fixed some DBUG_PRINT to ensure that convert-dbug-for-diff works
        Fixed bug in translog_flush() that caused log to stop syncing to disk
        Added missing mutex_unlock in case of error
      storage/maria/ma_loghandler.h:
        Renamed LOGREC_REDO_INSERT_ROW_BLOB to LOGREC_REDO_INSERT_NOT_USED to mark it free
      storage/maria/ma_open.c:
        Indentation fixes
      storage/maria/ma_packrec.c:
        Indentation fixes
      storage/maria/ma_page.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
        Added check that we never write a key page without content (except in recovery where a key page may temporary be without content)
      storage/maria/ma_preload.c:
        Updated arguments to page accessor functions
      storage/maria/ma_range.c:
        Updated arguments to page accessor functions
      storage/maria/ma_rkey.c:
        Indentation fixes
      storage/maria/ma_rprev.c:
        Indentation fixes
      storage/maria/ma_rt_index.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
      storage/maria/ma_rt_index.h:
        Updated arguments to page accessor functions
      storage/maria/ma_rt_key.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
      storage/maria/ma_rt_mbr.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
      storage/maria/ma_rt_split.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
      storage/maria/ma_search.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
      storage/maria/ma_sort.c:
        Indentation fixes
      storage/maria/ma_statrec.c:
        Indentation fixes
      storage/maria/ma_test1.c:
        Added extra undo test
        Flush also keys in -u1, to ensure that the full log is flushed
      storage/maria/ma_test2.c:
        Added extra undo test
        Flush also keys in -u1, to ensure that the full log is flushed
      storage/maria/ma_test_recovery.expected:
        Updated results
      storage/maria/ma_test_recovery:
        Added extra undo test
      storage/maria/ma_update.c:
        Indentation fixes
      storage/maria/ma_write.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
        Prepare for quick mode for insert (don't balance page)
      storage/maria/maria_chk.c:
        Added MARIA_SHARE *share to a lot of places to make code simpler
        info->s -> share
        Updated arguments to page accessor functions
      storage/maria/maria_def.h:
        Updated arguments to page accessor functions
      2f6f08ed
  34. 16 Aug, 2007 1 commit
    • unknown's avatar
      Fix for Bug#27970 "Fix for bug 24507 makes mysql_install_db fail" · 4e5d02e9
      unknown authored
      include/my_pthread.h:
        Fix for Bug#27970 "Fix for bug 24507 makes mysql_install_db fail".
        
        Removed macro NPTL_PTHREAD_EXIT_BUG, because it doesn't work in dynamic
        environment. One can switch between NPTL and LT on the fly on Linux.
        
        Added pthread_dummy(ESRCH) for those platforms that don't have pthread_kill.
        This ensures that there won't be an error in mysqld.cc where the return value 
        is being checked from the function call.
      mysys/my_thr_init.c:
        Check for a Linux is enough. There is an additional test if
        NPTL is in use before spwaning the extra thread.
      4e5d02e9
  35. 30 Jul, 2007 1 commit
    • unknown's avatar
      Slow query log to file now displays queries with microsecond precission · b59217eb
      unknown authored
      --long-query-time is now given in seconds with microseconds as decimals
      --min_examined_row_limit added for slow query log
      long_query_time user variable is now double with 6 decimals
      Added functions to get time in microseconds
      Added faster time() functions for system that has gethrtime()  (Solaris)
      We now do less time() calls.
      Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
      set_var.cc and my_getopt() can now handle DOUBLE variables.
      All time() calls changed to my_time()
      my_time() now does retry's if time() call fails.
      Added debug function for stopping in mysql_admin_table() when tables are locked
      Some trivial function and struct variable renames to avoid merge errors.
      Fixed compiler warnings
      Initialization of some time variables on windows moved to my_init() 
      
      
      include/my_getopt.h:
        Added support for double arguments
      include/my_sys.h:
        Fixed wrong type to packfrm()
        Added new my_time functions
      include/mysql/plugin.h:
        Added support for DOUBLE
      libmysql/CMakeLists.txt:
        Added new time functions
      libmysql/Makefile.shared:
        Added new time functions
      mysql-test/r/variables.result:
        Testing of long_query_time
      mysql-test/t/variables.test:
        Testing of long_query_time
      mysys/charset.c:
        Fixed compiler warnings
      mysys/default_modify.c:
        Fixed compiler warnings
      mysys/hash.c:
        Fixed compiler warnings
      mysys/mf_getdate.c:
        Use my_time()
      mysys/mf_iocache2.c:
        Fixed compiler warnings
      mysys/mf_pack.c:
        Fixed compiler warnings
      mysys/mf_path.c:
        Fixed compiler warnings
      mysys/my_append.c:
        Fixed compiler warnings
      mysys/my_compress.c:
        Fixed compiler warnings
      mysys/my_copy.c:
        Fixed compiler warnings
      mysys/my_gethwaddr.c:
        Fixed compiler warnings
      mysys/my_getopt.c:
        Added support for double arguments
      mysys/my_getsystime.c:
        Added functions to get time in microseconds.
        Added faster time() functions for system that has gethrtime()  (Solaris)
        Moved windows initialization code to my_init()
      mysys/my_init.c:
        Added initializing of variables needed for windows time functions
      mysys/my_static.c:
        Added variables needed for windows time functions
      mysys/my_static.h:
        Added variables needed for windows time functions
      mysys/my_thr_init.c:
        Added THR_LOCK_time, used for faster my_time()
      mysys/mysys_priv.h:
        Added THR_LOCK_time, used for faster my_time()
      mysys/thr_alarm.c:
        time() -> my_time()
      sql/event_data_objects.cc:
        end_time() -> set_current_time()
      sql/event_queue.cc:
        end_time() -> set_current_time()
      sql/event_scheduler.cc:
        Fixed compiler warnings
      sql/field.h:
        Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
      sql/item.h:
        Added decimal to Item_float(double)
      sql/item_cmpfunc.h:
        Added decimal to Item_float(double)
      sql/item_timefunc.cc:
        time() -> my_time()
      sql/item_xmlfunc.cc:
        Fixed compiler warning
      sql/lock.cc:
        lock_time() -> set_time_after_lock()
      sql/log.cc:
        Timing in slow query log to file is now done in microseconds
        Changed some while() loops to for() loops.
        Fixed indentation
        time() -> my_time()
      sql/log.h:
        Slow query logging is now done based on microseconds
      sql/log_event.cc:
        time() -> my_time()
        Fixed arguments to new Item_float()
      sql/mysql_priv.h:
        Fixed compiler warnings
        Added opt_log_slow_slave_statements
      sql/mysqld.cc:
        Added --log_slow_slave_statements and --min_examined_row_limit
        --long-query-time now takes a double argument with microsecond resolution
        Don't write shutdown message when using --help
        Removed not needed \n
        Thread create time and connect time is now done in microseconds
        time() -> my_time()
        Avoid some time() calls
      sql/net_serv.cc:
        Fixed compiler warnings
      sql/parse_file.cc:
        time() -> my_time()
      sql/set_var.cc:
        Added support for DOUBLE variables
        Added support for variables that are given in seconds with microsecond resolution
      sql/set_var.h:
        Added support for variables that are given in seconds with microsecond resolution
      sql/slave.cc:
        Allow logging of slave queries to slow query log if 'opt_log_slow_slave_statements' is given
        time() -> my_time()
      sql/sql_cache.h:
        Fixed compiler warning()
      sql/sql_class.cc:
        Initialize new THD variables
      sql/sql_class.h:
        long_query_time is now in microseconds
        Added min_examined_row_limit
        Reordered some THD elements for higher efficency
        Added timers in microseconds (connect_utime, thr_create_utime, start_utime and utime_after_lock)
        Start of query is now recorded both in seconds and in microseconds.
        Following renames was made for more clarity and avoid merge problems from earlier versions:
        connect_time -> connect_utime
        thr_create_time -> thr_create_utime
        end_time()  -> set_current_time()
        lock_time() -> set_time_after_lock()
        
        Added THD::start_utime, which is start of query in microseconds from some arbitary time
        Added function THD::current_utime()
        
        Removed safe_time() as retry's are handled in my_time()
      sql/sql_connect.cc:
        User resources are now using microsecond resolution
      sql/sql_insert.cc:
        end_time() -> set_current_time()
      sql-common/client.c:
        time() -> my_time()
      sql/sql_parse.cc:
        Testing if we should print to slow_query_log() is now done with microsecond precission.
        If min_examined_row_limit is given, only log queries to slow query log that has examined more rows than this.
      sql/sql_select.cc:
        Simplify code now that Item_float() takes decimals as argument
      sql/sql_show.cc:
        time() -> my_time()
        Added support for SYS_DOUBLE
      sql/sql_table.cc:
        Added debug function for stopping in mysql_admin_table() when tables are locked
      sql/structs.h:
        intime -> reset_utime
      b59217eb