1. 10 Aug, 2005 6 commits
    • unknown's avatar
      Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0 · bfa12451
      unknown authored
      into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
      
      bfa12451
    • unknown's avatar
      A fix for Bug#11901 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY join in · 33e8f20c
      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"
      33e8f20c
    • unknown's avatar
      Merge mysql.com:/usr/local/home/marty/MySQL/mysql-4.1 · d1bb342d
      unknown authored
      into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
      
      
      sql/ha_ndbcluster.cc:
        SCCS merged
      d1bb342d
    • unknown's avatar
      4a6c3e08
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · b2218cbb
      unknown authored
      into  mysql.com:/home/dlenev/src/mysql-5.0-bg12280
      
      
      sql/sql_parse.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      b2218cbb
    • unknown's avatar
      Fix for bug #12280 "Triggers: crash if flush tables". · 8ae80c39
      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.
      8ae80c39
  2. 09 Aug, 2005 12 commits
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0 · f7036646
      unknown authored
      into moonbone.local:/work/mysql-5.0-bug-12340
      
      f7036646
    • unknown's avatar
      Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.0 · 43cbc427
      unknown authored
      into  monster.:D:/Work/mysql/mysql-5.0
      
      43cbc427
    • unknown's avatar
      Some changes to project files · 80007771
      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
      80007771
    • unknown's avatar
      Fix bug #12340 Wrong comparison in ha_innobase::cmp_ref() · 5dd2b9a3
      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.
      5dd2b9a3
    • unknown's avatar
      removing trailing spaces · a7490db2
      unknown authored
      a7490db2
    • unknown's avatar
      small corrections to the IM. · 781bed12
      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.
      781bed12
    • unknown's avatar
      Added missing cast. · ad61cd9e
      unknown authored
      ad61cd9e
    • unknown's avatar
      Merged code. · 8a88fd69
      unknown authored
      8a88fd69
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 23bad435
      unknown authored
      into  mysql.com:/home/dlenev/src/mysql-5.0-is
      
      23bad435
    • unknown's avatar
      Fix after merging patch solving bug #10055 "Using stored function with · c7a9f2c2
      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.
      c7a9f2c2
    • unknown's avatar
      Fixed test that failed on 32 bit systems · b571e707
      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)
      b571e707
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 8fe9ebe5
      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
      8fe9ebe5
  3. 08 Aug, 2005 13 commits
    • unknown's avatar
      ha_innodb.cc: · 2c6cdb1e
      unknown authored
        Add a forgotten newline to a print
      
      
      sql/ha_innodb.cc:
        Add a forgotten newline to a print
      2c6cdb1e
    • unknown's avatar
      Merge mysql.com:/home/jimw/my/mysql-5.0-11570 · 4013f330
      unknown authored
      into  mysql.com:/home/jimw/my/mysql-5.0-clean
      
      
      mysql-test/t/sp.test:
        Auto merged
      4013f330
    • unknown's avatar
      Fix error code in some tests because of merge · 0dfcd5ae
      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
      0dfcd5ae
    • unknown's avatar
      Merge mysql.com:/home/jimw/my/mysql-5.0-6080 · 768e2794
      unknown authored
      into  mysql.com:/home/jimw/my/mysql-5.0-clean
      
      
      sql/sql_parse.cc:
        Auto merged
      sql/share/errmsg.txt:
        SCCS merged
      768e2794
    • unknown's avatar
      Merge mysql.com:/home/jimw/my/mysql-5.0-3094 · b575cf1e
      unknown authored
      into  mysql.com:/home/jimw/my/mysql-5.0-clean
      
      b575cf1e
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · fcca42be
      unknown authored
      into  mysql.com:/home/kostja/mysql/mysql-5.0-11909
      
      
      sql/sql_select.cc:
        Auto merged
      fcca42be
    • unknown's avatar
      A fix and a test case for Bug#11909 "mysql_stmt_attr_set · cccf551b
      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"
      cccf551b
    • unknown's avatar
      grant.result: · 4a948251
      unknown authored
        After merge fix
      
      
      mysql-test/r/grant.result:
        After merge fix
        ,
      4a948251
    • unknown's avatar
      Merge mysql.com:/usr/home/bar/mysql-4.1.b10892 · 8868a7a1
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-5.0
      
      
      mysql-test/t/grant.test:
        Auto merged
      sql/item.cc:
        Auto merged
      mysql-test/r/grant.result:
        using local copy
      8868a7a1
    • unknown's avatar
      Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0 · 0c8d0e5a
      unknown authored
      into mysql.com:/home/psergey/mysql-5.0-bug12082
      
      
      sql/sql_select.cc:
        Auto merged
      0c8d0e5a
    • unknown's avatar
      Fix for bug #10055 "Using stored function with information_schema causes empty · 4eac93cd
      unknown authored
      result set".
      
      To enable full access to contents of I_S tables from stored functions
      or statements that use them, we manipulate with thread's open tables
      state and ensure that we won't cause deadlock when we open tables by
      ignoring flushes and name-locks.
      Building of contents of I_S.TABLES no longer requires locking of tables
      since we use use handler::info() method with HA_STATUS_AUTO flag instead
      of handler::update_auto_increment() for obtaining information about
      auto-increment values. But this also means that handlers have to implement
      support for HA_STATUS_AUTO flag (particularly InnoDB needs it).
      
      
      mysql-test/r/alter_table.result:
        Updated test results. This change was caused by the fact that now when
        we build contents of I_S tables (and thus output of SHOW INDEX) we
        don't use instances of tables which may be already opened and locked
        by thread (we always use new instance).
      mysql-test/r/information_schema.result:
        Added test which checks how information about current auto-increment value for
        table is reported in INFORMATION_SCHEMA.TABLES view.
      mysql-test/r/sp.result:
        Added test for bug #10055 "Using stored function with information_schema causes
        empty result set".
      mysql-test/t/information_schema.test:
        Added test which checks how information about current auto-increment value for
        table is reported in INFORMATION_SCHEMA.TABLES view.
      mysql-test/t/sp.test:
        Added test for bug #10055 "Using stored function with information_schema causes
        empty result set".
      sql/mysql_priv.h:
        close_thread_tables():
          Get rid of 'stopper' argument which is no longer used. Now when we need
          to open and then close some table without touching tables which are already
          opened we use THD::reset_n/restore_backup_open_tables_state() methods.
        open_tables()/open_normal_and_derived_tables():
          Added 'flags' argument to be able open tables even if some has done
          a flush or hold namelock on them.
      sql/sp.cc:
        close_proc_table/open_proc_table_for_read/db_find_routine():
          Replaced push_open_tables_state/pop_open_tables_state() methods which
          were saving/restoring current open tables state in/from THD::open_state_list
          with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
          methods which assume that backup storage for this state is allocated on
          stack (or elsewhere) by their caller.
        open_proc_table_for_read():
          Since now we can have several open tables states stacked up we can't rely
          rely on checking whether we have some tables open in previous state.
          Instead we always assume that some tables are open and we need to ignore
          flush while locking mysql.proc. We don't really need 
          MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK in this case since we open mysql.proc table
          only for reading.
      sql/sp.h:
        Added declarations of open_proc_table_for_read()/close_proc_table() to be
        able to use them in sql_show.cc.
      sql/sql_base.cc:
        close_thread_tables():
          Get rid of 'stopper' argument which is no longer used. Now when we need
          to open and then close some table without touching tables which are already
          opened we use THD::reset_n/restore_backup_open_tables_state() methods.
        open_tables()/open_normal_and_derived_tables():
          Added 'flags' argument to be able open tables even if some has done
          a flush or hold namelock on them.
      sql/sql_class.cc:
        Open_tables_state, THD:
          Replaced push_open_tables_state/pop_open_tables_state() methods which
          were saving/restoring current open tables state in/from THD::open_state_list
          with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
          methods which assume that backup storage for this state is allocated on
          stack (or elsewhere) by their caller.
      sql/sql_class.h:
        Open_tables_state, THD:
          Replaced push_open_tables_state/pop_open_tables_state() methods which
          were saving/restoring current open tables state in/from THD::open_state_list
          with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
          methods which assume that backup storage for this state is allocated on
          stack (or elsewhere) by their caller.
      sql/sql_handler.cc:
        open_tables()/open_normal_and_derived_tables():
          Added 'flags' argument to be able open tables even if some has done
          a flush or hold namelock on them.
      sql/sql_prepare.cc:
        open_tables()/open_normal_and_derived_tables():
          Added 'flags' argument to be able open tables even if some has done
          a flush or hold namelock on them.
      sql/sql_show.cc:
        get_all_tables():
          Now we use THD::reset_n_/restore_backup_open_tables_state() for 
          saving/restoring open tables state instead of working with it directly
          (This also allows us to have proper content of I_S system tables in
          statements with stored functions and in stored functions). We also
          ignore possible flushes when opening tables (we may create deadlock
          otherwise). Also we do all needed manipulations with LEX in this function
          and not in get_schema_tables_result() now.
        get_schema_tables_record():
          Let us use handler::info() method with HA_STATUS_AUTO flag for obtaining
          information about table's auto-increment value. This allows to avoid locking
          of tables which is needed when we use handler::update_auto_increment() method.
        fill_schema_proc():
          Now we use open_proc_table_for_read/close_proc_table() for access to
          mysql.proc table (so we won't cause deadlock if we already have some
          tables open and locked, this also allows us to have proper content in
          ROUTINES system table in statements using stored functions/in stored
          functions).
        get_schema_tables_result():
          Moved all manipulations with Open_tables_state and LEX needed for
          safe opening of tables to ST_SCHEMA_TABLE::fill_table functions
          (i.e. get_all_tables() and fill_schema_proc()).
      sql/sql_update.cc:
        open_tables()/open_normal_and_derived_tables():
          Added 'flags' argument to be able open tables even if some has done
          a flush or hold namelock on them.
      4eac93cd
    • unknown's avatar
      Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1 · daab10df
      unknown authored
      into  mysql.com:/usr/home/bar/mysql-4.1.b10892
      
      daab10df
    • unknown's avatar
      item.cc: · 667eb7d7
      unknown authored
        After review fix
      
      
      sql/item.cc:
        After review fix
      667eb7d7
  4. 07 Aug, 2005 9 commits
    • unknown's avatar
      Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0 · 91cc8d1c
      unknown authored
      into rurik.mysql.com:/home/igor/mysql-5.0
      
      91cc8d1c
    • unknown's avatar
      Merge mysql.com:/home/mydev/mysql-4.1-4100 · d42fad4c
      unknown authored
      into  mysql.com:/home/mydev/mysql-5.0-5000
      
      
      mysql-test/r/flush.result:
        Auto merged
      mysql-test/t/flush.test:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      d42fad4c
    • unknown's avatar
      subselect.result: · f20eb36b
      unknown authored
        Correction after manual merge.
      
      
      mysql-test/r/subselect.result:
        Correction after manual merge.
      f20eb36b
    • unknown's avatar
      Merge mysql.com:/home/mydev/mysql-5.0 · 327ccef0
      unknown authored
      into  mysql.com:/home/mydev/mysql-5.0-5000
      
      327ccef0
    • unknown's avatar
      Manual merge · c5a7a274
      unknown authored
      c5a7a274
    • unknown's avatar
      Post-merge fixes · ce34c003
      unknown authored
      ce34c003
    • unknown's avatar
      Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0 · c30106c1
      unknown authored
      into mysql.com:/home/psergey/mysql-5.0-bug11869-part3
      
      
      BitKeeper/deleted/.del-not_windows.inc:
        Auto merged
      mysql-test/r/create.result:
        Auto merged
      mysql-test/r/query_cache.result:
        Auto merged
      mysql-test/r/type_datetime.result:
        Auto merged
      mysql-test/t/query_cache.test:
        Auto merged
      mysql-test/t/rpl_flush_tables.test:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_union.cc:
        Auto merged
      c30106c1
    • unknown's avatar
      Manual merge · a658f8b2
      unknown authored
      
      BitKeeper/deleted/.del-not_windows.inc:
        Delete: mysql-test/include/not_windows.inc
      mysql-test/r/fulltext_order_by.result:
        Auto merged
      mysql-test/r/type_datetime.result:
        Auto merged
      mysql-test/t/fulltext_order_by.test:
        Auto merged
      mysql-test/t/query_cache.test:
        Auto merged
      mysql-test/t/rpl_flush_tables.test:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/item_timefunc.h:
        Auto merged
      sql/sql_union.cc:
        Auto merged
      a658f8b2
    • unknown's avatar
      BUG#11869:part 2: post-review fixes: merging into 5.0 · 8b6185c3
      unknown authored
      We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
      OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).
      
      
      mysql-test/r/create.result:
        Updated the test result
      mysql-test/r/fulltext_order_by.result:
        Drop all tables this test uses
      mysql-test/t/fulltext_order_by.test:
        Drop all tables this test uses
      8b6185c3