1. 12 Aug, 2005 1 commit
    • unknown's avatar
      InnoDB: Print more than 300 characters of queries in various error conditions, · babc9f5d
      unknown authored
      most notably deadlocked ones in SHOW INNODB STATUS. Fixes bug #7819.
      
      
      innobase/btr/btr0pcur.c:
        Adapt to changes in trx_print.
      innobase/include/trx0trx.h:
        Add max_query_len parameter to trx_print.
      innobase/lock/lock0lock.c:
        Adapt to changes in trx_print.
      innobase/row/row0ins.c:
        Adapt to changes in trx_print.
      innobase/row/row0sel.c:
        Adapt to changes in trx_print.
      innobase/row/row0umod.c:
        Adapt to changes in trx_print.
      innobase/row/row0upd.c:
        Adapt to changes in trx_print.
      innobase/srv/srv0srv.c:
        Adapt to changes in trx_print.
      innobase/trx/trx0trx.c:
        Add max_query_len parameter to trx_print.
      sql/ha_innodb.cc:
        Add max_query_len parameter to innobase_mysql_print_thd.
      babc9f5d
  2. 10 Aug, 2005 14 commits
    • unknown's avatar
      Merge xiphis.org:/usr/home/antony/work2/p2-bug10109.3 · 5329be86
      unknown authored
      into  xiphis.org:/usr/home/antony/work2/p2-bug10109.4
      
      
      mysql-test/t/insert_update.test:
        Auto merged
      mysql-test/r/insert_update.result:
        Auto merged
      sql/sql_class.h:
        discard bug10109 changes from 4.1
      sql/sql_insert.cc:
        merge bug10109 from 4.1 to 5.0
      sql/sql_parse.cc:
        discard bug10109 changes from 4.1
      5329be86
    • unknown's avatar
      Merge mysql.com:/home/psergey/mysql-5.0-bug12228-r4 · 42fec6b6
      unknown authored
      into mysql.com:/home/psergey/mysql-5.0-bug12228-r5
      
      
      mysql-test/r/type_bit.result:
        Auto merged
      mysql-test/t/sp-threads.test:
        Auto merged
      mysql-test/t/type_bit.test:
        Auto merged
      sql/sp.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      42fec6b6
    • unknown's avatar
      BUG#12228: Post review fixes: Added test case, code cleanup. · 6b9ec78b
      unknown authored
      
      mysql-test/r/sp-threads.result:
        Testcase for BUG#12228
      mysql-test/t/sp-threads.test:
        Testcase for BUG#12228
      sql/sp_cache.cc:
        BUG#12228: Post-review fixes: small code cleanup
      sql/sp_cache.h:
        BUG#12228: Post-review fixes: fixed the comment
      sql/sql_parse.cc:
        BUG#12228: Post-review fixes: in mysql_parse, flush obsolete SPs from the caches only if 
         the query hasn't been handled by the query cache.
      sql/sql_prepare.cc:
        BUG#12228: Post-review fixes: in mysql_stmt_prepare/execute, flush SP caches 
         "closer to the execution"
      6b9ec78b
    • unknown's avatar
      A fix and a test case for Bug#12243 "MySQL Server crashes with 2 · 6861b1bf
      unknown authored
      cursors (+ commit)" and Bug#11832 "Server crash with InnoDB + Cursors"
      See comments to the changed files.
      
      
      innobase/include/read0read.h:
        - add cursor_view_t::n_mysql_tables_in_use
      innobase/read/read0read.c:
        - maintain cursor_view_t::n_mysql_tables_in_use. InnoDB
        maintains trx->n_mysql_tables_in_use to know when it can auto-commit
        a read-only statement. When this count drops to zero,
        MySQL has ended processing of such statement and InnoDB can commit.
        Cursors should not break this invariant, and should exclude the tables
        used in a cursor from the count of active tables.
        When a cursor is closed, the number of its tables is added back, 
        to ensure that close_thread_tables->unlock_external->
        ha_innobase::external_lock(F_UNLCK) won't drop the count in trx 
        below zero.
      innobase/row/row0sel.c:
        - remove the restoration of the global read view from 
        row_search_for_mysql: MySQL may call row_search_for_mysql
        more than once when fetching a row for a cursor (e.g. if there
        is a WHERE clause that filters out some rows).
      sql/ha_innodb.cc:
        - add more verbose printout for the case when we close an InnoDB
        connection without priorlly issuing a commit or rollback. The problem
        should be investigated.
      tests/mysql_client_test.c:
        - add a test case for Bug#12243 "MySQL Server crashes with 2 cursors 
        (+ commit)"
      6861b1bf
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · cf1a9d3b
      unknown authored
      into  mysql.com:/home/kostja/mysql/mysql-5.0-12243
      
      
      cf1a9d3b
    • unknown's avatar
      Fix coding style. · ad729777
      unknown authored
      ad729777
    • unknown's avatar
      Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.0 · 259da9d1
      unknown authored
      into  linux.site:/home/reggie/bk/mysql-5.0-new
      
      
      server-tools/instance-manager/IMService.cpp:
        Auto merged
      259da9d1
    • unknown's avatar
      error message fixed · 2bd3255e
      unknown authored
      2bd3255e
    • unknown's avatar
      Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0 · ffbe897a
      unknown authored
      into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
      
      
      ffbe897a
    • unknown's avatar
      A fix for Bug#11901 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY join in · 8e9f6b19
      unknown authored
      subqry order by server crash": failing DBUG_ASSERT(curr_join == this)
      when opening a cursor.
      Ensure that for top-level join curr_join == join (always), 
      and thus fix the failing assert.
      curr_join is a hack to ensure that uncacheable subqueries can be
      re-evaluated safely, and should be never different from main join
      in case of top-level join.
      
      
      sql/sql_select.cc:
        - utilize tmp_join only if we evaluate an uncacheable subquery.
      sql/sql_select.h:
        - implement JOIN::is_top_level_join()
      tests/mysql_client_test.c:
        A test case for Bug#11901 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY
         join in subqry order by server crash"
      8e9f6b19
    • unknown's avatar
      Merge mysql.com:/usr/local/home/marty/MySQL/mysql-4.1 · 1900c79f
      unknown authored
      into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
      
      
      sql/ha_ndbcluster.cc:
        SCCS merged
      1900c79f
    • unknown's avatar
      0ba4be2b
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 8559ef62
      unknown authored
      into  mysql.com:/home/dlenev/src/mysql-5.0-bg12280
      
      
      sql/sql_parse.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      8559ef62
    • unknown's avatar
      Fix for bug #12280 "Triggers: crash if flush tables". · f6fff55e
      unknown authored
      We should not allow FLUSH statement to be executed inside both triggers
      and stored functions.
      
      
      mysql-test/r/sp-error.result:
        Updated test after replacing error, which is thrown when one uses FLUSH
        statement inside of stored function, with more specific.
        Also now we issue more general error when we barking about USE command
        in stored routines.
      mysql-test/r/trigger.result:
        Added test for bug #12280 "Triggers: crash if flush tables"
      mysql-test/t/sp-error.test:
        Updated test after replacing error, which is thrown when one uses FLUSH
        statement inside of stored function, with more specific.
        Also now we issue more general error when we barking about USE command
        in stored routines.
      mysql-test/t/trigger.test:
        Added test for bug #12280 "Triggers: crash if flush tables"
      sql/share/errmsg.txt:
        Removed ER_SP_NO_USE error. Now we use more general ER_SP_BADSTATEMENT in this
        case. Instead added error message for barking about statements which should not
        be allowed inside of stored functions or triggers.
        It is safe to do this since it is highly unprobable that someone will upgrade
        first to the new 5.0 release and then downgrade back to the old one.
      sql/sql_parse.cc:
        reload_acl_and_cache():
          FLUSH TABLES and FLUSH PRIVILEGES should not be allowed if we are inside
          of stored function or trigger.
      sql/sql_yacc.yy:
        We should not allow FLUSH statement inside both triggers and stored
        functions. Replaced error which is thrown in this case with more
        specific.
        Also now we issue more general ER_SP_BADSTATEMENT error when one tries
        to use USE command inside of stored routine.
      f6fff55e
  3. 09 Aug, 2005 16 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 03198127
      unknown authored
      into moonbone.local:/work/mysql-5.0-bug-12340
      
      
      03198127
    • unknown's avatar
      Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.0 · d3614012
      unknown authored
      into  monster.:D:/Work/mysql/mysql-5.0
      
      
      d3614012
    • unknown's avatar
      Some changes to project files · 741d3ae1
      unknown authored
      str_alloc had been added but was not added to mysqlclient and strings
      libmysql should have had strings as a dependent.
      
      
      VC++Files/client/mysqlclient.vcproj:
        Added missing file
      VC++Files/mysql.sln:
        Make libmysql dependendent on strings
      VC++Files/strings/strings.vcproj:
        Added missing file
      741d3ae1
    • unknown's avatar
      Fix bug #12340 Wrong comparison in ha_innobase::cmp_ref() · 71a8b11f
      unknown authored
      When PRIMARY KEY is present ha_innobase::cmp_ref() uses it to compare refs.
      After comparing part of key it moves pointers to compare next part.
      For varchar parts pointers were moved only by length of parts, not including
      bytes containig part length itself. This results in wrong comparision and
      wrong number of deleted records.
      
      
      
      sql/ha_innodb.cc:
        Fix bug #12340  ha_innobase::cmp_ref() moves pointers by wrong length.
      mysql-test/t/innodb.test:
        Test case for bug #12340 ha_innobase::cmp_ref() moves pointers by wrong length.
      mysql-test/r/innodb.result:
        Test case for bug #12340 ha_innobase::cmp_ref() moves pointers by wrong length.
      71a8b11f
    • unknown's avatar
      changes to IM code that came from Petr's review · f766a1dc
      unknown authored
      
      server-tools/instance-manager/IMService.cpp:
        syntax change requested by Petr
      server-tools/instance-manager/options.cc:
        return 1 instead of -1
      server-tools/instance-manager/options.h:
        changed return value of setup_windows_defaults to int from void
      f766a1dc
    • unknown's avatar
      removing trailing spaces · 81a24473
      unknown authored
      81a24473
    • unknown's avatar
      7a42570f
    • unknown's avatar
      changes to IM that came from Petr and JimW's review. · 5d8222cd
      unknown authored
      
      server-tools/instance-manager/IMService.cpp:
        make sure HandleServiceOptions returns 0 on success and 1 on failure
      server-tools/instance-manager/mysqlmanager.cc:
        default return value is 1.
        simplify some code bits by just jumping to err on error.
        move options.cleanup inside the err block.  In this case, the err block
        is more than just an error block.  It is the terminating block
        for both error and success.  You set return_value to 0 for success
        or leave it as 1 for failure.  This simplies this function a bit.
      server-tools/instance-manager/options.cc:
        remove the malloc for default password filename on Windows and replace
        with statically allocated memory.
        
        default Options:saved_argv to NULL so that we will know if we need
        to free it in cleanup()
        
        setup the default config file location for Windows inside the
        setup_windows_defaults function and remove this code from load()
        
        rework setup_windows_defaults so that it properly returns 0 on success
        and 1 on error and so it fills in the default location for the
        log file, password file, and config file.
      5d8222cd
    • unknown's avatar
      small corrections to the IM. · 530abb5c
      unknown authored
      
      server-tools/instance-manager/IMService.cpp:
        removed \n from log_info calls as these will be added automatically
      server-tools/instance-manager/user_map.cc:
        added back in support for password files using \r\n, this time
        without breaking the const contract.
      530abb5c
    • unknown's avatar
      Added missing cast. · 88c4ad24
      unknown authored
      88c4ad24
    • unknown's avatar
      Merged code. · 776713f4
      unknown authored
      776713f4
    • unknown's avatar
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 8e062962
      unknown authored
      into  mysql.com:/home/dlenev/src/mysql-5.0-is
      
      
      8e062962
    • unknown's avatar
      Fix after merging patch solving bug #10055 "Using stored function with · 48c12564
      unknown authored
      information_schema causes empty result set" with main tree.
      
      
      sql/sp_head.cc:
        Now close_thread_tables() does not have 4th 'stopper' argument.
      48c12564
    • unknown's avatar
      Fixed test that failed on 32 bit systems · c4228519
      unknown authored
      
      sql/ha_innodb.cc:
        Don't print not critical warning if log_warnings is not set
        Use sql_print_warning() instead of fprintf().
        (We should not use fprintf() as this causes problems on windows and with the embedded server)
      c4228519
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 8103db27
      unknown authored
      into  mysql.com:/home/dlenev/src/mysql-5.0-is
      
      
      mysql-test/r/information_schema.result:
        Auto merged
      mysql-test/t/information_schema.test:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sp.cc:
        Auto merged
      sql/sp.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      mysql-test/r/sp.result:
        Manual merge
      mysql-test/t/sp.test:
        Manual merge
      sql/sql_class.h:
        Manual merge
      8103db27
  4. 08 Aug, 2005 9 commits
    • unknown's avatar
      Fix for BUG#12228: SP cache code: · 502e97f8
      unknown authored
      * Cleanup SP Cache code, now SP Cache only deletes sp_head objects in 
        sp_cache_flush_obsolete() invalidates all pointers to routines in the cache.
      * Use new SP Cache use contract in the code.
      
      There is no test case because it doesn't seem to be possible to cause thread races to end
      the same way they end in heavy-load test. This patch removes the crash in heavy test.
      
      
      mysql-test/r/type_bit.result:
        Drop the tables this test tries to create
      mysql-test/r/view.result:
        Drop function this test creates
      mysql-test/t/type_bit.test:
        Drop the tables this test tries to create
      mysql-test/t/view.test:
        Drop function this test creates
      sql/sp.cc:
        Fix for BUG#12228: When a routine is deleted/modified, invalidate all cached SPs in all
        threads. We need to do so because sp_lex_keeper::{prelocking_tables, query_tables_own_last}
        in one SP may depend on another SP sp_lex_keeper::m_lex is using.
      sql/sp_cache.cc:
        Fix for BUG#12228:
        * Move class sp_cache to here from sp_cache.h, document the functions.
        * sp_cache_insert, sp_cache_remove, sp_cache_invalidate and sp_cache_lookup must not delete
          sp_head* objects as they may be called during SP execution when sp_head objects are used.
        * Added sp_cache_flush_obsolete() function that may delete sp_head objects.
        * Removed sp_cache_remove as there is no need for it now - when we change one SP we should
          invalidate all other SPs, because sp_lex_keeper::{prelocking_tables, 
          query_tables_own_last} from one SP depend on content of another SP (used in 
          sp_lex_keeper::m_lex).
      sql/sp_cache.h:
        Fix for BUG#12228:
        * Move class sp_cache to sp_cache.cc it is not needed in .h file
        * Added comments
      sql/sql_parse.cc:
        Fix for BUG#12228: Call new sp_cache_flush_obsolete() function before running the query
      sql/sql_prepare.cc:
        Fix for BUG#12228: Call new sp_cache_flush_obsolete() function before preparing/executing a PS
      502e97f8
    • unknown's avatar
      ha_innodb.cc: · 807a9c8d
      unknown authored
        Add a forgotten newline to a print
      
      
      sql/ha_innodb.cc:
        Add a forgotten newline to a print
      807a9c8d
    • unknown's avatar
      Merge mysql.com:/home/jimw/my/mysql-5.0-11570 · c4187de6
      unknown authored
      into  mysql.com:/home/jimw/my/mysql-5.0-clean
      
      
      mysql-test/t/sp.test:
        Auto merged
      c4187de6
    • unknown's avatar
      Fix error code in some tests because of merge · 05071ff4
      unknown authored
      
      mysql-test/t/errors.test:
        Fix error code
      mysql-test/t/type_bit.test:
        Fix error code
      mysql-test/t/type_bit_innodb.test:
        Fix error code
      05071ff4
    • unknown's avatar
      Merge mysql.com:/home/jimw/my/mysql-5.0-6080 · 1f01817e
      unknown authored
      into  mysql.com:/home/jimw/my/mysql-5.0-clean
      
      
      sql/sql_parse.cc:
        Auto merged
      sql/share/errmsg.txt:
        SCCS merged
      1f01817e
    • unknown's avatar
      Merge mysql.com:/home/jimw/my/mysql-5.0-3094 · 279846b4
      unknown authored
      into  mysql.com:/home/jimw/my/mysql-5.0-clean
      
      
      279846b4
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 9e3e0c87
      unknown authored
      into  mysql.com:/home/kostja/mysql/mysql-5.0-11909
      
      
      sql/sql_select.cc:
        Auto merged
      9e3e0c87
    • unknown's avatar
      A fix and a test case for Bug#11909 "mysql_stmt_attr_set · 76a280f1
      unknown authored
      CURSOR_TYPE_READ_ONLY nested queries corrupt result"
      
      
      sql/sql_prepare.cc:
        If there is a cursor, use its protocol for fetch: 
        Protocol instances have a state and thd->protocol_prep can't
        be used for multiple cursors.
      sql/sql_select.cc:
        - init Cursor::protocol
      sql/sql_select.h:
        - add Cursor::protocol
      tests/mysql_client_test.c:
        A test case for Bug#11909 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY
         nested queries corrupt result"
      76a280f1
    • unknown's avatar
      grant.result: · f4e06591
      unknown authored
        After merge fix
      
      
      mysql-test/r/grant.result:
        After merge fix
        ,
      f4e06591