1. 14 Oct, 2004 4 commits
  2. 13 Oct, 2004 9 commits
    • unknown's avatar
      e82bcce7
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · c45f9d12
      unknown authored
      into mysql.com:/media/sda1/mysql/mysql-4.1-5985
      
      
      sql/sql_class.h:
        Auto merged
      c45f9d12
    • unknown's avatar
      A fix and test case for Bug#5985 ""prepare stmt from "select rand(?)" · e7a0d543
      unknown authored
      crashes server." The fix makes Item_func_rand prepared-statements
      aware plus it fixes the case when RAND is used in prepared
      statements and replication is on (as well as several similar issues).
      Until now we did not reset THD before every execution of a prepared
      statement, so if some execution had set thd->time_zone_used
      or thd->rand_used they would not be reset until next mysql_parse.
      Some of post-review fixes done.
      
      
      mysql-test/r/ps.result:
        A test case for Bug#5985: test results fixed.
      mysql-test/t/ps.test:
        A test case for Bug#5985 "prepare stmt from "select rand(?)" crashes
        server."
      sql/item_func.cc:
        Actual fix for Bug#5985: Item_func_rand rewritten to be 
        prepared statements aware.
      sql/item_func.h:
        Actual fix for Bug#5985: Item_func_rand rewritten to be 
        prepared statements aware.
      sql/mysql_priv.h:
        We need a separate call to reset THD state before every execute of
        a prepared statement. Otherwise things like THD->user_var_events
        are never cleaned up and bloat binary log (as the list of events
        grows from execution to execution).
      sql/sql_class.cc:
        Statement::end_statement -> THD::end_statement()
        (a leftover from some design change which is not to pushed now, but the
        leftover is to be pushed).
      sql/sql_class.h:
        Statement::end_statement -> THD::end_statement()
        (a leftover from some design change which is not to pushed now, but the
        leftover is to be pushed).
      sql/sql_lex.cc:
        Move the part responsible for initializing LEX from mysql_init_query
        to lex_start.
      sql/sql_lex.h:
        All lex-related initialization is now in lex_start.
        Move thd->select_number to lex->select_number to be able to use it
        easily in lex_start.
      sql/sql_parse.cc:
        Split mysql_init_query into two functions: mysql_reset_thd_for_next_query,
        which is used in PS and conventional execution, and lex_start, used only
        when we want to parse something.
        Fix init_connect to use initialized THD.
      sql/sql_prepare.cc:
        Deploy mysql_reset_thd_for_next_query to reset THD state before
        execution of a prepared statement.
        Normally this should have been added to just one place, but
        we have to reset thd before assigning placeholders from variables,
        thus we can't do that in execute_stmt (yuck).
      e7a0d543
    • unknown's avatar
      srv0srv.c, log0log.c, srv0srv.h, ha_innodb.cc, ha_innodb.h: · 522b175c
      unknown authored
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      
      
      sql/ha_innodb.h:
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      sql/ha_innodb.cc:
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      innobase/include/srv0srv.h:
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      innobase/log/log0log.c:
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      innobase/srv/srv0srv.c:
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      522b175c
    • unknown's avatar
      Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-4.1 · d591fcee
      unknown authored
      into mysql.com:/home/mydev/mysql-4.1
      
      d591fcee
    • unknown's avatar
      BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S). · ee0892aa
      unknown authored
      BUG#4335 - one name can be handler open'ed many times.
      Fixed problems detected on Windows build by VC++.
      Removed unused variables.
      Applied a neccessary cast.
      
      ee0892aa
    • unknown's avatar
      tests/client_test.c: · 8a559cfe
      unknown authored
        Make checks (asserts) performed in client_test.c work in non-debug
        builds.
      
      
      tests/client_test.c:
        Make checks (asserts) performed in client_test.c work in non-debug
        builds: all asserts/DBUG_ASSERTs replaced with if (!(expr)) abort();
      8a559cfe
    • unknown's avatar
      InnoDB: correct potential overflow in trx_purge() · b51562ed
      unknown authored
      
      innobase/trx/trx0purge.c:
        trx_purge(): avoid overflow in setting srv_dml_needed_delay
      b51562ed
    • unknown's avatar
      fix for some build/test errors for 4.1.6 · b37f86a3
      unknown authored
      b37f86a3
  3. 12 Oct, 2004 6 commits
    • unknown's avatar
      Move Heikki's comment about thd->query comment to proper place · f8fe986c
      unknown authored
      (bad merge from 4.0)
      
      
      sql/sql_class.h:
        Move a comment to proper place (bad merge from 4.0)
      f8fe986c
    • unknown's avatar
      post-commit: · 2e4f7ae7
      unknown authored
        Added catch for (example) WL#1234 into bk commit subjects
      
      
      BitKeeper/triggers/post-commit:
        Added catch for (example) WL#1234 into bk commit subjects
      2e4f7ae7
    • unknown's avatar
      ps.test, ps.result: a test case for Bug#6042 "constants · febdbf18
      unknown authored
      propogation works only once (prepared statements)".
      
      
      mysql-test/r/ps.result:
        Test case for Bug#6042: test results fixed
      mysql-test/t/ps.test:
        A test case for Bug#6042 "constants propogation works only once
        (prepared statements).
      febdbf18
    • unknown's avatar
      New tests for prepared statements: · 24db339f
      unknown authored
      - 'ps_10nestset' uses a "nested set" approach for an employee 
        hierarchy, then does arithmetic on the "salary" field;
        (soon) to be extended by inserts / deletes which imply
        mass updates on the "l"/"r" fields showing the set inclusion,
      - 'ps_11bugs' will get (some of ?) those bug DB entries which
        refer to prepared statements, but whose number does not appear
        in a test file comment - so it will also be extended.
      
      24db339f
    • unknown's avatar
      item.h: · cf19901a
      unknown authored
        A fix for Bug#6042 "constants propogation works olny once (prepared
        statements)": reset item->marker in Item::cleanup, as it's used
        in propogate_cond_constants. No test case as the only way I could
        come up with to show the problem is EXPLAIN, and EXPLAIN is painful
        to use in the test suite.
      
      
      sql/item.h:
        A fix for Bug#6042 "constants propogation works olny once (prepared
        statements)": reset item->marker in Item::cleanup, as it's used
        in propogate_cond_constants
      cf19901a
    • unknown's avatar
      NDB compile fix sol9x86 · 3908b8f8
      unknown authored
      
      ndb/include/kernel/LogLevel.hpp:
        compile fix sol9x86
      ndb/include/util/version.h:
        compile fix sol9x86
      ndb/src/common/util/version.c:
        compile fix sol9x86
      ndb/src/mgmsrv/Services.cpp:
        compile fix sol9x86
      3908b8f8
  4. 11 Oct, 2004 5 commits
  5. 10 Oct, 2004 8 commits
    • unknown's avatar
      Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1 · 01d299f7
      unknown authored
      into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b5382
      
      01d299f7
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1 · 34b5a761
      unknown authored
      into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
      
      34b5a761
    • unknown's avatar
      clean-up, indentation fixes. · 913e003b
      unknown authored
      
      mysql-test/t/outfile.test:
        this 'drop...' not needed anymore
      sql/sql_yacc.yy:
        indentation fixes
      913e003b
    • unknown's avatar
      692c4ee4
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1 · 4195d5e0
      unknown authored
      into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
      
      4195d5e0
    • unknown's avatar
      Fixes bug with tableImpl with blobs not being initialized properly w.r.t... · 95c21a25
      unknown authored
      Fixes bug with tableImpl with blobs not being initialized properly w.r.t pointer to blob tableImpl in column
          added blob to test to see that blob tables don't show up in show tables
          auto increment setting need not fetch blob tables (will otherwise generate error during table creation)
          moved addBlobTables out of fetchGlobalTableImpl to get_local_table_info
          changed addBlobTables to start from last column and break if all blobs added
          also addBlobTables will return -1 if failed (typically getTable)
          changed to using get_local_table_info with internal table name where applicable for efficiency
          added option to get_local_table_info wether to fetch blob tables or not
          getTable always fetches the blobtables
          moved addBlobTables to get_local_table_info to always be called, even if main table goes to cache only
      
      
      mysql-test/r/ndb_autodiscover.result:
        added blob to test to see that blob tables don't show up in show tables
      mysql-test/t/ndb_autodiscover.test:
        added blob to test to see that blob tables don't show up in show tables
      ndb/src/ndbapi/Ndb.cpp:
        auto increment setting need not fetch blob tables (will otherwise generate error during table creation)
      ndb/src/ndbapi/NdbDictionaryImpl.cpp:
        moved addBlobTables out of fetchGlobalTableImpl to get_local_table_info
        changed addBlobTables to start from last column and break if all blobs added
        also addBlobTables will return -1 if failed (typically getTable)
        changed to using get_local_table_info with internal table name where applicable for efficiency
      ndb/src/ndbapi/NdbDictionaryImpl.hpp:
        added option to get_local_table_info wether to fetch blob tables or not
        getTable always fetches the blobtables
        moved addBlobTables to get_local_table_info to always be called, even if main table goes to cache only
      95c21a25
    • unknown's avatar
      Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1 · d9f53f22
      unknown authored
      into gw.mysql.r18.ru:/usr/home/ram/work/4.1.gconcat
      
      
      sql/item_sum.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      d9f53f22
    • unknown's avatar
      Blob support for the group_concat() function. · 5acf251b
      unknown authored
      (Bug #4315: GROUP_CONCAT with ORDER BY returns strange results for TEXT fields
       Bug #5564: Strange behaviour with group_concat and distinct
       Bug #5970: group_concat doesn't print warnings)
      
      5acf251b
  6. 09 Oct, 2004 8 commits
    • unknown's avatar
      A small simplification: perform two actions at once, register a · c90fd2c4
      unknown authored
      change, and perform it (the new Item changes registry).
      
      
      sql/item.cc:
        A small simplification: perform two actions at once, register a
        change, and perform it.
      sql/item_cmpfunc.cc:
        register_item_tree_change -> change_item_tree
      sql/item_func.cc:
        register_item_tree_change -> change_item_tree
      sql/item_row.cc:
        register_item_tree_change -> change_item_tree
      sql/item_strfunc.cc:
        register_item_tree_change -> change_item_tree
      sql/sql_class.h:
        register_item_tree_change -> change_item_tree
      sql/sql_select.cc:
        register_item_tree_change -> change_item_tree
      c90fd2c4
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 338a38b6
      unknown authored
      into mysql.com:/media/sda1/mysql/mysql-4.1-hook
      
      
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      338a38b6
    • unknown's avatar
      A fix and test case for Bug#5987 "subselect in bool function · bcc6f615
      unknown authored
      crashes server (prepared statements)": the bug was that all boolean
      items always recovered its original arguments at statement cleanup 
      stage.
      This collided with Item_subselect::select_transformer, which tries to 
      permanently change the item tree to use a transformed subselect instead of
      original one.
      So we had this call sequence for prepare:
      mysql_stmt_prepare -> JOIN::prepare -> 
      Item_subselect::fix_fields -> the item tree gets transformed ->
      Item_bool_rowready_func2::cleanup, item tree is recovered to original
      state, while it shouldn't have been;
      mysql_stmt_execute -> attempts to execute a broken tree -> crash.
      Now instead of bluntly recovering all arguments of bool functions in 
      Item_bool_rowready_func2::cleanup, we recover only those
      which were changed, and do it in one place.
      There still would exist a possibility for a collision with subselect
      tranformation, if permanent and temporary changes were performed at the 
      same stage.
      But fortunately subselect transformation is always done first, so it 
      doesn't conflict with the optimization done by propogate_cond_constants.
      Now we have: 
      mysql_stmt_prepare -> JOIN::prepare -> subselect transformation 
      permanently changes the tree -> cleanup doesn't recover anything, 
      because nothing was registered for recovery.
      mysql_stmt_execute -> JOIN::prepare (the tree is already transformed, 
      so it doesn't change), JOIN::optimize -> 
      propogate_cond_constants -> temporary changes the item tree 
      with constants -> JOIN::execute -> cleanup -> 
      the changes done by propogate_cond_constants are recovered, as
      they were registered for recovery.
      
      
      mysql-test/r/ps.result:
        Bug#5987: test results fixed.
      mysql-test/t/ps.test:
        A test for bug#5987 "subselect in bool function crashes server 
        (prepared statements)"
      sql/item.cc:
        resolve_const_item is now responsible to register all changes of the 
        item tree for recovery
      sql/item.h:
        resolve_const_item signagture changed
      sql/item_cmpfunc.h:
        Arguments of boolean functions are now recovered using the 
        centralized registry of THD.
      sql/sql_class.cc:
        It's crucial to add new items to the beginning of the recovery list,
        so that the recovery is performed in LIFO mode: otherwise if we 
        change one node of a tree twice, it will be recovered to some intermediate
        state.
      sql/sql_select.cc:
        change_cond_ref_to_const and propogate_cond_constants are now responsible
        to register all changes of the item tree for recovery.
        The recovery is done using the centralized THD registry of
        changed tree items.
      bcc6f615
    • unknown's avatar
      Added possibility to use [GNR...] optional argument for · 285d66d5
      unknown authored
      mysqld_multi via mysqld_multi.server.sh
      
      285d66d5
    • unknown's avatar
      Added some extra information to output in case --verbose · 8cc0f7e6
      unknown authored
      was given.
      
      8cc0f7e6
    • unknown's avatar
      Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-4.1 · c5fe1823
      unknown authored
      into a193-229-222-2.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
      
      c5fe1823
    • unknown's avatar
      - Added --verbose · 3082911a
      unknown authored
      - Made some of the warnings under --verbose only
      - Added possibility to add mysqladmin= under groups [mysqldN]
        mysqladmin=... is no longer mandatory under [mysqld_multi]
      - Made 'start', 'stop' and 'report' commands truly case-insensitive
      - Some other common places code merge and cleanup
      
      3082911a
    • unknown's avatar
      Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1 · ac209a97
      unknown authored
      into sanja.is.com.ua:/home/bell/mysql/bk/work-ps-4.1
      
      ac209a97