1. 20 Feb, 2012 2 commits
    • Michael Widenius's avatar
      Fixed compiler warnings · 54cad2aa
      Michael Widenius authored
      54cad2aa
    • Michael Widenius's avatar
      Merge with MYSQL 5.1.61 · ae07ec6c
      Michael Widenius authored
      Fixed README with link to source
      Merged InnoDB change to XtraDB
      
      README:
        Added information of where to find MariaDB code
      storage/archive/ha_archive.cc:
        Removed memset() of rows, a MariaDB checksum's doesn't touch not used data.
      ae07ec6c
  2. 11 Feb, 2012 2 commits
    • Vladislav Vaintroub's avatar
      merge · 0c568a99
      Vladislav Vaintroub authored
      0c568a99
    • Vladislav Vaintroub's avatar
      A recent change in the server protocol code broke SSL connection for some client libraries. · b3e15f83
      Vladislav Vaintroub authored
      Protocol documentation (http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol)
      says that initial packet sent by client if client wants SSL, consists of client capability flags only
      (4 bytes or 2 bytes edependent on protocol versionl). 
      Some clients happen to send more in the initial SSL packet (C client, Python connector), while others (Java, .NET) follow the docs and send only client capability flags.
      
      A change that broke Java client was a newly introduced check that frst client packet
      has 32 or more bytes. This is generally wrong, if client capability flags contains CLIENT_SSL.
      
      Also, fixed the code such that read max client packet size and charset in the first packet prior to SSL handshake.  With SSL, clients do not have to send this info, they can only send client flags.
      
      This is now fixed such that max packet size and charset are not read prior to SSL handshake, in case of SSL they are read from the "complete" client authentication packet after SSL initialization.
      b3e15f83
  3. 25 Jan, 2012 1 commit
  4. 11 Jan, 2012 1 commit
  5. 04 Jan, 2012 1 commit
  6. 30 Dec, 2011 1 commit
  7. 21 Dec, 2011 1 commit
  8. 15 Dec, 2011 2 commits
  9. 14 Dec, 2011 2 commits
  10. 13 Dec, 2011 1 commit
    • Annamalai Gurusami's avatar
      Bug #13117023: Innodb increments handler_read_key when it should not · ad84fb5c
      Annamalai Gurusami authored
      The counter handler_read_key (SSV::ha_read_key_count) is incremented 
      incorrectly.
      
      The mysql server maintains a per thread system_status_var (SSV)
      object.  This object contains among other things the counter
      SSV::ha_read_key_count. The purpose of this counter is to measure the
      number of requests to read a row based on a key (or the number of
      index lookups).
      
      This counter was wrongly incremented in the
      ha_innobase::innobase_get_index(). The fix removes
      this increment statement (for both innodb and innodb_plugin).
      
      The various callers of the innobase_get_index() was checked to
      determine if anybody must increment this counter (if they first call
      innobase_get_index() and then perform an index lookup).  It was found
      that no caller of innobase_get_index() needs to worry about the
      SSV::ha_read_key_count counter.
      ad84fb5c
  11. 12 Dec, 2011 5 commits
  12. 11 Dec, 2011 1 commit
  13. 03 Dec, 2011 1 commit
    • Michael Widenius's avatar
      Added suppressions · 2e34f182
      Michael Widenius authored
      Fixed feedback_plugin_send to not generate a random number of lines.
      
      
      mysql-test/t/feedback_plugin_send.test:
        Don't print more than 4 lines (sometimes there are 6 feedback lines in the log...)
      mysql-test/valgrind.supp:
        Added suppression for failure on work
      support-files/compiler_warnings.supp:
        Suppress warning from xtradb
      2e34f182
  14. 01 Dec, 2011 4 commits
  15. 30 Nov, 2011 6 commits
    • Michael Widenius's avatar
      Fixed compiler warning and errors · 6378bdbf
      Michael Widenius authored
      mysql-test/suite/funcs_1/t/is_engines_federated.test:
        Corrected path
      storage/xtradb/fil/fil0fil.c:
        Fixed compiler warning
      6378bdbf
    • Michael Widenius's avatar
      Fixed compiler warnings and other bugs found by buildbot. · 692fcba4
      Michael Widenius authored
      
      client/mysqltest.cc:
        Free mutex after usage (fixes valgrind warnings in embedded server)
      mysql-test/include/gis_keys.inc:
        Fixed failure in innodb.gis_test
      mysql-test/r/gis.result:
        Updated result
      mysql-test/suite/innodb/r/innodb_gis.result:
        Updated results
      mysql-test/suite/innodb/t/innodb_bug38231.test:
        Added handling of timeouts (happend on some servers in buildbot)
      mysql-test/suite/innodb_plugin/r/innodb_gis.result:
        Updated results
      mysql-test/suite/innodb_plugin/t/innodb.test:
        Use error names instead of numbers
      mysql-test/suite/innodb_plugin/t/innodb_misc1.test:
        This test requires utf8
      mysql-test/suite/innodb_plugin/t/innodb_mysql.test:
        This test requires Xtradb
      sql/sql_base.cc:
        Don't print table names for placeholders.
      sql/sql_show.cc:
        Temporary fix:
        Save and restore db and table_name in mysqld_show_create (to get rid of valgrind warning)
        A better solution that needs to be investgated is to not change these fields in mysql_derived_prepare()
      sql/sql_view.cc:
        Fixed valgrind warning
      storage/xtradb/handler/ha_innodb.cc:
        Don't access THD directly
      692fcba4
    • Tor Didriksen's avatar
      Bug#11761576 54082: HANDLE_SEGFAULT MAKES USE OF UNSAFE FUNCTIONS · 23dce762
      Tor Didriksen authored
      Post-push fix: build break on windows/optimized
      23dce762
    • Tor Didriksen's avatar
      Bug#11761576 54082: HANDLE_SEGFAULT MAKES USE OF UNSAFE FUNCTIONS · 9a15f249
      Tor Didriksen authored
      handle_segfault is the signal handler code of mysqld.  however, it makes
      calls to potentially unsafe functions localtime_r, fprintf, fflush.
      
      
      
      include/my_stacktrace.h:
        Add safe versions of itoa() write() and snprintf().
      libmysqld/CMakeLists.txt:
        Move signal handler to separate file.
      mysys/stacktrace.c:
        Remove unsafe function calls.
      sql/CMakeLists.txt:
        Move signal handler to separate file.
      sql/Makefile.am:
        Move signal handler to separate file.
      sql/mysqld.cc:
        Move signal handler to separate file.
      sql/signal_handler.cc:
        Remove unsafe function calls.
      9a15f249
    • Sergei Golubchik's avatar
      test both federated and federatedX in the federated suite. · ca5b1b54
      Sergei Golubchik authored
      mysql-test/lib/My/Options.pm:
        My::Options::is_set() now matches both option names and values!
      mysql-test/lib/mtr_cases.pm:
        1. don't merge --plugin-load here, it's too early
        2. don't skip combinations that set --plugin-load just because the test needs another --plugin-load.
           Skip *only* if test's --plugin-load matches *exactly* --plugin-load of one of the combinations.
        3. if skipping all combinations but one, still assign the test to the combination
      mysql-test/mysql-test-run.pl:
        1. remove dead code - don't set variables that aren't used.
        2. bugfix: allow one-letter combination names
        3. in the command line, merge all --plugin-load options in one
      storage/federated/ha_federated.cc:
        bugfix: garbage character in the generated SELECT query
      ca5b1b54
    • unknown's avatar
      Cherrypick into XtraDB: Bug#13002783 PARTIALLY UNINITIALIZED CASCADE UPDATE VECTOR · be505e3e
      unknown authored
      We merged the test case for this into MariaDB 5.1, but the fix
      was not yet part of XtraDB.
      be505e3e
  16. 29 Nov, 2011 5 commits
    • Michael Widenius's avatar
      Fixed compiler warnings · 47575bd0
      Michael Widenius authored
      dbug/tests.c:
        Added __attribute__((unused)) to get rid of compiler warning
      server-tools/instance-manager/guardian.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      sql/filesort.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      sql/slave.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      sql/sql_load.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      sql/sql_table.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      storage/maria/ma_blockrec.c:
        Added __attribute__((unused)) to get rid of compiler warning
      storage/maria/ma_check.c:
        Added missing cast
      storage/maria/ma_loghandler.c:
        Added __attribute__((unused)) to get rid of compiler warning
      storage/maria/ma_recovery.c:
        Added __attribute__((unused)) to get rid of compiler warning
      storage/pbxt/src/cache_xt.cc:
        Added __attribute__((unused)) to get rid of compiler warning
      storage/xtradb/fil/fil0fil.c:
        Removed not used variable
      storage/xtradb/handler/ha_innodb.cc:
        Use unused variable
      vio/viosocket.c:
        Remove usage of not used variable
      vio/viosslfactories.c:
        Added cast
      47575bd0
    • Tor Didriksen's avatar
      Build broken for gcc 4.5.1 in optimized mode. · 98adda50
      Tor Didriksen authored
      readline.cc: In function char* batch_readline(LINE_BUFFER*):
      readline.cc:60:9: error: out_length may be used uninitialized in this function
      log.cc: In function int find_uniq_filename(char*):
      log.cc:1857:8: error: number may be used uninitialized in this function
      98adda50
    • Michael Widenius's avatar
      Fixed that maria-recover works as expected. · a19f4e3a
      Michael Widenius authored
      - "" is now used if no option is set
      
      include/maria.h:
        Added HA_RECOVER_ANY
      storage/maria/ha_maria.cc:
        Insert of checking if maria_recover_options == 0, check if any bit is set.
        Fix maria_recover_names to match bitmap. This fixes that recover options works as expected.
      storage/maria/ha_maria.h:
        Insert of checking if maria_recover_options == 0, check if any bit is set.
      storage/maria/ma_check.c:
        Fixed wrong print
      a19f4e3a
    • Nirbhay Choubey's avatar
      Bug#11756764 48726: MYSQLD KEEPS CRASHING WITH SIGSEGV · c67a91f1
      Nirbhay Choubey authored
                          WITH MYISAM_USE_MMAP ENABLED
      
      MySQL server can crash due to segmentation fault when
      started with myisam_use_mmap.
      
      The reason behind this being, while making a request to
      unmap (munmap) the previously mapped memory (mmap), the
      size passed was 7 bytes larger than the size requested at
      the time of mapping. This can eventually unmap the adjacent
      memory mapped block, belonging to some other memory-map pool.
      Hence the subsequent call to mmap can map a region which was
      still a valid memory mapped area.
      
      Fixed by removing the extra 7-byte margin which was erroneously
      added to the size, used for unmappping.
      
      
      storage/myisam/mi_close.c:
        Bug#11756764 48726: MYSQLD KEEPS CRASHING WITH SIGSEGV
                            WITH MYISAM_USE_MMAP ENABLED
        
        Added a condition to call _mi_unmap_file() in case
        of compressed records. mi_munmap_file() is called
        otherwise.
      storage/myisam/mi_packrec.c:
        Bug#11756764 48726: MYSQLD KEEPS CRASHING WITH SIGSEGV
                            WITH MYISAM_USE_MMAP ENABLED
        
        mi_dynmap_file() function, after successfully executing
        mmap, stores the total size in info->s->mapped_length
        variable. Now, if mi_dynmap_file() is invoked with a size
        with an extra 7-byte margin (MEMMAP_EXTRA_MARGIN),
        the margin will eventually also get stored in mapped_length.
        So, un-mapping function can simply use the value stored in
        mapped_length in order to unmap the previously mapped
        region.
      c67a91f1
    • Vladislav Vaintroub's avatar
  17. 24 Nov, 2011 2 commits
    • Michael Widenius's avatar
      Fixed that one can use --maria-recover=backup,force · 1670845c
      Michael Widenius authored
      (Before we only allowed one option)
      1670845c
    • Michael Widenius's avatar
      Fixes for build failuers found by buildbot · d26aefb0
      Michael Widenius authored
      mysql-test/mysql-test-run.pl:
        Rename MYSQLD -> MYSQLD_SIMPLE_CMD to avoid conflict with new MYSQLD variable from MySQL 5.1
      mysql-test/r/innodb_file_format.result:
        Remove old duplicated test
      mysql-test/suite/pbxt/r/endspace.result:
        Update test to last version
      mysql-test/suite/pbxt/r/heap.result:
        Removed heap test (not part of pbxt)
      mysql-test/suite/pbxt/r/select_safe.result:
        Updated results after error message change
      mysql-test/suite/pbxt/r/view_grant.result:
        Removed view test (not part of pbxt)
      mysql-test/suite/pbxt/t/endspace.test:
        Update test to last version
      mysql-test/suite/pbxt/t/heap.test:
        Removed heap test (not part of pbxt)
      mysql-test/suite/pbxt/t/view_grant.test:
        Removed view test (not part of pbxt)
      mysql-test/t/innodb_file_format.test:
        Remove old duplicated test
      mysql-test/t/mysqld_option_err.test:
        Use renamed variable
      sql/my_decimal.h:
        Fixed wrong define
      storage/maria/ma_loghandler.c:
        Fixed compiler warning
      d26aefb0
  18. 23 Nov, 2011 2 commits
    • Michael Widenius's avatar
      Merge with MySQL 5.1.60 · 7b368e38
      Michael Widenius authored
      7b368e38
    • Ashish Agarwal's avatar
      BUG#11751793 - 42784: ARCHIVE TABLES CAUSE 100% CPU USAGE · a00f87bf
      Ashish Agarwal authored
                            AND HANG IN SHOW TABLE STATUS.
      
      ISSUE: Table corruption due to concurrent queries.
             Different threads running insert and check
             query leads to table corruption. Not properly locked,
             rows are inserted in between check query.
      
      SOLUTION: In check query mutex lock is acquired
                for a longer time to handle concurrent
                insert and check query.
      
      NOTE: Additionally we backported the fix for CHECKSUM
            issue(bug#11758979).
      a00f87bf