1. 22 Mar, 2008 1 commit
    • unknown's avatar
      Fix result files (Bug#21854). · 9965de17
      unknown authored
      
      mysql-test/r/information_schema_db.result:
        Update result file.
      mysql-test/r/sp-security.result:
        Update result file.
      mysql-test/r/trigger_notembedded.result:
        Update result file.
      mysql-test/r/view_grant.result:
        Update result file.
      9965de17
  2. 21 Mar, 2008 2 commits
    • unknown's avatar
      A patch for Bug#21854: Problems with CREATE TRIGGER without · d05f6b9f
      unknown authored
      DEFINER clause in --skip-grant-tables mode.
      
      Update error message.
      
      
      mysql-test/r/information_schema_db.result:
        Update result file.
      mysql-test/r/sp-security.result:
        Update result file.
      mysql-test/r/trigger_notembedded.result:
        Update result file.
      mysql-test/r/view_grant.result:
        Update result file.
      sql/share/errmsg.txt:
        Update error message.
      d05f6b9f
    • unknown's avatar
      Fix tree. · 8eb01668
      unknown authored
      8eb01668
  3. 20 Mar, 2008 1 commit
  4. 19 Mar, 2008 2 commits
    • unknown's avatar
      Merge mysql.com:/Users/davi/mysql/mysql-5.0-runtime · 23d4ab3b
      unknown authored
      into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime
      
      
      include/my_pthread.h:
        Auto merged
      23d4ab3b
    • unknown's avatar
      Bug#30960 processlist state '*** DEAD ***' on recent 5.0.48 windows builds · edce44ee
      unknown authored
      The problem is that unimplemented WIN32 version of pthread_kill
      is returning ESRCH no matter the arguments, causing calls to
      mysqld_list_processes to set the procinfo to dead because
      pthread_kill returns non zero. The dead procinfo would show
      up on a second invocation of show processlist.
      
      
      include/my_pthread.h:
        When unimplemented, pthread_kill must return zero for
        any process id other then zero.
      edce44ee
  5. 18 Mar, 2008 6 commits
    • unknown's avatar
      Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 550de36c
      unknown authored
      into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
      
      
      sql/sql_acl.cc:
        Auto merged
      550de36c
    • unknown's avatar
      Merge adventure.(none):/home/thek/Development/cpp/bug25175/my51-bug25175 · ef82f206
      unknown authored
      into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
      
      
      ef82f206
    • unknown's avatar
      Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt · 66ca0765
      unknown authored
      into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
      
      
      libmysql/libmysql.c:
        Auto merged
      sql-common/client.c:
        Auto merged
      tests/mysql_client_test.c:
        Manually merged.
      66ca0765
    • unknown's avatar
      Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0 · f77686df
      unknown authored
      into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt-merged
      
      
      libmysql/libmysql.c:
        Auto merged
      sql-common/client.c:
        Auto merged
      tests/mysql_client_test.c:
        Manually merged.
      f77686df
    • unknown's avatar
      Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1 · 07db330a
      unknown authored
      into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
      
      
      libmysql/libmysql.c:
        Auto merged
      sql-common/client.c:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      07db330a
    • unknown's avatar
      Bug#25175 Too much memory used by MySQL grant system · 00182991
      unknown authored
      Each time the server reloads privileges containing table grants, the 
      system will allocate too much memory than needed because of badly
      chosen growth prediction in the underlying dynamic arrays.
      
      This patch introduces a new signature to the hash container initializer
      which enables a much more pessimistic approach in favour for more
      efficient memory useage.
      
      This patch was supplied by Google Inc.
      
      
      include/hash.h:
        * New signature for _hash_init.
        * Defined new function hash_init2 which takes growth_size argument.
      mysys/hash.c:
        * New signature for _hash_init.
      sql/sql_acl.cc:
        * Changed hash_init signature so that it takes a 'growth_size' smaller
        than the default. Each time a GRANT_TABLE is allocated a pre-allocated
        dynamic array is instantiated. A large growth size can result in too
        many unused hash-entries per table-entry and thus be a waste of free
        memory.
      00182991
  6. 17 Mar, 2008 5 commits
    • unknown's avatar
      Post-merge fixes for Bug 35103 · 80952259
      unknown authored
      
      libmysql/libmysql.c:
        Manual merge
      sql/sql_class.cc:
        Don't send anything back to the client if disabled.
      sql/sql_prepare.cc:
        Don't send any packet back for statement close.
      tests/mysql_client_test.c:
        Manual merge
      80952259
    • unknown's avatar
      Merge buzz.(none):/home/davi/mysql-5.0-runtime · ce34828e
      unknown authored
      into  buzz.(none):/home/davi/mysql-5.1-runtime
      
      
      sql-common/client.c:
        Auto merged
      sql/sql_prepare.cc:
        Manual merge
      tests/mysql_client_test.c:
        Manual merge
      libmysql/libmysql.c:
        Manual merge
      ce34828e
    • unknown's avatar
      Post-merge fix for Bug 35103. · 23d567aa
      unknown authored
      
      sql/sql_prepare.cc:
        Don't send unexpected error to the client.
      23d567aa
    • unknown's avatar
      Avoid races in connect.test. · c1e69a77
      unknown authored
      The problem was in a test case for Bug33507:
        - when the number of active connections reaches the limit,
          the server accepts only root connections. That's achieved by
          accepting a connection, negotiating with the client and
          checking user credentials. If it is not SUPER, the connection
          is dropped.
        - when the server accepts connection, it increases the counter;
        - when the server drops connection, it decreases the counter;
        - the race was in between of decreasing the counter and accepting
          new connection:
          - max_user_connections = 2;
          - 2 oridinary user connections accepted;
          - extra user connection is establishing;
          - server checked user credentials, and sent 'Too many connections'
            error;
          - the client receives the error and establishes extra SUPER user
            connection;
          - the server however didn't decrease the counter (the extra
            user connection still is "alive" in the server) -- so, the new
            SUPER-user connection, will be dropped, because it exceeds
            (max_user_connections + 1).
      
      The fix is to implement "safe connect", which makes several attempts
      to connect and use it in the test script.
      
      
      mysql-test/r/connect.result:
        Update test file.
      mysql-test/t/connect.test:
        Avoid races in connect.test.
      mysql-test/include/connect2.inc:
        Auxiliary routine to establish a connection reliably.
      c1e69a77
    • unknown's avatar
      A patch for Bug#35329: connect does not set mysql_errno variable. · 30d644f8
      unknown authored
      The problem was that 'connect' command didn't set mysql_errno
      variable, thus the script was unable to determine whether connection
      was opened or not.
      
      The fix is to set this variable.
      
      Test cases will be added in the scope of Bug33507
      into connect.test file.
      
      
      client/mysqltest.c:
        Set 'mysql_errno' variable.
      30d644f8
  7. 14 Mar, 2008 2 commits
    • unknown's avatar
      Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures · 063b5047
      unknown authored
      The problem was that the COM_STMT_SEND_LONG_DATA was sending a response
      packet if the prepared statement wasn't found in the server (due to
      reconnection). The commands COM_STMT_SEND_LONG_DATA and COM_STMT_CLOSE
      should not send any packets, even error packets should not be sent since
      they are not expected by the client API.
      
      The solution is to clear generated during the execution of the aforementioned
      commands and to skip resend of prepared statement commands. Another fix is
      that if the connection breaks during the send of prepared statement command,
      the command is not sent again since the prepared statement is no longer in the
      server.
      
      
      libmysql/libmysql.c:
        The mysql handle might be reset after a reconnection.
        Pass the now used stmt argument to cli_advanced_command.
      sql-common/client.c:
        Don't resend command if the connection broke and it's a prepared
        statement command. If the session is broken, prepared statements
        on the server are gone, set the error accordanly.
      sql/sql_prepare.cc:
        Clear any error set during the execution of the request
        command.
      tests/mysql_client_test.c:
        Fix memory leak by freeing result associated with statement.
        Remove test case for Bug 29948 because it's not reliable in
        5.0 (fixed in 5.1) due to KILL queries sending two packets for
        a thread that kills itself.
      063b5047
    • unknown's avatar
      A fix for Bug#35289: Too many connections -- wrong SQL state · 2ebee313
      unknown authored
      in some case.
      
      ER_CON_COUNT_ERROR is defined with SQL state 08004. However, this SQL state is not always
      returned.
      
      This error can be thrown in two cases:
      
        1. when an ordinary user (a user w/o SUPER privilege) is connecting,
          and the number of active user connections is equal or greater than
          max_connections.
      
        2. when a user is connecting and the number of active user connections is
          already (max_connections + 1) -- that means that no more connections will
          be accepted regardless of the user credentials.
      
      In the 1-st case, SQL state is correct.
      
      The bug happens in the 2-nd case -- on UNIX the client gets 00000 SQL state, which is
      absolutely wrong (00000 means "not error SQL state); on Windows
      the client accidentally gets HY000 (which means "unknown SQL state).
      
      The cause of the problem is that the server rejects extra connection
      prior to read a packet with client capabilities. Thus, the server
      does not know if the client supports SQL states or not (if the client
      supports 4.1 protocol or not). So, the server supposes the worst and
      does not send SQL state at all.
      
      The difference in behavior on UNIX and Windows occurs because on Windows
      CLI_MYSQL_REAL_CONNECT() invokes create_shared_memory(), which returns
      an error (in default configuration, where shared memory is not configured).
      Then, the client does not reset this error, so when the connection is
      rejected, SQL state is HY000 (from the error from create_shared_memory()).
      
      The bug appeared after test case for Bug#33507 -- before that, this behavior
      just had not been tested.
      
      The fix is to 1) reset the error after create_shared_memory();
      2) set SQL state to 'unknown error' if it was not received from
      the server.
      
      A separate test case is not required, since the behavior is already
      tested in connect.test.
      
      Note for doc-team: the manual should be updated to say that under
      some circumstances, 'Too many connections' has HY000 SQL state.
      
      
      mysql-test/r/connect.result:
        Update result file.
      sql-common/client.c:
        1. Reset an error from create_shared_memory();
        2. Set SQL state to 'unknown error' if it was not received from
           the server.
      2ebee313
  8. 13 Mar, 2008 6 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 64cba9ba
      unknown authored
      into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime
      
      
      64cba9ba
    • unknown's avatar
      Bug#34891 sp_notembedded.test fails sporadically · 416ab853
      unknown authored
      The problem is that since MyISAM's concurrent_insert is on by
      default some concurrent SELECT statements might not see changes
      made by INSERT statements in other connections, even if the
      INSERT statement has returned.
      
      The solution is to disable concurrent_insert so that INSERT
      statements returns after the data is actually visible to other
      statements.
      
      
      mysql-test/r/flush_read_lock_kill.result:
        Restore old value of @@global.concurrent_insert
      mysql-test/r/kill.result:
        Restore old value of @@global.concurrent_insert
      mysql-test/r/sp_notembedded.result:
        Update test case result
      mysql-test/t/flush_read_lock_kill.test:
        Restore old value of @@global.concurrent_insert so it
        doesn't affect other tests.
      mysql-test/t/kill.test:
        Restore old value of @@global.concurrent_insert so it
        doesn't affect other tests.
      mysql-test/t/sp_notembedded.test:
        Disable and restore concurrent_insert value at the end of the
        test case. The test case for Bug 29936 requires that the inserted
        rows need to be visible before a SELECT statement is queued in
        another connection.
        
        Remove sleep at the start of the test, it's not necessary to log
        the result of the processlist command, showing the warnings has
        the same end result.
      416ab853
    • unknown's avatar
      Merge quad.:/mnt/raid/alik/MySQL/devel/5.1-rt · 1f3c062b
      unknown authored
      into  quad.:/mnt/raid/alik/MySQL/devel/bug-35074/5.1-rt-bug35074
      
      
      1f3c062b
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/mysql-5.0-opt · 269ebe54
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.1-opt
      
      
      tests/mysql_client_test.c:
        Null merge.
      269ebe54
    • unknown's avatar
      Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures · f20fe94b
      unknown authored
        
      Disable test case for bug 29948, which is causing sporadically
      failures in other tests inside mysql_client_test.
      
      
      tests/mysql_client_test.c:
        Disable test case.
      f20fe94b
    • unknown's avatar
      Fix for Bug#35074: max_used_connections is not correct. · c167501b
      unknown authored
      The problem was that number of threads was used to calculate
      max_used_connections.
      
      The fix is to use number of active connections.
      
      
      mysql-test/r/connect.result:
        Update result file.
      mysql-test/t/connect.test:
        - Add a test case for Bug#35074: max_used_connections is not correct;
        - Make a test case for Bug#33507 more stable.
      sql/mysqld.cc:
        Use number of connections insetad of threads
        to calculate max_used_connections.
      c167501b
  9. 12 Mar, 2008 15 commits
    • unknown's avatar
      Fix manual merge. · 054341a6
      unknown authored
      054341a6
    • unknown's avatar
      Fix for Bug#33507: Event scheduler creates more threads · b279be38
      unknown authored
      than max_connections -- which results in user lockout.
      
      The problem was that the variable thread_count that contains
      the number of active threads was interpreted as a number of
      active connections.
      
      The fix is to introduce a new counter for active connections.
      
      
      mysql-test/r/connect.result:
        A test case for Bug#33507: Event scheduler creates more threads
        than max_connections -- which results in user lockout.
      mysql-test/t/connect.test:
        A test case for Bug#33507: Event scheduler creates more threads
        than max_connections -- which results in user lockout.
      sql/mysql_priv.h:
        1. Polishing: login_connection() and end_connection() need not
           to be public.
        
        2. Introduce connection_count -- a variable to contain the number
           of active connections. It is protected by LOCK_connection_count.
      sql/mysqld.cc:
        Use connection_count to count active connections.
      sql/sql_connect.cc:
        1. Use connection_count to count active connections.
        2. Make login_connection(), end_connection() private for the module
        as they had to be.
      b279be38
    • unknown's avatar
      3155a88d
    • unknown's avatar
      Fix manual merge. · d80e7ce4
      unknown authored
      d80e7ce4
    • unknown's avatar
      Merge quad.:/mnt/raid/alik/MySQL/devel/5.0-rt · d958f298
      unknown authored
      into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
      
      
      sql/sql_delete.cc:
        Manually merged.
      d958f298
    • unknown's avatar
      A fix for Bug#34643: TRUNCATE crash if trigger and foreign key. · 326c4e90
      unknown authored
        
      In cases when TRUNCATE was executed by invoking mysql_delete() rather
      than by table recreation (for example, when TRUNCATE was issued on
      InnoDB table with is referenced by foreign key) triggers were invoked.
      In debug builds this also led to crash because of an assertion, which
      assumes that some preliminary actions take place before trigger 
      invocation, which doesn't happen in case of TRUNCATE.
      
      The fix is not to execute triggers in mysql_delete() when this
      function is used by TRUNCATE.
      
      
      mysql-test/r/trigger-trans.result:
        Update result file.
      mysql-test/t/trigger-trans.test:
        A test case for Bug#34643: TRUNCATE crash if trigger and foreign key.
      sql/sql_delete.cc:
        Do not process triggers in TRUNCATE.
      326c4e90
    • unknown's avatar
      Merge quad.:/mnt/raid/alik/MySQL/devel/5.0-rt · b0fda34b
      unknown authored
      into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt
      
      
      tests/mysql_client_test.c:
        Manually merged.
      b0fda34b
    • unknown's avatar
      Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.1-opt · 6c2f9bf5
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.1-opt
      
      
      sql/sql_show.cc:
        Auto merged
      sql/table.h:
        Auto merged
      6c2f9bf5
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/mysql-5.0-opt · 9fcf16a0
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.1-opt
      
      
      tests/mysql_client_test.c:
        Manual merge.
      9fcf16a0
    • unknown's avatar
      Post-merge fix. · fe846378
      unknown authored
      fe846378
    • unknown's avatar
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/mysql-5.0-opt · 69d49bca
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.1-opt
      
      
      client/mysql.cc:
        Auto merged
      mysql-test/r/view.result:
        Auto merged
      mysql-test/t/view.test:
        Auto merged
      scripts/mysql_config.sh:
        Auto merged
      sql/filesort.cc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      69d49bca
    • unknown's avatar
      Merge kaamos.(none):/data/src/mysql-5.1 · d6df18dd
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.1-opt
      
      
      client/mysql.cc:
        Auto merged
      client/mysqldump.c:
        Auto merged
      configure.in:
        Auto merged
      include/my_global.h:
        Auto merged
      libmysql/libmysql.c:
        Auto merged
      libmysqld/lib_sql.cc:
        Auto merged
      mysql-test/include/mix1.inc:
        Auto merged
      mysql-test/r/create.result:
        Auto merged
      mysql-test/r/func_str.result:
        Auto merged
      mysql-test/r/innodb.result:
        Auto merged
      mysql-test/r/innodb_mysql.result:
        Auto merged
      mysql-test/r/select.result:
        Auto merged
      mysql-test/r/subselect.result:
        Auto merged
      mysql-test/t/create.test:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      sql/filesort.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sp.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_plugin.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      storage/ndb/src/kernel/blocks/backup/Backup.hpp:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      mysql-test/r/func_time.result:
        Manual merge.
      mysql-test/r/view.result:
        Manual merge.
      mysql-test/t/view.test:
        Manual merge.
      scripts/mysql_config.sh:
        Manual merge.
      sql-common/client.c:
        Manual merge.
      sql/sql_parse.cc:
        Manual merge.
      d6df18dd
    • unknown's avatar
      Merge kaamos.(none):/data/src/opt/mysql-4.1-opt · 66507ba8
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      66507ba8
    • unknown's avatar
      Merge kaamos.(none):/data/src/mysql-5.0 · 09f8a4af
      unknown authored
      into  kaamos.(none):/data/src/opt/mysql-5.0-opt
      
      
      client/mysql.cc:
        Auto merged
      sql/filesort.cc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      mysql-test/r/view.result:
        Manual merge.
      mysql-test/t/view.test:
        Manual merge.
      scripts/mysql_config.sh:
        Manual merge.
      09f8a4af