1. 04 Nov, 2009 1 commit
  2. 28 Oct, 2009 4 commits
  3. 27 Oct, 2009 1 commit
  4. 26 Oct, 2009 3 commits
    • Michael Widenius's avatar
    • Michael Widenius's avatar
      Automatic merge with maria-merge · f3e3fe86
      Michael Widenius authored
      f3e3fe86
    • Michael Widenius's avatar
      Fixed compiler warning message · 5bddbc44
      Michael Widenius authored
      - Added checking of return value for system(), freopen(), fgets() and chown()
      - Ensure that calls that require a format strings gets a format string
      - Other trivial things
      Updated test suite results (especially for pbxt and embedded server)
      Removed warning for "Invalid (old?) table or database name 'mysqld.1'" from pbxt tests
      Speed up some pbxt tests by inserting begin ; commit; around "while loops with inserts"
      Added mysqld startup option '--debug-flush'
      Create maria_recovery.trace in data directory instead of current directory
      
      client/mysql.cc:
        Check return value from system()
      client/mysql_upgrade.c:
        Check return value from fgets()
      client/mysqladmin.cc:
        Check return value from fgets()
      client/mysqlslap.c:
        Check return value from system() (but ignore it, as it's not critical)
      extra/yassl/src/crypto_wrapper.cpp:
        Check return value from fgets() (but ignore it, as it's internal file)
      extra/yassl/taocrypt/src/aes.cpp:
        Added extra {} to remove compiler warning
      extra/yassl/taocrypt/src/blowfish.cpp:
        Added extra {} to remove compiler warning
      extra/yassl/taocrypt/src/misc.cpp:
        Ifdef not used code
      include/mysys_err.h:
        Added error message for failing chown()
      mysql-test/mysql-test-run.pl:
        Don't give warning for skipping ndbcluster (never enabled in MariaDB)
      mysql-test/suite/funcs_1/r/is_columns_is_embedded.result:
        Update with new information schema information
      mysql-test/suite/funcs_1/r/is_tables_is_embedded.result:
        New test
      mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result:
        Update test results (has not been tested for a long time)
      mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result:
        Update test results (has not been tested for a long time)
      mysql-test/suite/funcs_1/t/is_tables_is.test:
        Don't run with embedded server (as results differ)
        I added a new test for embedded server
      mysql-test/suite/funcs_1/t/is_tables_is_embedded.test:
        New test
      mysql-test/suite/pbxt/my.cnf:
        Allow one to run pbxt tests without having to specify --mysqld=--default-storage-engine=pbxt
      mysql-test/suite/pbxt/t/count_distinct3.test:
        Speed up test by inserting begin; ... commit;
      mysql-test/suite/pbxt/t/subselect.test:
        Speed up test by inserting begin; ... commit;
      mysys/errors.c:
        Added error message for failing chown()
      mysys/my_copy.c:
        Added error message for failing chown()
      mysys/my_redel.c:
        Added error message for failing chown()
      mysys/safemalloc.c:
        Added cast to get rid of compiler warning
      sql/ha_partition.cc:
        Fixed wrong argument to sql_print_error() (it requires a format string)
      sql/log.cc:
        Test return value of freopen()
      sql/mysqld.cc:
        Test return value of freopen()
        Added startup option '--debug-flush' to be used when one gets a core dump (easy to explain to people on IRC)
      sql/rpl_rli.cc:
        Fixed wrong argument to sql_print_error() (it requires a format string)
      sql/set_var.cc:
        Added {} to get rid of compiler warnings
      sql/slave.cc:
        Fixed wrong argument to mi->report() and sql_print...() (they require a format string)
      sql/sql_cache.cc:
        Fixed wrong argument to sql_printinformation() (it requires a format string)
      sql/sql_parse.cc:
        Test return value of fgets()
      sql/sql_plugin.cc:
        Fixed wrong argument to sql_print_error() (it requires a format string)
      sql/sql_select.cc:
        Use unique table name for internal temp tables instead of full path
        (Simple speed & space optimization)
      sql/udf_example.c:
        Removed compiler warning about not used variable
      storage/maria/ha_maria.cc:
        Fixed wrong argument to sql_print_error() and ma_check_print_error() (they require a format string)
      storage/maria/ma_recovery.c:
        Create maria_recovery.trace in data directory instead of current directory
      storage/maria/unittest/ma_test_loghandler-t.c:
        Fixed wrong argument to ok();  Requires a format string
      storage/pbxt/src/strutil_xt.cc:
        Detect temporary tables by checking if that path for the table is in the mysql data directory.
        The database for temporary tables is after this patch, from PBXT point of view, ""
        This is needed to stop PBXT from calling filename_to_tablename() with the base directory as an argument, which caused
        ERROR: Invalid (old?) table or database name 'mysqld.1'" in the log when running the test suite.
      tests/mysql_client_test.c:
        Fixed compiler warnings
      unittest/mysys/base64-t.c:
        Fixed wrong argument to diag() (it requires a format string)
        Added a comment that the current 'print' of differing buffers doesn't print the right thing,
        but didn't fix this as it's not important (unless we find a bug in the real code)
      5bddbc44
  5. 24 Oct, 2009 2 commits
    • Sergey Petrunya's avatar
      MWL#36: Add a mysqlbinlog option to change the used database · 4cb06eab
      Sergey Petrunya authored
      - Apply Alexander Ivanov's fix to testsuite
      
      4cb06eab
    • Sergey Petrunya's avatar
      MWL#36: Add a mysqlbinlog option to change the used database · b027072e
      Sergey Petrunya authored
      - Review fixes
      
      client/Makefile.am:
        - Make it build on Linux
      client/mysqlbinlog.cc:
        - Coding style fixes
        - Better/more comments
        - Use client/sql_string.*, not server's sql/sql_string.*.
        - Don't declare a dummy TABLE_LIST structure in the client.
      client/sql_string.h:
        - Use client/sql_string.*, not server's sql/sql_string.*.
      sql/log_event.cc:
        = Fix coding style
        = Introduce Log_event::event_owns_temp_buf which tells whether Log_event::temp_buf is 'owned' by the Log_event object and should be my_free'd on return. 
        This is needed because rewrite_db() needs to dispose of the buffer, and 
        - when mysqlbinlog is reading directly from binlog file, the buffer 
          should be freed
        - when mysqlbinlog is reading from a server, the buffer is a part of network
          buffer and shouldn't be freed.
      sql/log_event.h:
        Introduce Log_event::event_owns_temp_buf which tells whether Log_event::temp_buf is 'owned' by the Log_event object and should be my_free'd on return. 
        This is needed because rewrite_db() needs to dispose of the buffer, and 
        - when mysqlbinlog is reading directly from binlog file, the buffer 
          should be freed
        - when mysqlbinlog is reading from a server, the buffer is a part of network
          buffer and shouldn't be freed.
      sql/mysqld.cc:
        - Better/more comments
      sql/rpl_filter.cc:
        - #ifdef-out Rpl_filter::tables_ok from the client. This allows not 
          to define dummy TABLE_LIST on the client
      sql/rpl_filter.h:
        - #ifdef-out Rpl_filter::tables_ok from the client. This allows not 
          to define dummy TABLE_LIST on the client
      sql/sql_string.cc:
        - Use client/sql_string.*, not server's sql/sql_string.*.
      sql/sql_string.h:
        - Use client/sql_string.*, not server's sql/sql_string.*.
      b027072e
  6. 23 Oct, 2009 4 commits
    • Michael Widenius's avatar
      Automatic merge · b9ea90b0
      Michael Widenius authored
      b9ea90b0
    • Michael Widenius's avatar
      Fixes for binary distribution in tar file · afd0a456
      Michael Widenius authored
      - mysql_install_db doesn't require --basedir option anymore
      - Fix that mysql_install_db mysqld_safe mysql_fix_privilege_tables has right paths for tar binary install
      - Move some files from share/mysql to where they have always been (1.0 - 5.0)
      - Move scripts used when installing MariaDB to the scripts directory (Added symlinks in old place for compatibility)
      - Move man files to 'man' (from 'share/man')
      - Ensure that all scripts are executable
      
      mysql_secure_installation.sh
      - Added support for --basedir flag
      - Don't assume that the mysql binary is in the path
      
      Other:
      - Fixed crash when one got kill signal during bootstrap
      
      Docs/INSTALL-BINARY:
        Change references from MySQL to MariaDB
      Docs/mysql.info:
        Change references from MySQL to MariaDB
      README:
        Removed duplicate row
      configure.in:
        Change references from MySQL to MariaDB
      libmysql/libmysql.c:
        Assume that if version string contains '-maria-' we are also using MariaDB
      scripts/make_binary_distribution.sh:
        Fix that mysql_install_db mysqld_safe mysql_fix_privilege_tables has right paths for tar binary install
        Remove some files that should not be part of a MariaDB binary install
        Move some files from share/mysql to where they have always been (1.0 - 5.0)
        Move man files to 'man' (from 'share/man')
        Move scripts used when installing MariaDB to the scripts directory (Added symlinks in old place for compatibility)
        Removed generation of 'netware/init_db.sql', as it was never used
        Remove old reference to bk tree
      scripts/mysql_secure_installation.sh:
        Added support for --basedir flag
        Don't assume that the mysql binary is in the path
        Use .my.cnf files
        Removed a lot of useless 'echo' rows
      sql/mysqld.cc:
        Fixed crash when one got kill signal during bootstrap
      storage/maria/Makefile.am:
        Don't add internal test files to binary distributions
      storage/myisam/Makefile.am:
        Don't add internal test files to binary distributions
      support-files/Makefile.am:
        Make scripts executable
      support-files/config.huge.ini.sh:
        Removed execution bit
      support-files/config.medium.ini.sh:
        Removed execution bit
      support-files/config.small.ini.sh:
        Removed execution bit
      support-files/mysql.server.sh:
        Ensure this works also mysqld is in the 'bin' directory
      afd0a456
    • unknown's avatar
      Merge Peter Lieverdink's fixes: · b9f5aba8
      unknown authored
       - configtest target in rc script.
       - type fix usefull -> useful.
      b9f5aba8
    • Michael Widenius's avatar
      Fixed version number · b25cfba7
      Michael Widenius authored
      b25cfba7
  7. 20 Oct, 2009 1 commit
  8. 19 Oct, 2009 1 commit
    • Michael Widenius's avatar
      This is based on the userstatv2 patch from Percona and OurDelta. · ab0905c6
      Michael Widenius authored
      The original code comes, as far as I know, from Google (Mark Callaghan's team) with additional work from Percona, Ourdelta and Weldon Whipple.
      
      This code provides the same functionallity, but with a lot of changes to make it faster and better fit the MariaDB infrastucture.
      
      Added new status variables:
      - Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics
      - Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_sent, Rows_read
      
      Added new variable / startup option 'userstat' to control if user statistics should be enabled or not
      
      Added my_getcputime(); Returns cpu time used by this thread.
      New FLUSH commands:
      - FLUSH SLOW QUERY LOG
      - FLUSH TABLE_STATISTICS
      - FLUSH INDEX_STATISTICS
      - FLUSH USER_STATISTICS
      - FLUSH CLIENT_STATISTICS
      
      New SHOW commands:
      - SHOW CLIENT_STATISTICS
      - SHOW USER_STATISTICS
      - SHOW TABLE_STATISTICS
      - SHOW INDEX_STATISTICS
      
      New Information schemas:
      - CLIENT_STATISTICS
      - USER_STATISTICS
      - INDEX_STATISTICS
      - TABLE_STATISTICS
      
      Added support for all new flush commands to mysqladmin
      
      Added handler::ha_... wrappers for all handler read calls to do statistics counting
      - Changed all code to use new ha_... calls
      - Count number of read rows, changed rows and rows read trough an index
      
      Added counting of number of bytes sent to binary log (status variable Binlog_bytes_written)
      Added counting of access denied errors (status variable Access_denied_erors)
      
      Bugs fixed:
      - Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long
      - CLOCK_GETTIME was not propely working on Linuxm
      
      client/mysqladmin.cc:
        Added support for all new flush commmands and some common combinations:
        
        flush-slow-log
        flush-table-statistics
        flush-index-statistics
        flush-user-statistics
        flush-client-statistics
        flush-all-status
        flush-all-statistics
      configure.in:
        Added checking if clock_gettime needs the librt.
        (Fixes Bug #37639 clock_gettime is never used/enabled in Linux/Unix)
      include/my_sys.h:
        Added my_getcputime()
      include/mysql_com.h:
        Added LIST_PROCESS_HOST_LEN & new REFRESH target defines
      mysql-test/r/information_schema.result:
        New information schema tables added
      mysql-test/r/information_schema_all_engines.result:
        New information schema tables added
      mysql-test/r/information_schema_db.result:
        New information schema tables added
      mysql-test/r/log_slow.result:
        Added testing that flosh slow query logs is accepted
      mysql-test/r/status_user.result:
        Basic testing of user, client, table and index statistics
      mysql-test/t/log_slow.test:
        Added testing that flosh slow query logs is accepted
      mysql-test/t/status_user-master.opt:
        Ensure that we get a fresh restart before running status_user.test
      mysql-test/t/status_user.test:
        Basic testing of user, client, table and index statistics
      mysys/my_getsystime.c:
        Added my_getcputime()
        Returns cpu time used by this thread.
      sql/authors.h:
        Updated authors to have core and original MySQL developers first.
      sql/event_data_objects.cc:
        Updated call to mysql_reset_thd_for_next_command()
      sql/event_db_repository.cc:
        Changed to use new ha_... calls
      sql/filesort.cc:
        Changed to use new ha_... calls
      sql/ha_partition.cc:
        Changed to use new ha_... calls
        Fixed comment syntax
      sql/handler.cc:
        Changed to use new ha_... calls
        Reset table statistics
        Added code to update global table and index status
        Added counting of rows changed
      sql/handler.h:
        Added table and index statistics variables
        Added function reset_statistics()
        Added handler::ha_... wrappers for all handler read calls to do statistics counting
        Protected all normal read calls to ensure we use the new calls in the server.
        Made ha_partition a friend class so that partition code can call the old read functions
      sql/item_subselect.cc:
        Changed to use new ha_... calls
      sql/lex.h:
        Added keywords for new information schema tables and flush commands
      sql/log.cc:
        Added flush_slow_log()
        Added counting of number of bytes sent to binary log
        Removed not needed test of thd (It's used before, so it's safe to use)
        Added THD object to MYSQL_BIN_LOG::write_cache() to simplify statistics counting
      sql/log.h:
        Added new parameter to write_cache()
        Added flush_slow_log() functions.
      sql/log_event.cc:
        Updated call to mysql_reset_thd_for_next_command()
        Changed to use new ha_... calls
      sql/log_event_old.cc:
        Updated call to mysql_reset_thd_for_next_command()
        Changed to use new ha_... calls
      sql/mysql_priv.h:
        Updated call to mysql_reset_thd_for_next_command()
        Added new statistics functions and variables needed by these.
      sql/mysqld.cc:
        Added new statistics variables and structures to handle these
        Added new status variables:
        - Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics
        - Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_set, Rows_read
        Added new option 'userstat' to control if user statistics should be enabled or not
      sql/opt_range.cc:
        Changed to use new ha_... calls
      sql/opt_range.h:
        Changed to use new ha_... calls
      sql/opt_sum.cc:
        Changed to use new ha_... calls
      sql/records.cc:
        Changed to use new ha_... calls
      sql/set_var.cc:
        Added variable 'userstat'
      sql/sp.cc:
        Changed to use new ha_... calls
      sql/sql_acl.cc:
        Changed to use new ha_... calls
        Added counting of access_denied_errors
      sql/sql_base.cc:
        Added call to statistics functions
      sql/sql_class.cc:
        Added usage of org_status_var, to store status variables at start of command
        Added functions THD::update_stats(), THD::update_all_stats()
        Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long
      sql/sql_class.h:
        Added new status variables to status_var
        Moved variables that was not ulong in status_var last.
        Added variables to THD for storing temporary values during statistics counting
      sql/sql_connect.cc:
        Variables and functions to calculate user and client statistics
        Added counting of access_denied_errors and lost_connections
      sql/sql_cursor.cc:
        Changed to use new ha_... calls
      sql/sql_handler.cc:
        Changed to use new ha_... calls
      sql/sql_help.cc:
        Changed to use new ha_... calls
      sql/sql_insert.cc:
        Changed to use new ha_... calls
      sql/sql_lex.h:
        Added SQLCOM_SHOW_USER_STATS, SQLCOM_SHOW_TABLE_STATS, SQLCOM_SHOW_INDEX_STATS, SQLCOM_SHOW_CLIENT_STATS
      sql/sql_parse.cc:
        Added handling of:
        - SHOW CLIENT_STATISTICS
        - SHOW USER_STATISTICS
        - SHOW TABLE_STATISTICS
        - SHOW INDEX_STATISTICS
        Added handling of new FLUSH commands:
        - FLUSH SLOW QUERY LOGS
        - FLUSH TABLE_STATISTICS
        - FLUSH INDEX_STATISTICS
        - FLUSH USER_STATISTICS
        - FLUSH CLIENT_STATISTICS
        Added THD parameter to mysql_reset_thd_for_next_command()
        Added initialization and calls to user statistics functions
        Added increment of statistics variables empty_queries, rows_sent and access_denied_errors.
        Added counting of cpu time per query
      sql/sql_plugin.cc:
        Changed to use new ha_... calls
      sql/sql_prepare.cc:
        Updated call to mysql_reset_thd_for_next_command()
      sql/sql_select.cc:
        Changed to use new ha_... calls
        Indentation changes
      sql/sql_servers.cc:
        Changed to use new ha_... calls
      sql/sql_show.cc:
        Added counting of access denied errors
        Added function for new information schema tables:
        - CLIENT_STATISTICS
        - USER_STATISTICS
        - INDEX_STATISTICS
        - TABLE_STATISTICS
        Changed to use new ha_... calls
      sql/sql_table.cc:
        Changed to use new ha_... calls
      sql/sql_udf.cc:
        Changed to use new ha_... calls
      sql/sql_update.cc:
        Changed to use new ha_... calls
      sql/sql_yacc.yy:
        Add new show and flush commands
      sql/structs.h:
        Add name_length to KEY to avoid some strlen
        Added cache_name to KEY for fast storage of keyvalue in cache
        Added structs USER_STATS, TABLE_STATS, INDEX_STATS
        Added function prototypes for statistics functions
      sql/table.cc:
        Store db+table+index name into keyinfo->cache_name
      sql/table.h:
        Added new information schema tables
      sql/tztime.cc:
        Changed to use new ha_... calls
      ab0905c6
  9. 17 Oct, 2009 1 commit
  10. 16 Oct, 2009 9 commits
    • Sergey Petrunya's avatar
      MBUG#452116: MariaDB: mysql_install_db causes server segfault · 52cb2344
      Sergey Petrunya authored
      - Increase thread_stack_size on 64-bit platforms to 240K, so that 
        it can accomodate the HA_CHECK structure which is 130K.
      
      
      52cb2344
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · f7526c06
      Alexander Ivanov authored
      Merge from trunk.
      f7526c06
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · 56af9edf
      Alexander Ivanov authored
      Add test-suite.
      56af9edf
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · c26749b4
      Alexander Ivanov authored
      Add --rewrite-db option to mysqlbinlog.
      c26749b4
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · c12c675d
      Alexander Ivanov authored
      Add Rpl_filter to mysqlbinlog.cc
      Note. Though within MWL#36 we are going to use only two Rpl_filter's
            methods (add_db_rewrite and get_rewrite_db), we look forward for
            MWL#40 where Rpl_filter is likely to be used to its more extent.
      Note. Within MWL#36 we will not use Rpl_filter for supporting --database
            option: this option allows to specify only one database what
            doesn't correlate with Rpl_filter::add_do_db() (using this method
            will either appear "artificial" or require changing --database
            semantics). To be discussed within MWL#40.
      To add Rpl_filter we need:
      1. include sql_string.h
         There are two instances of sql_string.* files - in sql and in client
         directories. We need to use the ones from the sql dir.
      2. include sql_list.h
         This requires to define a client version of sql_alloc() function.
      3. include rpl_filter.h
         This requires a definition of system_charset_info variable.
         Besides, Rpl_filter::tables_ok() refers to a TABLE_LIST structure which
         encounts deep non-client dependencies and can't be used here as is. On
         the other hand, tables_ok() make use only few TABLE_LIST's members and
         none of them depends on specific server context. This allows to redefine
         TABLE_LIST in a client context so that tables_ok() becomes admissible
         (surely it's a kind of hack but (at least currently) it's better than
         #ifndef'ing this method in Rpl_filter definition).
      Also add Rpl_filter::rewrite_db_is_empty() method. This is needed to be
      able to check that --rewrite-db is not used jointly with --base64-output=
      always (this is not supported - at least currently).
      c12c675d
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · ef5874d1
      Alexander Ivanov authored
      Add rewrite_db() member to the Table_map_log_event class.
      Each RBR-event in binary log is preceded by a Table_map event
      containing a (db_id, db_name) pair. The rewrite_db(new_name)
      function replaces db_name by new_name in a buffer containing
      Table_map event read from the binary log.
      ef5874d1
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · 6bc7eab1
      Alexander Ivanov authored
      Make sql_alloc() declaration "public" for a client context.
      The reason is that sql_alloc() is used in definition of some common
      purpose stuff (e.g. sql_list.*). To make this stuff available for a
      client context we declare sql_alloc() as a "virtual function", i.e.
      as a function that is already declared but must be defined in this
      context (note that definition of sql_alloc() in thr_malloc.cc is
      #ifndef'ed for MYSQL_CLIENT).
      Also make sql_string.h repeatedly includable.
      
      6bc7eab1
    • Peter Lieverdink's avatar
      Merged with itself. Win! · c4f5fc85
      Peter Lieverdink authored
      c4f5fc85
    • Peter Lieverdink's avatar
  11. 15 Oct, 2009 1 commit
  12. 14 Oct, 2009 2 commits
  13. 13 Oct, 2009 2 commits
  14. 12 Oct, 2009 5 commits
  15. 11 Oct, 2009 3 commits