1. 19 Jun, 2006 1 commit
    • unknown's avatar
      Fix of test suite in scope of fixing BUG#18023: IM: instance · 72335c66
      unknown authored
      can be started several times; monitor interval must be > 2sec
      
      
      mysql-test/r/im_daemon_life_cycle.result:
        Updated result file.
      mysql-test/r/im_life_cycle.result:
        Updated result file.
      mysql-test/r/im_utils.result:
        Updated result file.
      mysql-test/t/im_daemon_life_cycle-im.opt:
        Set monitoring interval to 1 second in order to:
          - be consistent with 5.1;
          - speed up tests;
      mysql-test/t/im_daemon_life_cycle.imtest:
        1. Use wait_for_start.sh script to minimize chance of race condition.
        2. Polishing.
      mysql-test/t/im_life_cycle.imtest:
        1. Use wait_for_start.sh and wait_for_stop.sh scripts to
           minimize chance of race condition;
        2. Remove some statements, because there is no way now to
           stabilize their output.
        3. Polishing;
      mysql-test/t/im_utils.imtest:
        1. Use wait_for_start.sh script to minimize chance of race condition.
        2. Polishing.
      mysql-test/t/kill_n_check.sh:
        1. Make timeout configurable by command-line argument;
        2. Change algorithm of waiting for process to restart to be
           more robust.
      mysql-test/t/im_life_cycle-im.opt:
        Set monitoring interval to 1 second in order to:
          - be consistent with 5.1;
          - speed up tests;
      mysql-test/t/im_utils-im.opt:
        Set monitoring interval to 1 second in order to:
          - be consistent with 5.1;
          - speed up tests;
      mysql-test/t/wait_for_process.sh:
        A new helper script, intended to be used instead of dummy "sleep"
        when waiting for some process to start or stop.
      72335c66
  2. 16 Jun, 2006 1 commit
    • unknown's avatar
      Fix for bug#13479 "REPLACE activates UPDATE trigger, not the DELETE and · 1deced68
      unknown authored
      INSERT triggers".
      
      In cases when REPLACE was internally executed via update and table had
      on update (on delete) triggers defined we exposed the fact that such
      optimization used by callng on update (not calling on delete) triggers.
      Such behavior contradicts our documentation which describes REPLACE as
      INSERT with optional DELETE.
      
      This fix just disables this optimization for tables with on delete triggers.
      The optimization is still applied for tables which have on update but have
      no on delete triggers, we just don't invoke on update triggers in this case
      and thus don't expose information about optimization to user.
      
      Also added test coverage for values returned by ROW_COUNT() function (and
      thus for values returned by mysql_affected_rows()) for various forms of
      INSERT.
      
      
      mysql-test/r/insert.result:
        Added test for values returned by ROW_COUNT() function (and thus for values
        returned by mysql_affected_rows()) for various forms of INSERT. We didn't
        have coverage for this before and since this fix touches related code it is
        better to add it now.
      mysql-test/r/trigger.result:
        Adjusted test after fixing bug#13479 "REPLACE activates UPDATE trigger, not
        the DELETE and INSERT triggers".
      mysql-test/t/insert.test:
        Added test for values returned by ROW_COUNT() function (and thus for values
        returned by mysql_affected_rows()) for various forms of INSERT. We didn't
        have coverage for this before and since this fix touches related code it is
        better to add it now.
      mysql-test/t/trigger.test:
        Adjusted test after fixing bug#13479 "REPLACE activates UPDATE trigger, not
        the DELETE and INSERT triggers".
      sql/sql_insert.cc:
        write_record():
          We should not expose that internally we sometimes execute REPLACE
          via UPDATE instead of documented INSERT + DELETE pair. So we should not
          use this optimization for tables with on delete triggers. OTOH it is ok
          to use it for tables which have on update but have no on delete triggers,
          we just should not invoke on update triggers in this case.
      1deced68
  3. 01 Jun, 2006 15 commits
    • unknown's avatar
      Post-merge fixes · 3b1855f6
      unknown authored
      3b1855f6
    • unknown's avatar
      Merge rurik.mysql.com:/home/igor/mysql-5.0 · 7a85abb1
      unknown authored
      into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
      
      7a85abb1
    • unknown's avatar
      Merge zippy.(none):/home/cmiller/work/mysql/mysql-5.0-maint · b1a27c63
      unknown authored
      into  zippy.(none):/home/cmiller/work/mysql/mysql-5.0
      
      b1a27c63
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 7a335ba4
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.0
      
      7a335ba4
    • unknown's avatar
      Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0 · 39165b48
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
      
      39165b48
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/mysql-5.0 · a1c1e775
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      a1c1e775
    • unknown's avatar
      Add define YASSL_PREFIX when compiling yassl · 0ba9d601
      unknown authored
      0ba9d601
    • unknown's avatar
      Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0 · ed2d48b8
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
      
      ed2d48b8
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/50-work · c2283d45
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
      
      c2283d45
    • unknown's avatar
      Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0 · 67185cdf
      unknown authored
      into  mysql.com:/home/marty/MySQL/mysql-5.0
      
      67185cdf
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/41-work · 11c05d2d
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/50-work
      
      
      ndb/src/kernel/blocks/ERROR_codes.txt:
        Auto merged
      ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
        Auto merged
      ndb/test/ndbapi/testNodeRestart.cpp:
        Auto merged
      ndb/test/run-test/daily-basic-tests.txt:
        Auto merged
      11c05d2d
    • unknown's avatar
      ndb - bug#20185 · 0eb906ef
      unknown authored
        Dont be too aggressive in Dbtc::nodeFailCheckTransaction
        let it timeout by 1, so that it does not assert that it has waited too long
        old impl. set timeotu value to 0, making timeout = (ctcTimer - 0) which could be quite big.
      
      
      ndb/src/kernel/blocks/ERROR_codes.txt:
        error codes
      ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
        2 new error inserts
        7030 - delay in GCP_PREPARE until checkLocalNodefailComplete is true
        7031 - delay in GCP_PREPARE and die
      ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
        Dont set api con timer to 0, as this might trigger asserion in timeoutfound lab if state == PREPARE_TO_COMMIT
      ndb/test/ndbapi/testNodeRestart.cpp:
        testcase
      ndb/test/run-test/daily-basic-tests.txt:
        autotest
      0eb906ef
    • unknown's avatar
      Post-merge fixes · 9a09091f
      unknown authored
      9a09091f
    • unknown's avatar
      Manual merge · 2b343790
      unknown authored
      2b343790
    • unknown's avatar
      Merge rurik.mysql.com:/home/igor/tmp_merge · 992a20fc
      unknown authored
      into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
      
      
      BitKeeper/deleted/.del-errmsg.txt~31abf77f9e7b9211:
        Auto merged
      BitKeeper/deleted/.del-sql_state.h~4307ea5f1fe99019:
        Auto merged
      mysql-test/r/explain.result:
        Auto merged
      mysql-test/r/key_cache.result:
        Auto merged
      mysql-test/r/preload.result:
        Auto merged
      mysql-test/t/explain.test:
        Auto merged
      mysql-test/t/select.test:
        Auto merged
      scripts/make_win_src_distribution.sh:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      BitKeeper/deleted/.del-errmsg.txt~11edc4db89248c16:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~184eb1f09242dc72:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~2cdeb8d6f80eba72:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~4617575065d612b9:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~587903f9311db2d1:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~606dfaeb9e81aa4e:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~6bbd9eac7f0e6b89:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~7397c423c52c6d2c:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~898865062c970766:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~8ed1999cbd481dc4:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~94a93cc742fca24d:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~9dab24f7fb11b1e1:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~b44a85a177954da0:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~b6181e29d8282b06:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~ba132dc9bc936c8a:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~e2609fdf7870795:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~e3183b99fbba0a9c:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~eeb2c47537ed9c23:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~ef28b592c7591b7:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~ef53c33ac0ff8a84:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~f19bfd5d4c918964:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e:
        Manual merge
      BitKeeper/deleted/.del-errmsg.txt~ffe4a0c9e3206150:
        Manual merge
      BitKeeper/deleted/.del-mysqld_error.h~9dac75782467aab7:
        Manual merge
      992a20fc
  4. 31 May, 2006 14 commits
    • unknown's avatar
      Merge msvensson@bk-internal.mysql.com:/home/bk/mysql-5.0 · 48723fcb
      unknown authored
      into  devsrv-b.mysql.com:/users/msvensson/mysql-5.0
      
      48723fcb
    • unknown's avatar
      Import patch from yaSSL · ee41dd77
      unknown authored
       - avoid allocating memory for each call to 'EVP_md5' and 
         'EVP_des_ede3_cbc' which were not released until server was stopped
       - Those functions are used from the SQL function 'des_encrypt' and
         'des_decrypt'.
      
      
      extra/yassl/include/openssl/ssl.h:
        Import patch yassl.diff
      extra/yassl/include/yassl_int.hpp:
        Import patch yassl.diff
      extra/yassl/src/ssl.cpp:
        Import patch yassl.diff
      extra/yassl/src/template_instnt.cpp:
        Import patch yassl.diff
      extra/yassl/src/yassl_int.cpp:
        Import patch yassl.diff
      ee41dd77
    • unknown's avatar
      Add define YASLSL_PREFIX · 8487afee
      unknown authored
      
      extra/yassl/src/Makefile.am:
        Add defined YASSL_PREFIX when building yassl/src
      extra/yassl/testsuite/Makefile.am:
        Add defined YASSL_PREFIX when building yassl/testsuite
      8487afee
    • unknown's avatar
    • unknown's avatar
      Import from yaSSL · 2f4bfdf0
      unknown authored
      
      extra/yassl/include/openssl/crypto.h:
        Import patch yassl.diff
      extra/yassl/include/openssl/ssl.h:
        Import patch yassl.diff
      2f4bfdf0
    • unknown's avatar
      Bug#14157: utf8 encoding in binlog without set character_set_client · 4cae5175
      unknown authored
      adapting to pushbuild's custom to switch from default pathes. The name for
      var directory must be set with MYSQLTEST_VARDIR.
      
      
      mysql-test/t/mysqlbinlog.test:
        correction of log path since pushbuild uses non-default options.
      4cae5175
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/bug19575/my50-bug19575 · 8ef2e85f
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.0
      
      
      extra/yassl/include/openssl/ssl.h:
        Auto merged
      8ef2e85f
    • unknown's avatar
      Bug#20022 mysql-test-run can't be run with secure connections turned on for all testcases · e70f6e1e
      unknown authored
       - Part 1, fixes rpl- and federated-tests where connection is made to 127.0.0.1
      
      
      client/mysqltest.c:
        Turn on ssl_verify_server_cert only if host is "localhost"
      e70f6e1e
    • unknown's avatar
      Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init · ecfe1dd0
      unknown authored
       - Include prefix files that renames all public functions in yaSSLs
         OpenSSL API to ya<function_name>. They will otherwise conflict
         with OpenSSL functions if loaded by an application that uses OpenSSL
         as well as libmysqlclient with yaSSL support.
      
      
      client/Makefile.am:
        Remove $yassl_includes
        ...and one "suspicious line"
      config/ac-macros/yassl.m4:
        Remove yassl_includes as they are the same as "normal" include
      extra/yassl/include/openssl/crypto.h:
        Add include file "prefix_crypto.h" to rename SSL_* functions to yaSSL_*
      extra/yassl/include/openssl/ssl.h:
        Add include file "prefix_crypto.h" to rename SSL_* functions to yaSSL_*
      libmysql/Makefile.am:
        Remove yassl_includes
      libmysql_r/Makefile.am:
        Remove yassl_includes
      libmysqld/Makefile.am:
        Remove yassl_includes
        And one suspicious line
      libmysqld/examples/Makefile.am:
        Remove yassl_includes
      server-tools/instance-manager/Makefile.am:
        Remove yassl_includes
      sql/Makefile.am:
        Remove yassl_includes
      tools/Makefile.am:
        Add link with yaSSL libs
      vio/Makefile.am:
        Remove yassl_includes
      extra/yassl/include/openssl/generate_prefix_files.pl:
        Add utility script to parse the header files to generate the prefix_* files that renames yaSSL SSL_* functions
      extra/yassl/include/openssl/prefix_crypto.h:
        Add prefix file for crypto.h
      extra/yassl/include/openssl/prefix_ssl.h:
        Add prefix file for ssl.h
      ecfe1dd0
    • unknown's avatar
      Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0 · 518c4782
      unknown authored
      into  mysql.com:/home/marty/MySQL/mysql-5.0
      
      
      ndb/src/ndbapi/NdbDictionaryImpl.cpp:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      518c4782
    • unknown's avatar
      Bug#18235: assertion/crash when windows mysqld is ended with ctrl-c · 1664f990
      unknown authored
      Two threads both try a shutdown sequence which creates a race to the
      de-init/free of certain resources.
      
      This exists in similar form in the client as 17926: "mysql.exe crashes
      when ctrl-c is pressed in windows."
      
      
      sql/mysqld.cc:
        We have three potential ways of hitting the iceberg:
        - unireg_end()   has basic de-init
        - unireg_abort() has extended de-init
        - main() has a de-init sequence similar to unireg_abort()
        
        In the Windows version of the server, Control-C is handled
        in a different thread from the one main() is in.  The main
        loop is told to end, then unireg_abort() is called.  Its
        de-init and that of main() will then race each other for
        mutex- and cond-var-destroys, free(), and finally exit().
        
        This patch introduces a special case for Windows that will eliminate
        the race by ending the signal-handler via unireg_end() instead if
        SIGINT is signalled.  This seems the least intrusive fix that still
        fixes user-visible behaviour.
      1664f990
    • unknown's avatar
      BUG#14157: utf8 encoding in binlog without set character_set_client · 65585ee3
      unknown authored
      missed table to drop after merge from 4.1 
      
      
      mysql-test/r/mysqlbinlog.result:
        result changed
      mysql-test/t/mysqlbinlog.test:
        manual merge post-fix
      65585ee3
    • unknown's avatar
      Merge dl145k.mysql.com:/tmp/andrei/MERGE/mysql-4.1 · 1956a1a4
      unknown authored
      into  dl145k.mysql.com:/tmp/andrei/MERGE/5.0
      
      
      BitKeeper/deleted/.del-config.guess~fd94a91a69a8ce8:
        Auto merged
      BitKeeper/deleted/.del-config.sub~d18f703b655db258:
        Auto merged
      BitKeeper/deleted/.del-ltmain.sh~9b8b907df176f96e:
        Auto merged
      mysql-test/t/mysqlbinlog.test:
        manual merge, accepting 4.1 mods
      sql/sql_class.cc:
        use local, Ramil explained it's a backport
      1956a1a4
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 377e669e
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.0
      
      377e669e
  5. 30 May, 2006 9 commits
    • unknown's avatar
      Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-5.0 · 54822a0d
      unknown authored
      into  mysql.com:/space/pekka/ndb/version/my50
      
      54822a0d
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint · 9d378780
      unknown authored
      into  mysql.com:/mnt/storeage/mysql-5.0-maint_bug18669
      
      
      sql/sql_parse.cc:
        Auto merged
      9d378780
    • unknown's avatar
      Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0 · a08bcfd9
      unknown authored
      into  mysql.com:/usr/home/ram/work/mysql-5.0
      
      a08bcfd9
    • unknown's avatar
      Merge mysql.com:/home/alik/MySQL/devel/5.0-rt · 4bf4ff1a
      unknown authored
      into  mysql.com:/home/alik/MySQL/devel/5.0-tree
      
      4bf4ff1a
    • unknown's avatar
      Merge mysql.com:/usr/home/ram/work/mysql-4.1 · 934ad5ba
      unknown authored
      into  mysql.com:/usr/home/ram/work/mysql-5.0
      
      
      client/mysqlbinlog.cc:
        merge
      934ad5ba
    • unknown's avatar
      Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1 · 291b58b3
      unknown authored
      into  rurik.mysql.com:/home/igor/mysql-4.1
      
      291b58b3
    • unknown's avatar
      Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX · 031cf6a3
      unknown authored
      refers to a column name.
      
      
      mysql-test/r/select.result:
        Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
        refers to a column name.
        Added a new test case.
      mysql-test/t/select.test:
        Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
        refers to a column name.
        Added a new test case.
      sql/share/czech/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/danish/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/dutch/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/english/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/estonian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/french/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/german/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/greek/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.\
      sql/share/hungarian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/italian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/japanese-sjis/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.\
      sql/share/japanese/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/korean/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/norwegian-ny/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/norwegian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/polish/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/portuguese/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/romanian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/russian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/serbian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/slovak/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/spanish/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/swedish/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      sql/share/ukrainian/errmsg.txt:
        Removed error message ER_INDEX_DOES_NOT_EXIST,
        used ER_KEY_DOES_NOT_EXITS instead.
      031cf6a3
    • unknown's avatar
      Bug#17204 "second CALL to procedure crashes Server" · 0838a57e
      unknown authored
      Bug#18282 "INFORMATION_SCHEMA.TABLES provides inconsistent info about invalid views"
      This bug caused crashes or resulted in wrong data being returned
      when one tried to obtain information from I_S tables about views
      using stored functions.
      
      It was caused by the fact that we were using LEX representing
      statement which were doing select from I_S tables as active LEX
      when contents of I_S table were built. So state of this LEX both
      affected and was affected by open_tables() calls which happened
      during this process. This resulted in wrong behavior and in
      violations of some of invariants which caused crashes.
      
      This fix tries to solve this problem by properly saving/resetting
      and restoring part of LEX which affects and is affected by the
      process of opening tables and views in get_all_tables() routine.
      To simplify things we separated this part of LEX in a new class
      and made LEX its descendant.
      
      
      mysql-test/r/information_schema_db.result:
        test case
      mysql-test/t/information_schema_db.test:
        test case
      sql/sql_lex.cc:
        To simplify saving/resetting and restoring part of LEX which
        affects and is affected by the process of opening tables and
        views we moved it to new class Query_tables_list and made LEX
        descendant of this class. Also introduced two LEX methods 
        which can be used to save and reset or to restore this state.
      sql/sql_lex.h:
        To simplify saving/resetting and restoring part of LEX which
        affects and is affected by the process of opening tables and
        views we moved it to new class Query_tables_list and made LEX
        descendant of this class. Also introduced two LEX methods 
        which can be used to save and reset or to restore this state.
      sql/sql_show.cc:
        Now in get_all_tables() routine we properly save/reset and
        restore part of LEX (statement table list and information
        about routines used) which affects and is affected by the
        process of opening tables and views.
      sql/sql_table.cc:
        Now we clean-up LEX after opening table (view) in two stages.
        In the first stage we call LEX::cleanup_after_one_table_open()
        to clean-up selects lists and derived tables state. In the
        second stage which happens after close_thread_tables() is
        invoked we call Query_tables_list::reset_query_tables_list(FALSE)
        to rollback changes in Query_tables_list.
      0838a57e
    • unknown's avatar
      Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-5.0 · 608c6972
      unknown authored
      into  mysql.com:/space/pekka/ndb/version/my50
      
      608c6972