An error occurred fetching the project authors.
  1. 17 May, 2005 1 commit
    • unknown's avatar
      After merge fix · 3f819973
      unknown authored
      sql/sql_update.cc:
        Add missing join method
      3f819973
  2. 10 May, 2005 1 commit
    • unknown's avatar
      Many files: · e02416c5
      unknown authored
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      view.test:
        Added test case for bug #8528.
      view.result:
        Added test case for bug #8528. Fixed other test cases.
      
      
      mysql-test/r/view.result:
        Added test case for bug #8528. Fixed other test cases.
      mysql-test/t/view.test:
        Added test case for bug #8528.
      sql/sql_base.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_delete.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_insert.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_parse.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_prepare.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_select.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_update.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/sql_view.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/table.cc:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      sql/table.h:
        Fixed bug #8528.
        Representation for single-table views was made similar to
        representation for multi-table views.
      e02416c5
  3. 15 Apr, 2005 1 commit
    • unknown's avatar
      Fix for bug #9486 "Can't perform multi-update in stored procedure". · c69e2fc7
      unknown authored
      New more SP-locking friendly approach to handling locks in multi-update.
      Now we mark all tables of multi-update as needing write lock at parsing
      stage and if possible downgrade lock at execution stage (For its work
      SP-locking mechanism needs to know all lock types right after parsing
      stage).
      
      
      mysql-test/r/sp-threads.result:
        Added test for bug #9486 "Can't perform multi-update in stored procedure".
      mysql-test/t/sp-threads.test:
        Added test for bug #9486 "Can't perform multi-update in stored procedure".
      sql/sp_head.cc:
        SP_TABLE, sp_head::merge_table_list()/add_used_tables_to_table_list():
          Since some queries during their execution (e.g. multi-update)
          may change type of lock for some of their tables and thus change
          lock_type member for some of elements of table list, we should
          store type of lock in SP_TABLE struct explicitly instead of using
          lock_type member of TABLE_LIST object pointed by SP_TABLE::table.
      sql/sql_lex.h:
        Removed no longer used LEX::multi_lock_option member.
      sql/sql_prepare.cc:
        mysql_test_update():
          We don't need to bother about LEX::multi_lock_option if we convert
          multi-update to update anymore. Since nowdays multi-update uses 
          TABLE_LIST::lock_type for specifying lock level of updated tables
          instead of LEX::multi_lock_option.
      sql/sql_update.cc:
        mysql_update()/mysql_multi_update_prepare():
         Now we mark all tables of multi-update as needing write lock at parsing
         stage and if possible downgrade lock at execution stage. Old approach
         (don't set lock type until execution stage) was not working well with
         SP-locking (For its work SP-locking mechanism needs to know all lock 
         types right after parsing stage).
        
        mysql_multi_update():
          We should return FALSE if no error occurs.
      sql/sql_yacc.yy:
        update:
         Now we mark all tables of multi-update as needing write lock at parsing
         stage and if possible downgrade lock at execution stage. Old approach
         (don't set lock type until execution stage) was not working well with
         SP-locking (For its work SP-locking mechanism needs to know all lock 
         types right after parsing stage).
      c69e2fc7
  4. 28 Mar, 2005 1 commit
    • unknown's avatar
      fixed mechanism of detection selection from table wich we update · daddf263
      unknown authored
      (BUG##9398, BUG#8703)
      fixed wrong join view detection in multi-delete which lead to server crash
      
      
      mysql-test/r/lowercase_view.result:
        added new tests of updation and selection from the same table
      mysql-test/r/view.result:
        added new tests of updation and selection from the same table
        added test of multidelete command over join view which lead to server crash
        test suite from bugs #9398 and #8703
      mysql-test/t/lowercase_view.test:
        added new tests of updation and selection from the same table
      mysql-test/t/view.test:
        added new tests of updation and selection from the same table
        added test of multidelete command over join view which lead to server crash
        test suite from bugs #9398 and #8703
      sql/sql_base.cc:
        changed procedure of finding tables
      sql/sql_class.cc:
        added derived table procession detection
      sql/sql_class.h:
        added derived table procession detection
      sql/sql_delete.cc:
        fixed detection of selection from table which update for multidelete
      sql/sql_derived.cc:
        added derived table procession detection
      sql/sql_lex.cc:
        added detection os SELECTs processed inside derived tables
        removed old mechanism of multidelete/multiupdate table duplication detection (which can't work with views)
      sql/sql_lex.h:
        added detection os SELECTs processed inside derived tables
        removed old mechanism of multidelete/multiupdate table duplication detection (which can't work with views)
      sql/sql_parse.cc:
        removed wrong test of join view (for multidelete in can be not only first table)
      sql/sql_prepare.cc:
        added detection os SELECTs processed inside derived tables (reset it for reusing in PS/SP)
      sql/sql_select.cc:
        added detection os SELECTs processed inside derived tables
      sql/sql_update.cc:
        fixed detection of selection from table which update for multiupdate
      daddf263
  5. 19 Mar, 2005 1 commit
    • unknown's avatar
      Eliminate warnings noticed by VC7. This includes fixing my_mmap() on · 892a6138
      unknown authored
      Windows to call CreateFileMapping() with correct arguments, and
      propogating the introduction of query_id_t to everywhere query ids are
      passed around. (Bug #8826)
      
      
      libmysql/libmysql.c:
        Make implicit cast explicit
      myisam/mi_open.c:
        Make cast of value to smaller data size explicit
      myisam/mi_packrec.c:
        Cast file size (my_off_t) to size_t for mmap
      mysys/my_mmap.c:
        Fix Windows version of my_mmap() to use the right parameters
        for call to CreateFileMapping()
      sql/field.cc:
        Use temporary value of correct type
      sql/field.h:
        Use query_id_t for query_id value
      sql/ha_berkeley.cc:
        Fix flag check
      sql/ha_innodb.h:
        Use query_id_t for query_id value
      sql/handler.cc:
        Explain opt_using_transactions calculation, and add cast
      sql/handler.h:
        Fix forward declaration of COND
      sql/item.cc:
        Fix val_bool() tests of val_int() to avoid implicit cast
      sql/item_cmpfunc.cc:
        Fix typo in switch label
      sql/item_func.cc:
        Make implicit cast explicit
      sql/item_strfunc.cc:
        Now that query_id is a query_id_t, need to cast it to a ulong here
      sql/item_subselect.cc:
        Fix test of value
      sql/log.cc:
        Cast my_off_t used for file size to size_t for memory allocation
        Also cast my_off_t when using it to calculate the number of pages for TC log
        Cast total_ha_2pc to uchar when saving it
      sql/mysql_priv.h:
        Move up query_id definition so it can be used more widely
      sql/opt_range.cc:
        Add unused delete operator to prevent compiler warning
      sql/set_var.cc:
        Cast value for max_user_connections
      sql/sql_cache.cc:
        Remove unused label
      sql/sql_class.h:
        Fix query id values to be of type query_id_t
      sql/sql_db.cc:
        Move variable only used inside #ifdef within the #ifdef
      sql/sql_help.cc:
        Remove unused label
      sql/sql_insert.cc:
        Use query_id_t for query id values
      sql/sql_lex.h:
        Add unused delete operator to prevent compiler warning
      sql/sql_select.cc:
        Remove unused variable
        Make cast of value explicit
      sql/sql_select.h:
        Use query_id_t for query id values
      sql/sql_table.cc:
        Make comparison to function pointer explicit
      sql/sql_update.cc:
        Use query_id_t for query id values
      sql/table.h:
        Use query_id_t for query id values
      strings/ctype-simple.c:
        Add cast of long value to (char) in expression
      strings/ctype-ucs2.c:
        Add cast of long value to (char) in expression
      strings/ctype-utf8.c:
        Make cast to smaller size explicit
      892a6138
  6. 17 Mar, 2005 1 commit
    • unknown's avatar
      Fixed two bugs in MySQL ACL. · 2bbde22d
      unknown authored
      First one is related to Bug#7905. One should not be allowed to
      create new user with password without UPDATE privilege to
      MySQL database. Furthermore, executing the same GRANT statement
      twice would actually crash the server and corrupt privilege database.
      
      Other bug was that one could update a column, using the existing
      value as basis to calculate the new value (e.g. UPDATE t1 SET a=a+1)
      without SELECT privilege to the field (a in the above example)
      
      Fixed tests grant.pl and grant2, which were wrong.
      
      
      2bbde22d
  7. 16 Mar, 2005 1 commit
    • unknown's avatar
      Cleanup during reviews · 284b8b8b
      unknown authored
      Removed some optional arguments
      Fixed portability problem in federated tests
      
      
      client/sql_string.cc:
        update from sql/sql_string.cc
      client/sql_string.h:
        update from sql/sql_string.h
      mysql-test/r/federated.result:
        Fixed error message
      sql/field.cc:
        Cleanup during review
        Remove const in 'const unsigned int'
      sql/field.h:
        Remove const in 'const unsigned int'
      sql/ha_federated.cc:
        Better error string.  Add missing argument to error (before 'errno' was picked up from stack)
      sql/handler.cc:
        Removed compiler warning
      sql/item_func.cc:
        Cleanup during review
      sql/item_sum.cc:
        Cleanup during review
      sql/lock.cc:
        Remove optional arguments
      sql/log_event.cc:
        Remove optional arguments
      sql/mysql_priv.h:
        Remove optional arguments
        cahnge preapre_create_fields to use pointers instead of references
      sql/opt_range.cc:
        Fix arguments so that return value is last
      sql/sql_base.cc:
        Remove optional arguments
      sql/sql_delete.cc:
        Remove optional arguments
      sql/sql_error.cc:
        Remove optional arguments
      sql/sql_help.cc:
        Remove optional arguments
      sql/sql_parse.cc:
        Remove optional arguments
      sql/sql_prepare.cc:
        Remove optional arguments
      sql/sql_rename.cc:
        Remove optional arguments
      sql/sql_select.cc:
        Remove optional arguments
      sql/sql_show.cc:
        Cleanup during review
      sql/sql_string.cc:
        Simple optimization
      sql/sql_table.cc:
        Remove optional arguments
        Fixed indentation
      sql/sql_update.cc:
        Remove optional arguments
      sql/sql_yacc.yy:
        Change references to pointers
      284b8b8b
  8. 04 Mar, 2005 1 commit
    • unknown's avatar
      Better approach for prelocking of tables for stored routines execution · ac9f68b9
      unknown authored
      and some SP-related cleanups.
      
      - We don't have separate stage for calculation of list of tables
        to be prelocked and doing implicit LOCK/UNLOCK any more.
        Instead we calculate this list at open_tables() and do implicit
        LOCK in lock_tables() (and UNLOCK in close_thread_tables()).
        Also now we support cases when same table (with same alias) is
        used several times in the same query in SP.
      
      - Cleaned up execution of SP. Moved all common code which handles
        LEX and does preparations before statement execution or complex
        expression evaluation to auxilary sp_lex_keeper class. Now 
        all statements in SP (and corresponding instructions) that
        evaluate expression which can contain subquery have their
        own LEX.
      
      
      mysql-test/r/lock.result:
        Replaced wrong error code with the correct one after fixing bug in
        SP-locking.
      mysql-test/r/mysqldump.result:
        Added dropping of view which is used in test to its beginning.
      mysql-test/r/sp.result:
        Added tests for improved SP-locking.
        Temporarily disabled tests for SHOW PROCEDURE STATUS and alike
        (Until Monty will allow to open mysql.proc under LOCK TABLES without
        mentioning it in lock list).
        Replaced wrong results of test for bug #5240 with correct results after
        fixing bug in handling of cursors.
      mysql-test/t/lock.test:
        Replaced wrong error code with the correct one after fixing bug in
        SP-locking.
      mysql-test/t/mysqldump.test:
        Added dropping of view which is used in test to its beginning.
      mysql-test/t/sp.test:
        Added tests for improved SP-locking.
        Temporarily disabled tests for SHOW PROCEDURE STATUS and alike
        (Until Monty will allow to open mysql.proc under LOCK TABLES without
        mentioning it in lock list).
        Removed test for bug #1654 since we already test exactly this function
        in one of SP-locking tests.
        Removed comment about cursor's wrong behavior in test for bug #5240
        after fixing bug which was its cause.
      sql/item_func.cc:
        Removed comment which is no longer true.
      sql/mysql_priv.h:
        Changed open_tables() signature.
        Now its 2nd parameter is in/out since it can add elements to table list.
      sql/sp.cc:
        sp_find_procedure():
         Added one more parameter which enforces cache only lookup.
        
        sp_merge_hash():
         Now uses its return value to indicate that first of two hashes changed
         as result of merge.
        
        sp_cache_routines():
         This function caches all stored routines used in query now.
      sql/sp.h:
        - sp_find_procedure() now has one more parameter which enforces cache only
          lookup.
        - sp_merge_hash() now uses its return value to indicate that first of two
          hashes changed as result of merge.
        - sp_cache_routines() caches all stored routines now. So it does not need
          third argument any more.
      sql/sp_head.cc:
        sp_head::sp_head():
         Added initialization of new m_spfuns and m_spprocs members.
        
        sp_head::execute():
         Let us save/restore part of thread context which can be damaged by
         execution of instructions.
        sp_head::execute_function()/execute_procedure():
         Now it is responsibility of caller to close tables used in
         subqueries which are passed as routine parameters.
        
        sp_head::restore_lex():
         Let us accumulate information about routines used by this one
         in new m_spfuns, m_spprocs hashes.
        
        sp_lex_keeper::reset_lex_and_exec_core()
         Main method of new auxilary sp_lex_keeper class to which instructions 
         delegate responsibility for handling LEX and preparations before
         executing statement or calculating complex expression.
        
        Since all instructions which calculate complex expression or execute
        command now use sp_lex_keeper they have to implement
        sp_instr::exec_core() method. Most of instruction specific logic
        has moved from sp_instr::execute() to this new method.
        
        Removed sp_instr_set_user_var class which is no longer used, because
        nowdays we allow execution of statements in stored functions and
        triggers.
        
        sp_merge_table_list() became sp_head::merge_table_list() method. It
        also treats sp_head::m_sptabs as multi-set of tables now.
        
        sp_hash_to_table_list() became sp_head::add_used_tables_to_table_list().
        It takes into account that sp_head::m_sptabs is multi-set and allocates
        object into persistent arena of PS.
        
        Removed sp_merge_table_hash(), sp_open_and_lock_tables(),
        sp_unlock_tables(), sp_merge_routine_tables() methods since they are not
        used by new prelocking mechanism.
        
        Added sp_add_sp_tables_to_table_list() which serves for adding tables needed
        by routines used in query to the query table list for prelocking.
      sql/sp_head.h:
        class sp_head:
        - Added m_spfuns, m_spprocs members for storing names of routines used
          by this routine.
        - Added add_used_tables_to_table_list() method which allows to add
          tables needed by this routine to query's table list.
        - Converted sp_merge_table_list() to sp_head::merge_table_list() method.
        - Changed semantics of THD::m_sptabs. Now it is multi-set which contains
          only tables which are used by this routine and not routines that are
          called from this one.
        
        Removed sp_merge_routine_tables(), sp_merge_table_hash(),
        sp_open_and_lock_tables(), sp_unlock_tables() calls since they are not
        used for our prelocking list calculation.
        
        Added auxilary sp_lex_keeper class to which instructions delegate
        responsibility for handling LEX and preparations before executing
        statement or calculating complex expression. This class uses
        new sp_instr::exec_core() method which is responsible for executing
        instruction's core function after all preparations were made.
        
        All instructions which hold and calculate complex expression now have
        their own LEX (by aggregating sp_lex_keeper instance). sp_instr_stmt
        now uses sp_lex_keeper too.
        
        Removed sp_instr_set_user_var class which is no longer used, because
        nowdays we allow execution of statements in stored functions and
        triggers.
      sql/sp_rcontext.cc:
        Now sp_cursor holds pointer to sp_lex_keeper instead of LEX.
      sql/sp_rcontext.h:
        Now sp_cursor holds pointer to sp_lex_keeper instead of LEX.
      sql/sql_acl.cc:
        acl_init(), grant_init():
          Now we use simple_open_n_lock_tables() instead of explicit
          calls to open_tables() and mysql_lock_tables().
      sql/sql_base.cc:
        Implemented support for execution of statements in "prelocked" mode.
        
        When we have statement which uses stored routines explicitly or
        implicitly (via views or triggers) we have to open and lock all tables
        for these routines at the same time as tables for the main statement.
        In fact we have to do implicit LOCK TABLES at the begining of such
        statement and implict UNLOCK TABLES at its end. We call such mode
        "prelocked".
        
        When open_tables() is called for the statement tables which are needed
        for execution of routines used by it are added to its tables list
        (this process also caches all routines used). Implicit use of routines
        is discovered when we open view or table with trigger and apropriate
        tables are added to the table list at this moment. Statement which has
        such extra tables in its list (well actually any that uses functions)
        is marked as requiring prelocked mode for its execution.
        
        When lock_tables() sees such statement it will issue implicit LOCK TABLES
        for this extended table list instead of doing usual locking, it will also
        set THD::prelocked_mode to indicate that we are in prelocked mode.
        
        When open_tables()/lock_tables() are called for statement of stored
        routine (substatement), they notice that we are running in prelocked mode
        and use one of prelocked tables from those that are not used by upper
        levels of execution.
        
        close_thread_tables() for substatement won't really close tables used
        but will mark them as free for reuse instead.
        
        Finally when close_thread_tables() is called for the main statement it
        really unlocks and closes all tables used.
        
        Everything will work even if one uses such statement under real LOCK
        TABLES (we are simply not doing implicit LOCK/UNLOCK in this case).
      sql/sql_class.cc:
        Added initialization of THD::prelocked_mode member.
      sql/sql_class.h:
        - Added prelocked_mode_type enum and THD::prelocked_mode member
          which are used for indication whenever "prelocked mode" is on 
          (i.e. that statement uses stored routines and is executed under
           implicit LOCK TABLES).
        - Removed THD::shortcut_make_view which is no longer needed.
          We use TABLE_LIST::prelocking_placeholder for the same purprose
          now.
      sql/sql_handler.cc:
        Changed open_tables() invocation.
        Now its 2nd parameter is in/out since it can add elements to table list.
      sql/sql_lex.cc:
        lex_start():
          Added initialization of LEX::query_tables_own_last.
          Unused LEX::sptabs member was removed.
        st_lex::unlink_first_table()/link_first_table_back():
          We should update LEX::query_tables_last properly if table list
          contains(ed) only one element.
      sql/sql_lex.h:
        LEX:
        - Removed sptabs member since it is no longer used.
        - Added query_tables_own_last member, which if non-0 indicates that
          statement requires prelocking (implicit LOCK TABLES) for its execution
          and points to last own element in query table list. If it is zero
          then this query does not need prelocking.
        - Added requires_prelocking(), mark_as_requiring_prelocking(),
          first_not_own_table() inline methods to incapsulate and simplify
          usage of this new member.
      sql/sql_parse.cc:
        dispatch_command():
          To properly leave prelocked mode when needed we should call
          close_thread_tables() even if there are no open tables.
        mysql_execute_command():
        - Removed part of function which were responsible for doing implicit
          LOCK TABLES before statement execution if statement used stored 
          routines (and doing UNLOCK TABLES at the end).
          Now we do all this in open_tables()/lock_tables()/close_thread_tables()
          instead.
        - It is also sensible to reset errors before execution of statement
          which uses routines.
        - SQLCOM_DO, SQLCOM_SET_OPTION, SQLCOM_CALL
          We should always try to open tables because even if statement has empty
          table list, it can call routines using tables, which should be preopened
          before statement execution.
        - SQLCOM_CALL
          We should not look up routine called in mysql.proc, since it should be
          already cached by this moment by open_tables() call.
        - SQLCOM_LOCK_TABLES
          it is better to use simple_open_n_lock_tables() since we want to avoid
          materialization of derived tables for this command.
      sql/sql_prepare.cc:
        mysql_test_update():
          Changed open_tables() invocations. Now its 2nd parameter is in/out
          since it can add elements to table list.
        check_prepared_statement():
          Since now we cache all routines used by statement in open_tables() we 
          don't need to do it explicitly.
        mysql_stmt_prepare():
          Now we should call close_thread_tables() when THD::lex points to the
          LEX of statement which opened tables.
        reset_stmt_for_execute():
          Commented why we are resetting all tables in table list.
      sql/sql_trigger.h:
        Table_triggers_list::process_triggers():
          We should surpress sending of ok packet when we are calling trigger's
          routine, since now we allow statements in them.
      sql/sql_update.cc:
        Changed open_tables() invocations.
        Now its 2nd parameter is in/out since it can add elements to table list.
      sql/sql_view.cc:
        mysql_make_view():
        - Removed handling of routines used in view. Instead we add tables which
          are needed for their execution to statement's table list in 
          open_tables().
        - Now we use TABLE_LIST::prelocking_placeholder instead of 
          THD::shortcut_make_view for indicating that view is opened
          only to discover which tables and routines it uses (this happens
          when we build extended table list for prelocking). Also now we try
          to avoid to modify main LEX in this case (except of its table list).
        - Corrected small error we added tables to the table list of the main
          LEX without updating its query_tables_last member properly.
      sql/sql_yacc.yy:
        Now each expression which is used in SP statements and can contain
        subquery has its own LEX. This LEX is stored in corresponding sp_instr
        object and used along with Item tree for expression calculation.
        
        We don't need sp_instr_set_user_var() anymore since now we allow
        execution of statements in stored functions and triggers.
      sql/table.h:
        Added TABLE_LIST::prelocking_placeholder member for distinguishing
        elements of table list which does not belong to the statement itself
        and added there only for prelocking (as they are to be used by routines
        called by this statement).
      sql/tztime.cc:
        my_tz_init():
          Now we use more simplier simple_open_n_lock_tables() call instead of 
          open_tables()/lock_tables() pair.
      ac9f68b9
  9. 25 Feb, 2005 1 commit
    • unknown's avatar
      Remove compiler warnings and remove not used variables · 248e4494
      unknown authored
      (Found during build process)
      
      
      extra/comp_err.c:
        Remove compiler warnings
      extra/perror.c:
        Remove compiler warnings
      innobase/dict/dict0dict.c:
        Remove compiler warnings
      innobase/dict/dict0load.c:
        Remove compiler warnings
      innobase/pars/pars0sym.c:
        Remove compiler warnings
      innobase/row/row0row.c:
        Remove compiler warnings
      innobase/row/row0sel.c:
        Remove compiler warnings
      libmysqld/lib_sql.cc:
        Remove not used variables
      myisam/mi_key.c:
        Remove compiler warnings
      regex/engine.c:
        Added comment
      sql/derror.cc:
        Remove not used variables
      sql/examples/ha_archive.cc:
        Fixed bug in blob handling
        Removed not used variable
      sql/field.cc:
        Remove compiler warnings
        Remove not used variables
      sql/filesort.cc:
        Remove compiler warnings
      sql/ha_heap.cc:
        Remove not used variable
      sql/ha_innodb.cc:
        Remove not used variables
        Remove compiler warnings
      sql/handler.cc:
        Remove compiler warnings and remove not used variables
      sql/item.cc:
        Remove compiler warnings and remove not used variables
      sql/item_subselect.cc:
        Remove compiler warnings
      sql/item_sum.cc:
        Remove compiler warnings
      sql/item_sum.h:
        Remove compiler warnings and remove not used variables
      sql/log.cc:
        Remove compiler warnings and remove not used variables
      sql/log_event.cc:
        Remove compiler warnings
      sql/mysqld.cc:
        Remove compiler warnings and remove not used variables
      sql/opt_range.cc:
        Remove compiler warnings and remove not used variables
      sql/slave.cc:
        Remove compiler warnings and remove not used variables
      sql/sp_pcontext.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_acl.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_analyse.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_base.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_db.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_help.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_insert.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_load.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_parse.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_prepare.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_select.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_show.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_table.cc:
        Remove compiler warnings
      sql/sql_union.cc:
        Remove compiler warnings
      sql/sql_update.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_yacc.yy:
        Remove compiler warnings and remove not used variables
      sql/strfunc.cc:
        Remove compiler warnings and remove not used variables
      strings/ctype-ucs2.c:
        Remove compiler warnings
      tests/mysql_client_test.c:
        Remove compiler warnings and remove not used variables
      tools/mysqlmanager.c:
        Remove compiler warnings and remove not used variables
      248e4494
  10. 15 Feb, 2005 2 commits
    • unknown's avatar
      Fixed failing test cases 'row.test' when running with --ps-protocol · 67b16d20
      unknown authored
      Simple optimzations done while reviewing code
      
      
      client/mysqltest.c:
        Added options --enable-ps-warnings and --disable-ps-warnings
        (to fix failing test case)
      mysql-test/t/row.test:
        Disable warnings that comes from 'parse' parth
      sql/field.cc:
        Removed calls to is_null() in field functions.
        (Not needed as NULL handling is done on the level above fields)
        Indentation fixes
        Removed calls to alloca() as buffer needed was quite small.
      sql/field.h:
        Indentation changes and comment fixes
      sql/filesort.cc:
        Simple optimization during code review
      sql/item.cc:
        Indentation fixes
        Removed some unnecessary tests (added DBUG_ASSERTS() instead)
      sql/item_buff.cc:
        Indentation fixes
      sql/my_decimal.cc:
        Indentation fixes
        Simple optimization
        Fixed compiler warning
      sql/sql_update.cc:
        Removed unnessessary assignment
      67b16d20
    • unknown's avatar
      Bug#7879: Using TL_READ_NO_INSERT locks instead of TL_READ locks when · 95dec435
      unknown authored
      reading tables in "complex" SQL statements. If inserts happen in a
      table being read, the statements have no serialization order and the
      change can therefore not be reproduced on the slave.
      
      
      sql/sql_update.cc:
        Switching to using T_READ_NO_INSERT when the binlog is used.
      sql/sql_yacc.yy:
        Switching to using T_READ_NO_INSERT when the binlog is used.
      95dec435
  11. 08 Feb, 2005 1 commit
    • unknown's avatar
      Precision Math implementation · 91db48e3
      unknown authored
      BitKeeper/etc/ignore:
        Added client/decimal.c client/my_decimal.cc client/my_decimal.h to the ignore list
      91db48e3
  12. 02 Feb, 2005 2 commits
    • unknown's avatar
      Fixed during review of new pulled code · 3d0f9d96
      unknown authored
      extra/perror.c:
        Use strmov() instead of strcpy()
        Indentation fixes
      sql/sql_table.cc:
        Revert back part of the old code as the new code didn't use mysql_data_home, which would have caused problems in the embedded server
      sql/sql_update.cc:
        Ensure that used_index is always set (It has to be set because it's value is tested if order != 0)
      3d0f9d96
    • unknown's avatar
      configure.in · c83412f7
      unknown authored
          don't define UNIV_DEBUG in CFLAGS/CXXFLAGS anymore
      sql/mysqld.cc
          hide from the user options that do nothing
      sql/sql_update.cc
          better fix for uninitialized used_index
      
      
      configure.in:
        don't define UNIV_DEBUG in CFLAGS/CXXFLAGS anymore
      sql/mysqld.cc:
        hide from the user options that do nothing
      sql/sql_update.cc:
        better fix for uninitialized used_index
      c83412f7
  13. 30 Jan, 2005 1 commit
    • unknown's avatar
      Bug#7011 · 934fde09
      unknown authored
        Fix replication for multi-update
        new test - rpl_multi_update2
      
      
      sql/mysql_priv.h:
        Bug#7011
          New function mysql_multi_update_lock()
      sql/sql_parse.cc:
        Bug#7011
          New function check_multi_update_lock()
          For multi-update on slave, perform an early open&lock
      sql/sql_update.cc:
        Bug#7011
          Split out multi-update locking into its own function,
            mysql_multi_update_lock()
      934fde09
  14. 27 Jan, 2005 1 commit
    • unknown's avatar
      query_id and my_xid -> ulonglong · 042448aa
      unknown authored
      fix for binlog+autocommit+tclog
      comments, style fixes
      
      
      libmysqld/libmysqld.rc:
        Change mode to -rw-rw-r--
      libmysqld/resource.h:
        Change mode to -rw-rw-r--
      configure.in:
        check for getpagesize
      include/my_global.h:
        typo ?
      include/my_pthread.h:
        bug in thread_safe_decrement_and_test()
      mysql-test/r/bdb.result:
        results updated
      mysql-test/r/innodb.result:
        results updated
      mysql-test/r/mix_innodb_myisam_binlog.result:
        results updated
      mysql-test/r/rpl_relayrotate.result:
        results updated
      sql/ha_berkeley.cc:
        style fixes
      sql/ha_innodb.cc:
        fixes to follow innodb coding style
      sql/handler.cc:
        more comments. XA COMMIT ONE PHASE fix.
      sql/handler.h:
        my_xid -> ulonglong. comments
      sql/item_func.cc:
        DO RELEASE_LOCK("...") is no cache_stmt
      sql/log.cc:
        comments, better error messages
      sql/log_event.cc:
        even in autocommit mode we may need to cache_stmt
        xid is ulonglong
      sql/log_event.h:
        more comments.
      sql/mysql_priv.h:
        query_id is ulonglong
      sql/mysqld.cc:
        default value for --log-tc changed
      sql/share/errmsg.txt:
        better error messages
      sql/sql_class.h:
        cleanup, comments
      sql/sql_delete.cc:
        deleting from temporary tables is not always transactional
      sql/sql_insert.cc:
        insert into temporary table is not always transactional
      sql/sql_load.cc:
        load data into temp table is not always transactional
      sql/sql_parse.cc:
        comments. bad merge fixed. xa_state_names[]
      sql/sql_table.cc:
        create/drop temp table is not always transactional
      sql/sql_update.cc:
        update temp table is not always transactional
      042448aa
  15. 24 Jan, 2005 1 commit
  16. 12 Jan, 2005 1 commit
    • unknown's avatar
      Fixed memory reference errors found by valgrind · 24a02757
      unknown authored
      sql/ha_federated.cc:
        Change mode to -rw-rw-r--
      myisam/mi_create.c:
        Ensure that all referenced memory is reset
      mysql-test/r/type_timestamp.result:
        More tests
      mysql-test/t/func_compress.test:
        Added comment
      mysql-test/t/type_timestamp.test:
        More tests
      sql/field.h:
        Count number of varchars in table
      sql/item_cmpfunc.cc:
        Safety fix (to avoid warning from valgrind)
      sql/opt_range.cc:
        Simple optimzation
      sql/sql_acl.cc:
        Safety fix (to avoid warning from valgrind)
      sql/sql_parse.cc:
        Safety fix for prepared statements
      sql/sql_show.cc:
        Move variable declarations first in function
        Remove hidden variable (it)
        Remove accessing freed memory (table_list->table_name)
      sql/sql_update.cc:
        Compare records with varchars correctly
      sql/table.cc:
        Safety fix when running with purify/valgrind
        Fix wrong memory reference in case of errors
      sql/table.h:
        Added counting of varchar fields
      strings/ctype-mb.c:
        Fill max_str properly
      24a02757
  17. 06 Jan, 2005 1 commit
    • unknown's avatar
      First stage of table definition cache · acf76e3b
      unknown authored
      Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
      Created Field::make_field() and made Field_num::make_field() to call this
      Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
      Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
      Renamed TABLE_SHARE->real_name to table_name
      Renamed TABLE->table_name to alias
      Renamed TABLE_LIST->real_name to table_name
      
      
      include/myisam.h:
        Added const before names
      mysql-test/r/group_min_max.result:
        Make results repeatable
      mysql-test/t/group_min_max.test:
        Make results repeatable
      sql/field.cc:
        Created Field::make_field() and made Field_num::make_field() to call this
        Use TABLE_SHARE
        Use sql_strmake() instead of sql_memdup() to simplify code
      sql/field.h:
        Changed table_name to be pointer to table_name. This allows us to change alias for all fields by just changing one pointer.
        Use TABLE_SHARE
      sql/field_conv.cc:
        Use TABLE_SHARE
      sql/filesort.cc:
        Use TABLE_SHARE
      sql/ha_berkeley.cc:
        Use TABLE_SHARE
      sql/ha_heap.cc:
        Use TABLE_SHARE
      sql/ha_innodb.cc:
        Use TABLE_SHARE
      sql/ha_myisam.cc:
        Use TABLE_SHARE
      sql/ha_myisammrg.cc:
        Use TABLE_SHARE
        Change some pointer handling to use const char*
      sql/ha_ndbcluster.cc:
        Use TABLE_SHARE
      sql/handler.cc:
        Use TABLE_SHARE
      sql/item.cc:
        Use TABLE_SHARE
      sql/item_func.cc:
        Use TABLE_SHARE
      sql/item_subselect.cc:
        Use TABLE_SHARE
      sql/item_sum.cc:
        Use TABLE_SHARE
      sql/key.cc:
        Use TABLE_SHARE
      sql/lock.cc:
        Use TABLE_SHARE
      sql/log_event.cc:
        real_name -> table_name
      sql/mysql_priv.h:
        Use TABLE_SHARE
      sql/opt_range.cc:
        Use TABLE_SHARE
      sql/opt_sum.cc:
        Use TABLE_SHARE
      sql/records.cc:
        Use TABLE_SHARE
      sql/repl_failsafe.cc:
        real_name -> table_name
      sql/slave.cc:
        Use TABLE_SHARE
      sql/sp.cc:
        Use TABLE_SHARE
      sql/sp_head.cc:
        real_name -> table_name
      sql/sql_acl.cc:
        Use TABLE_SHARE
        removed unnecessary assert
        fixed indentation
        changed some char * -> const char*
      sql/sql_acl.h:
        changed some char* -> const char*
      sql/sql_base.cc:
        Use TABLE_SHARE
      sql/sql_cache.cc:
        Use TABLE_SHARE
      sql/sql_class.cc:
        Use TABLE_SHARE
      sql/sql_db.cc:
        real_name -> table_name
      sql/sql_delete.cc:
        Use TABLE_SHARE
      sql/sql_derived.cc:
        Use TABLE_SHARE
      sql/sql_handler.cc:
        Use TABLE_SHARE
      sql/sql_help.cc:
        Use TABLE_SHARE
      sql/sql_insert.cc:
        Use TABLE_SHARE
      sql/sql_load.cc:
        Use TABLE_SHARE
      sql/sql_parse.cc:
        Use TABLE_SHARE
      sql/sql_rename.cc:
        real_name -> table_name
      sql/sql_select.cc:
        Use TABLE_SHARE
        table->blob_fields now points to field offsets, not fields
        tmp_table->table_name now points to alias name
      sql/sql_show.cc:
        Use TABLE_SHARE
      sql/sql_table.cc:
        Use TABLE_SHARE
      sql/sql_test.cc:
        Use TABLE_SHARE
      sql/sql_trigger.cc:
        Use TABLE_SHARE
      sql/sql_udf.cc:
        Use TABLE_SHARE
      sql/sql_union.cc:
        real_name -> table_name
      sql/sql_update.cc:
        Use TABLE_SHARE
      sql/sql_view.cc:
        Use TABLE_SHARE
      sql/table.cc:
        Split TABLE to TABLE and TABLE_SHARE
        Changed blob_field to be field offsets instead of pointer to fields
        Only initialize table->s->default_values with default record (not all table->record[#])
        Some indentation changes
      sql/table.h:
        Split TABLE to TABLE and TABLE_SHARE
      sql/tztime.cc:
        real_name -> table_name
      sql/unireg.cc:
        Use TABLE_SHARE
      sql/unireg.h:
        Use TABLE_SHARE
      acf76e3b
  18. 04 Jan, 2005 2 commits
    • unknown's avatar
      fixed bugs in view code with prepared statemnts · 34f313ee
      unknown authored
      sql/sql_acl.cc:
        block checking view underlying tables
      sql/sql_base.cc:
        item registration fixed
        fixed non registred item resolving
        fixed result of outo-merge
        fixed creation reference if alias used
      sql/sql_insert.cc:
        layout fixed
        removed unused variable
      sql/sql_parse.cc:
        block checking view underlying tables
      sql/sql_prepare.cc:
        make preparation check same as usual check
      sql/sql_update.cc:
        made want_privilege assignment simplier
        block checking view underlying tables
      sql/sql_view.cc:
        belong_to_view assignmebt moved after privileges check
      sql/table.cc:
        check option fix field added
        arena management added
      34f313ee
    • unknown's avatar
      After merge fixes · bd365f76
      unknown authored
      Add support for warnings for prepare of prepared statements
      Fixed test to work with --ps-protocol
      Fixed some test results
      
      
      libmysql/libmysql.c:
        Add support for warnings for prepare of prepared statements
      mysql-test/r/func_concat.result:
        After merge fixes
      mysql-test/r/select.result:
        Delete conflicting tables form previous tests
      mysql-test/r/view.result:
        New code from 4.1 fixed old error
      mysql-test/t/create.test:
        Ensure that --ps-protocol return same results as normal test
      mysql-test/t/func_group.test:
        Remove not needed --disable_ps_protocol
      mysql-test/t/func_time.test:
        Ensure that --ps-protocol return same results as normal test
      mysql-test/t/having.test:
        Ensure that --ps-protocol return same results as normal test
      mysql-test/t/insert_select.test:
        Remove not needed --disable_ps_protocol
      mysql-test/t/select.test:
        Ensure that --ps-protocol return same results as normal test
      mysql-test/t/sp.test:
        Fixed comment
      mysql-test/t/system_mysql_db_fix.test:
        Fix that results is same as from system_mysql_db.test
      mysql-test/t/trigger.test:
        Added comment
      mysql-test/t/type_blob.test:
        Remove not needed --disable_ps_protocol
      mysql-test/t/union.test:
        Run most of the test with --ps-protocol
      mysql-test/t/user_limits.test:
        Ensure that --ps-protocol return same results as normal test
      mysql-test/t/view.test:
        Removed --error as bug is now fixed
      mysql-test/t/warnings.test:
        Ensure that --ps-protocol return same results as normal test
      ndb/include/Makefile.am:
        Don't automaticly use SCCS files
      sql/ha_ndbcluster.cc:
        Removed compiler warning
      sql/log_event.cc:
        After merge fix
      sql/sql_class.h:
        After merge fix
      sql/sql_insert.cc:
        After merge fix
      sql/sql_load.cc:
        After merge fix
      sql/sql_prepare.cc:
        Add support for warnings for prepare of prepared statements
      sql/sql_update.cc:
        After merge fixes
      bd365f76
  19. 03 Jan, 2005 1 commit
    • unknown's avatar
      Better handling of ensuring that setup_tables() are not called twice · 2bcaed34
      unknown authored
      This fixed a bug in prepared statements when used with outher joins
      Fixed a bug in SUM(DISTINCT) when used with prepared statements.
      Some safety fixes in test scripts to ensure that previous test failures shouldn't affect other tests
      
      
      mysql-test/r/mysqldump.result:
        Safety fix if a previous test would fail
      mysql-test/r/show_check.result:
        Safety fix if a previous test would fail
      mysql-test/r/sp.result:
        Fix for --ps-protocol
      mysql-test/r/synchronization.result:
        Safety fix if a previous test would fail
      mysql-test/r/system_mysql_db.result:
        Safety fix if a previous test would fail
      mysql-test/t/mysqldump.test:
        Safety fix if a previous test would fail
      mysql-test/t/select.test:
        Safety fix if a previous test would fail
      mysql-test/t/show_check.test:
        Safety fix if a previous test would fail
      mysql-test/t/sp.test:
        fix for --ps-protocol
      mysql-test/t/strict.test:
        Fix for --ps-protocol
      mysql-test/t/synchronization.test:
        Safety fix if a previous test would fail
      mysql-test/t/system_mysql_db.test:
        Safety fix if a previous test would fail
      sql/item_sum.cc:
        Fix bug in SUM(DISTINCT...) when using with prepared statements
      sql/item_sum.h:
        Fix bug in SUM(DISTINCT...) when using with prepared statements
      sql/mysql_priv.h:
        Better handling of ensuring that setup_tables() are not called twice
      sql/sql_base.cc:
        Better handling of ensuring that setup_tables() are not called twice
      sql/sql_insert.cc:
        Better handling of ensuring that setup_tables() are not called twice
      sql/sql_parse.cc:
        Better handling of ensuring that setup_tables() are not called twice
      sql/sql_prepare.cc:
        Better handling of ensuring that setup_tables() are not called twice
      sql/sql_select.cc:
        Better handling of ensuring that setup_tables() are not called twice
      sql/sql_union.cc:
        Better handling of ensuring that setup_tables() are not called twice
      sql/sql_update.cc:
        Better handling of ensuring that setup_tables() are not called twice
      sql/table.h:
        Better handling of ensuring that setup_tables() are not called twice
      2bcaed34
  20. 31 Dec, 2004 1 commit
    • unknown's avatar
      Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag · 2419fa26
      unknown authored
      This allows use to use INSERT IGNORE ... ON DUPLICATE ...
      
      
      mysql-test/r/drop.result:
        safety fix
      mysql-test/t/drop.test:
        safety fix
      mysql-test/t/multi_update.test:
        ensure we cover all possible errors
      sql/log_event.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/log_event.h:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/mysql_priv.h:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_class.h:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_delete.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_insert.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_lex.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_lex.h:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_load.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_parse.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_repl.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_repl.h:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_select.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_table.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_union.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_update.cc:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      sql/sql_yacc.yy:
        Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
      2419fa26
  21. 30 Dec, 2004 1 commit
    • unknown's avatar
      After merge fixes · 2e8d13c7
      unknown authored
      config/ac-macros/character_sets.m4:
        Added latin1_spanish_ci
      dbug/dbug_analyze.c:
        Remove compiler warnings
      include/my_handler.h:
        Reorder structure arguments to be more optimal
      innobase/dict/dict0load.c:
        Fixed wrong define tag (for MySQL 5.0)
      innobase/fil/fil0fil.c:
        Fixed compiler warning
      innobase/os/os0file.c:
        Fixed compiler warning
      myisam/ft_boolean_search.c:
        Fixed compiler warning
      myisam/ft_static.c:
        Update to use new HA_KEYSEG structure
      myisam/mi_open.c:
        Simple optimization
      myisammrg/myrg_static.c:
        Removed compiler warning
      mysql-test/r/grant.result:
        Update results after merge
      mysql-test/r/index_merge.result:
        Update results after merge
      mysql-test/r/information_schema_inno.result:
        Add missing drop table
      mysql-test/r/lowercase_table.result:
        safety fix
      mysql-test/r/multi_update.result:
        safety fix
      mysql-test/r/ps_1general.result:
        safety fix
      mysql-test/r/ps_2myisam.result:
        Update results after merge
        (set is not anymore of binary type)
      mysql-test/r/ps_3innodb.result:
        Update results after merge
      mysql-test/r/ps_4heap.result:
        Update results after merge
      mysql-test/r/ps_5merge.result:
        Update results after merge
      mysql-test/r/ps_6bdb.result:
        Update results after merge
      mysql-test/r/show_check.result:
        Update results after merge
      mysql-test/r/subselect.result:
        Update results after merge
        (added missing quotes)
      mysql-test/r/timezone2.result:
        Update results after merge
      mysql-test/r/view.result:
        Update results after merge
        (note that INSERT IGNORE will work again after next merge from 4.1)
      mysql-test/t/derived.test:
        Removed empty line
      mysql-test/t/grant.test:
        Update results after merge
      mysql-test/t/information_schema_inno.test:
        added missing drop table
      mysql-test/t/lowercase_table.test:
        safety fix
      mysql-test/t/multi_update.test:
        safety fix
      mysql-test/t/ps_1general.test:
        safety fix
      mysql-test/t/view.test:
        update error codes after merge
      ndb/src/mgmsrv/main.cpp:
        after merge fix
      ndb/tools/ndb_test_platform.cpp:
        removed compiler warnings
      regex/main.c:
        remove compiler warnings
      sql/field.cc:
        Remove compiler warning
      sql/gen_lex_hash.cc:
        Added DBUG support
      sql/ha_myisam.cc:
        Removed warning from valgrind
      sql/ha_ndbcluster.cc:
        Remove compiler warning
      sql/item_cmpfunc.cc:
        Better to use val_int() instead of val_real() as we don't want Item_func_nop_all to return different value than the original ref element
      sql/mysqld.cc:
        Remove compiler warning
      sql/sql_acl.cc:
        More debugging
      sql/sql_lex.cc:
        Remove unnecessary 'else'
      sql/sql_parse.cc:
        After merge fixes
        Simplify reset of thd->server_status for SQLCOM_CALL
      sql/sql_prepare.cc:
        After merge fixes
        Removed possible core dump in mysql_stmt_fetch()
      sql/sql_update.cc:
        After merge fixes (together with Sanja)
      strings/ctype-czech.c:
        Remove compiler warning
      strings/ctype-ucs2.c:
        Remove compiler warning
      strings/ctype-win1250ch.c:
        Remove compiler warning
      strings/xml.c:
        Remove compiler warning
      tests/client_test.c:
        Fix test to work with 5.0
      vio/test-sslserver.c:
        Portability fix
      2e8d13c7
  22. 18 Dec, 2004 2 commits
    • unknown's avatar
      Remove bogus lines · c6be6653
      unknown authored
      c6be6653
    • unknown's avatar
      Bug#7391 - Multi-table UPDATE security regression · 4f9a0a06
      unknown authored
        Add in missing privilege checks. 
        Tests for the privileges.
      
      
      mysql-test/r/grant.result:
        Bug#7391 - Multi-table UPDATE security regression
          Tests column, table and db level access
      mysql-test/t/grant.test:
        Bug#7391 - Multi-table UPDATE security regression
          Tests column, table and db level access
      sql/sql_update.cc:
        Bug#7391 - Multi-table UPDATE security regression
          Add in missing privilege checks.
      4f9a0a06
  23. 09 Dec, 2004 1 commit
    • unknown's avatar
      Fix for bug #6765 "Implicit access to time zone description · 9ad51c63
      unknown authored
      tables requires privileges for them if some table or column level grants
      present" (with after-review fixes).
      
      We should set SELECT_ACL for implicitly opened tables in 
      my_tz_check_n_skip_implicit_tables() to be able to bypass privilege
      checking in check_grant(). Also we should exclude those tables from
      privilege checking in multi-update.
      
      
      mysql-test/r/timezone2.result:
        Extended test for bug #6116 "SET time_zone := ... requires access to
        mysql.time_zone tables"
        Added test for bug #6765 "Implicit access to time zone description 
        tables requires privileges for them if some table or column level grants
        present"
      mysql-test/t/timezone2.test:
        Extended test for bug #6116 "SET time_zone := ... requires access to
        mysql.time_zone tables"
        Added test for bug #6765 "Implicit access to time zone description 
        tables requires privileges for them if some table or column level grants
        present"
      sql/item_geofunc.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/item_strfunc.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/log.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/mysql_priv.h:
        Now we have to include sql_acl.h before tztime.h, since 
        my_tz_check_n_skip_implicit_tables() defined there requires
        SELECT_ACL constant defined in sql_acl.h.
      sql/mysqld.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/repl_failsafe.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/set_var.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_acl.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_base.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_cache.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_class.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_db.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_derived.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_do.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_insert.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_parse.cc:
        check_one_table_access(): Tweaked comments.
        multi_update_precheck(): Added skipping of implicitly opened tables
          during privilege checking.
      sql/sql_prepare.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_repl.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_show.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_update.cc:
        sql_acl.h is now included via mysql_priv.h
      sql/sql_yacc.yy:
        sql_acl.h is now included via mysql_priv.h
      sql/tztime.h:
        my_tz_check_n_skip_implicit_tables():
          We should set SELECT_ACL for implictly opened tables to be able to
          bypass privilege checking in check_grant().
      9ad51c63
  24. 06 Dec, 2004 3 commits
    • unknown's avatar
      After merge fixes · a1fba2da
      unknown authored
      Fixed compiler warnings
      Fix core dump when sending SIGHUP to mysqld
      
      
      mysql-test/r/drop_temp_table.result:
        After merge fixes
      mysql-test/r/grant.result:
        After merge fixes
      mysql-test/r/group_min_max.result:
        After merge fixes
      mysql-test/r/innodb.result:
        After merge fixes
      mysql-test/r/insert_select.result:
        After merge fixes
      mysql-test/r/rpl_charset.result:
        After merge fixes
      mysql-test/r/rpl_create_database.result:
        After merge fixes
      mysql-test/r/rpl_loaddata_rule_m.result:
        After merge fixes
      mysql-test/t/rpl_charset.test:
        After merge fixes
      mysql-test/t/rpl_create_database.test:
        After merge fixes
      sql-common/client.c:
        After merge fixes
      sql/item.cc:
        After merge fixes
      sql/mysqld.cc:
        Fix core dump when sending SIGHUP to mysqld
      sql/sql_acl.cc:
        Better comment
      sql/sql_derived.cc:
        Fixed comment
        Added missing DBUG_RETURN
      sql/sql_insert.cc:
        Fixed compiler warnings
        After merge fixes
      sql/sql_lex.cc:
        After merge fixes
        Removed compiler warnings
      sql/sql_parse.cc:
        After merge fixes
      sql/sql_select.cc:
        More debugging
      sql/sql_table.cc:
        Added missing DBUG_VOID_RETURN
      sql/sql_update.cc:
        Fixed compiler warning
      sql/sql_view.cc:
        Added missing DBUG_RETURN
        Fixed compiler warnings
        Added flag to signal that the view is a derived table
      a1fba2da
    • unknown's avatar
    • unknown's avatar
      Add support for up to VARCHAR (size up to 65535) · a8ea31fa
      unknown authored
      Renamed HA_VAR_LENGTH to HA_VAR_LENGTH_PART
      Renamed in all files FIELD_TYPE_STRING and FIELD_TYPE_VAR_STRING to MYSQL_TYPE_STRING and MYSQL_TYPE_VAR_STRING to make it easy to catch all possible errors
      Added support for VARCHAR KEYS to heap
      Removed support for ISAM
      Now only long VARCHAR columns are changed to TEXT on demand (not CHAR)
      Internal temporary files can now use fixed length tables if the used VARCHAR columns are short
      
      
      BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
        Delete: sql/ha_isam.cc
      BitKeeper/deleted/.del-_cache.c~b5d80b5c3ae233b1:
        Delete: isam/_cache.c
      BitKeeper/deleted/.del-_dbug.c~88d7964ae5e3c9bd:
        Delete: isam/_dbug.c
      BitKeeper/deleted/.del-_dynrec.c~48dd758f5a5450df:
        Delete: isam/_dynrec.c
      BitKeeper/deleted/.del-_key.c~ce62d47a6c681084:
        Delete: isam/_key.c
      BitKeeper/deleted/.del-_locking.c~dea4cdc6ea425c67:
        Delete: isam/_locking.c
      BitKeeper/deleted/.del-_packrec.c~47ae1b16c007e9be:
        Delete: isam/_packrec.c
      BitKeeper/deleted/.del-_page.c~148b1a613d052ee8:
        Delete: isam/_page.c
      BitKeeper/deleted/.del-_search.c~f509292aa1ff18ff:
        Delete: isam/_search.c
      BitKeeper/deleted/.del-_statrec.c~58d9263b3475d58b:
        Delete: isam/_statrec.c
      BitKeeper/deleted/.del-changed.c~d075de80a314b02d:
        Delete: isam/changed.c
      BitKeeper/deleted/.del-close.c~fd62629496ee5bcc:
        Delete: isam/close.c
      BitKeeper/deleted/.del-create.c~96cecc433c0c2242:
        Delete: isam/create.c
      BitKeeper/deleted/.del-delete.c~65ee8daaa75a14b6:
        Delete: isam/delete.c
      BitKeeper/deleted/.del-extra.c~706f29d72beb2565:
        Delete: isam/extra.c
      BitKeeper/deleted/.del-info.c~96cfb747af8da0d:
        Delete: isam/info.c
      BitKeeper/deleted/.del-isamchk.c~c0f59c2687d2248f:
        Delete: isam/isamchk.c
      BitKeeper/deleted/.del-isamlog.c~85b6b31c6e2b8519:
        Delete: isam/isamlog.c
      BitKeeper/deleted/.del-log.c~55a973013d55cade:
        Delete: isam/log.c
      BitKeeper/deleted/.del-open.c~95b3b75042fae00a:
        Delete: isam/open.c
      BitKeeper/deleted/.del-pack_isam.c~43801f0df7504834:
        Delete: isam/pack_isam.c
      BitKeeper/deleted/.del-panic.c~f7fd71605324f8f3:
        Delete: isam/panic.c
      BitKeeper/deleted/.del-range.c~142f1f8ac4948082:
        Delete: isam/range.c
      BitKeeper/deleted/.del-rfirst.c~66f494291dc005d3:
        Delete: isam/rfirst.c
      BitKeeper/deleted/.del-rkey.c~cc54c6498352f999:
        Delete: isam/rkey.c
      BitKeeper/deleted/.del-rlast.c~d1fe1866139e9866:
        Delete: isam/rlast.c
      BitKeeper/deleted/.del-rnext.c~b308eaa1e11ea7de:
        Delete: isam/rnext.c
      BitKeeper/deleted/.del-rprev.c~b359f71fdea4bbce:
        Delete: isam/rprev.c
      BitKeeper/deleted/.del-rrnd.c~7fcfcce88d4a5200:
        Delete: isam/rrnd.c
      BitKeeper/deleted/.del-rsame.c~75a62d5548103a15:
        Delete: isam/rsame.c
      BitKeeper/deleted/.del-rsamepos.c~5b5652dd2cda6d5d:
        Delete: isam/rsamepos.c
      BitKeeper/deleted/.del-sort.c~e2e56b5a37ce86f4:
        Delete: isam/sort.c
      BitKeeper/deleted/.del-static.c~3a1354b84f4a9cc7:
        Delete: isam/static.c
      BitKeeper/deleted/.del-test1.c~64d52e9412d457ed:
        Delete: isam/test1.c
      BitKeeper/deleted/.del-test2.c~2f9a632cab572958:
        Delete: isam/test2.c
      BitKeeper/deleted/.del-test3.c~e8a7a4afe8a087:
        Delete: isam/test3.c
      BitKeeper/deleted/.del-isamdef.h~ac8d49e7e2201c66:
        Delete: isam/isamdef.h
      BitKeeper/deleted/.del-update.c~670264f51dc44934:
        Delete: isam/update.c
      BitKeeper/deleted/.del-write.c~8f1918b1f6770e54:
        Delete: isam/write.c
      BitKeeper/deleted/.del-Makefile.am~6cfa0db5e7778d09:
        Delete: isam/Makefile.am
      BitKeeper/deleted/.del-make-ccc~3ee55391eda0b0ab:
        Delete: isam/make-ccc
      BitKeeper/deleted/.del-ChangeLog~208984fb7a51e568:
        Delete: isam/ChangeLog
      BitKeeper/deleted/.del-test_all.res~c2aafb49a3a77db7:
        Delete: isam/test_all.res
      BitKeeper/deleted/.del-test_all~93c701e44a9c5b65:
        Delete: isam/test_all
      BitKeeper/deleted/.del-.cvsignore~54f6f0f2d5012561:
        Delete: isam/.cvsignore
      BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
        Delete: sql/ha_isammrg.cc
      BitKeeper/deleted/.del-ha_isam.h~bf53d533be3d3927:
        Delete: sql/ha_isam.h
      BitKeeper/deleted/.del-ha_isammrg.h~66fd2e5bfe7207dc:
        Delete: sql/ha_isammrg.h
      acinclude.m4:
        Remove ISAM
      client/mysqldump.c:
        FIELD_TYPE -> MYSQL_TYPE
      client/mysqltest.c:
        Add missing DBUG_RETURN
      configure.in:
        Remove ISAM
      heap/heapdef.h:
        Add support for VARCHAR
      heap/hp_create.c:
        Add support for VARCHAR
      heap/hp_delete.c:
        Add support for VARCHAR
      heap/hp_hash.c:
        Add support for VARCHAR
        (VARCHAR keys was not supported before)
      heap/hp_rkey.c:
        Add support for VARCHAR
      heap/hp_update.c:
        Add support for VARCHAR
      heap/hp_write.c:
        Add support for VARCHAR
        (Added flag SEARCH_UPDATE to mark that this is an update)
      include/decimal.h:
        Remove not needed my_global.h
      include/m_ctype.h:
        Add support for VARCHAR
      include/my_base.h:
        Add support for VARCHAR
      include/my_handler.h:
        Moved general purpose macro from MyISAM code
      include/mysql_com.h:
        Add support for VARCHAR
      libmysql/libmysql.c:
        Add support for VARCHAR
      libmysqld/Makefile.am:
        Removed ISAM
      myisam/ft_static.c:
        Add support for VARCHAR
      myisam/ft_test1.c:
        Add support for VARCHAR
      myisam/ft_update.c:
        Add support for VARCHAR
      myisam/mi_check.c:
        Add support for VARCHAR
      myisam/mi_create.c:
        Add support for VARCHAR
        - VARCHAR key segments are marked with HA_VAR_LENGTH_PART
      myisam/mi_key.c:
        Add support for VARCHAR
        Fixed bug in old VARCHAR code when reading index-only
      myisam/mi_range.c:
        Fixed comment style
      myisam/mi_rnext_same.c:
        Handle case where equal keys can be of different length
      myisam/mi_search.c:
        Add support for VARCHAR
      myisam/mi_test1.c:
        Add support for VARCHAR
      myisam/mi_unique.c:
        Add support for VARCHAR
        (Some new code to handle keys that are equal but have different lengths)
      myisam/mi_write.c:
        Fixed comment
      myisam/myisamchk.c:
        Better infotext if wrong type
      mysql-test/r/bdb.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/create.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/ctype_tis620.result:
        Updated old result and new results for VARCHAR
        (Old code sorted tis620 wrong)
      mysql-test/r/ctype_ucs.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/endspace.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/func_like.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/heap.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/innodb.result:
        Updated old result. This will change a bit when also InnoDB supports VARCHAR
      mysql-test/r/merge.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/myisam.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/mysqldump.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/order_by.result:
        Updated old result and new results for VARCHAR
        (Key length is different for VARCHAR)
      mysql-test/r/ps.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/ps_1general.result:
        Updated results for new .frm version
        Don't print seconds in show full process list as this may change
      mysql-test/r/ps_2myisam.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/ps_3innodb.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/ps_4heap.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/ps_5merge.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/ps_6bdb.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/select.result.es:
        Updated results by hand
      mysql-test/r/select.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/select_found.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/show_check.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/strict.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/subselect.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/system_mysql_db.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/type_blob.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/type_ranges.result:
        Updated old result and new results for VARCHAR
      mysql-test/r/type_ranges.result.es:
        Updated some results by hand
      mysql-test/t/bdb.test:
        Test VARCHAR
      mysql-test/t/ctype_ucs.test:
        Some fixes related to VARCHAR
      mysql-test/t/endspace.test:
        Fixes to make it easier to compare columns with end space
      mysql-test/t/heap.test:
        Test VARCHAR
      mysql-test/t/innodb.test:
        Prepare for testing VARCHAR
      mysql-test/t/myisam.test:
        Test VARCHAR
      mysql-test/t/ps_1general.test:
        Don't show seconds for show processlist
      mysql-test/t/ps_4heap.test:
        Update for VARCHAR
      mysql-test/t/strict.test:
        Fix test for VARCHAR
      mysql-test/t/type_blob.test:
        Update test for VARCHAR
        Note that now you can't store 'a' and 'a ' in an unique varchar/text index if the column is not binary
      mysys/my_handler.c:
        Add support for VARCHAR
      ndb/src/common/util/NdbSqlUtil.cpp:
        Fix for usage of strnncollsp
      scripts/mysql_fix_privilege_tables.sh:
        Simple fix so that my_print_defaults works
      sql/Makefile.am:
        Remove ISAM
      sql/field.cc:
        Add support for VARCHAR
        Fixed the keys for blob's are compared with strnncollsp
        Ensure that old tables from MySQL 4.0 works as they did before.
        (Old VARCHAR will be converted to new VARCHAR on ALTER TABLE)
      sql/field.h:
        Add support for VARCHAR
      sql/field_conv.cc:
        Change FIELD_TYPE_VAR_STRING -> MYSQL_TYPE_VARCHAR
        Added usage of HA_KEY_BLOB_LENGTH
      sql/ha_berkeley.cc:
        Add support for VARCHAR
        Added usage of table->insert_or_update if we would ever want to know in key_cmp if we are changing keys
      sql/ha_heap.cc:
        Add support for VARCHAR
      sql/ha_innodb.cc:
        Changed MYSQL_TYPE_VAR_STRING to MYSQL_TYPE_VARCHAR.
        Waiting for Heikki to add full VARCHAR support
      sql/ha_innodb.h:
        InnoDB doesn't support full VARCHAR yet
      sql/ha_myisam.cc:
        Add support for VARCHAR
      sql/ha_ndbcluster.cc:
        Add support for VARCHAR
      sql/handler.h:
        Added HA_NO_VARCHAR for table handler that doesn't support VARCHAR. In this case MySQL will create a normal CHAR instead
      sql/item.cc:
        Fixed access of already freed memory
        Added support of VARCHAR
        - varchar length is now checked in mysql_prepare
      sql/item_cmpfunc.cc:
        Added new parameter to strncollsp
      sql/item_sum.cc:
        Added new parameter to strncollsp
        FIELD_TYPE -> MYSQL_TYPE
      sql/key.cc:
        Add support for VARCHAR
      sql/opt_range.cc:
        Remove character set parameter from set_key_image()
      sql/opt_sum.cc:
        Remove character set parameter from set_key_image()
      sql/protocol.cc:
        Return MYSQL_TYPE_VAR_STRING instead of MYSQL_TYPE_VARCHAR to clients (to not cause compatiblity problems)
      sql/sql_acl.cc:
        Change key handling code so that we can use CHAR or VARCHAR for the user table columns
      sql/sql_base.cc:
        Remove old, not used code
      sql/sql_help.cc:
        Remove charset from get_key_image
      sql/sql_parse.cc:
        Ensure that OPTION_TABLE_LOCK is cleared ASAP; This fixed a problem in BDB transaction code when one used LOCK TABLES on a BDB table
        Added support for VARCHAR
        Moved field length checking and VARCHAR -> TEXT convert to mysql_prepare (as we need the know the character set for the column)
      sql/sql_select.cc:
        Added support of VARCHAR
        Added heuristic to use fixed size rows for tmp tables if we are using only a few short VARCHAR's
      sql/sql_string.cc:
        Added extra argument to strnncollsp
      sql/sql_table.cc:
        Add support for VARCHAR
        Automaticly convert (with warning) big VARCHAR (but not CHAR) to TEXT
        If handler doesn't support VARCHAR convert VARCHAR to CHAR
      sql/sql_update.cc:
        Fixed compiler warning
      sql/sql_yacc.yy:
        Add support for VARCHAR
      sql/strfunc.cc:
        Fixed valgrind warning
      sql/structs.h:
        Added 'table' to KEY structure to make life easier for some handler functions
      sql/table.cc:
        Add support for VARCHAR
        - New .frm version
        - FIELD_TYPE -> MYSQL_TYPE
      sql/table.h:
        Added insert_or_update; A bool flag a handler can set/reset if needed (for handler internal usage)
      sql/unireg.h:
        Add support for VARCHAR
      strings/ctype-big5.c:
        Added new argument to strnncollsp() to allow one to define if end space are significant or not
        Changed my_like_range... to correctly calculate min_length & max_length
      strings/ctype-bin.c:
        Added new argument to strnncollsp() to allow one to define if end space are significant or not
      strings/ctype-czech.c:
        Changed my_like_range... to correctly calculate min_length & max_length
      strings/ctype-gbk.c:
        Added new argument to strnncollsp() to allow one to define if end space are significant or not
        Changed my_like_range... to correctly calculate min_length & max_length
      strings/ctype-latin1.c:
        Added new argument to strnncollsp() to allow one to define if end space are significant or not
      strings/ctype-mb.c:
        Added new argument to strnncollsp() to allow one to define if end space are significant or not
        Changed my_like_range... to correctly calculate min_length & max_length
      strings/ctype-simple.c:
        Added new argument to strnncollsp() to allow one to define if end space are significant or not
        Changed my_like_range... to correctly calculate min_length & max_length
      strings/ctype-sjis.c:
        Added new argument to strnncollsp() to allow one to define if end space are significant or not
        Changed my_like_range... to correctly calculate min_length & max_length
      strings/ctype-tis620.c:
        Added new argument to strnncollsp() to allow one to define if end space are significant or not
        Changed my_like_range... to correctly calculate min_length & max_length
      strings/ctype-uca.c:
        Added new argument to strnncollsp() to allow one to define if end space are significant or not
      strings/ctype-ucs2.c:
        Changed my_like_range... to correctly calculate min_length & max_length
      strings/ctype-utf8.c:
        Added new argument to strnncollsp() to allow one to define if end space are significant or not
      strings/ctype-win1250ch.c:
        Changed my_like_range... to correctly calculate min_length & max_length
      strings/decimal.c:
        Fixed include files usage
        Fixed some compiler warnings
      tests/client_test.c:
        Ensure tests works with VARCHAR
      a8ea31fa
  25. 03 Dec, 2004 1 commit
    • unknown's avatar
      Bug#6391 (binlog-do-db rules ignored) · 220acb32
      unknown authored
        CREATE DATABASE statement used the current database instead of the
        database created when checking conditions for replication.
        CREATE/DROP/ALTER DATABASE statements are now replicated based on
        the manipulated database.
      
      
      mysql-test/t/rpl_until.test:
        Longer sleep to allow slave to stop.
      mysql-test/t/rpl_charset.test:
        Position change in binary file.
      mysql-test/r/drop_temp_table.result:
        Position change in binlog.
      mysql-test/r/rpl_loaddata_rule_m.result:
        Position change in binlog.
      mysql-test/r/rpl_charset.result:
        Position change in binlog.
      sql/log_event.h:
        Added new flag and parameter to suppress generation of
        USE statements.
      sql/log_event.cc:
        Added parameter and code to suppress generation of
        USE statements.
      sql/sql_db.cc:
        Suppress generation of USE before CREATE/ALTER/DROP DATABASE
        statements.
      sql/log.cc:
        Query_log_event have new extra parameter.
      sql/sql_table.cc:
        Query_log_event have new extra parameter.
      sql/sql_base.cc:
        Query_log_event have new extra parameter.
      sql/sql_update.cc:
        Query_log_event have new extra parameter.
      sql/sql_insert.cc:
        Query_log_event have new extra parameter.
      sql/sql_rename.cc:
        Query_log_event have new extra parameter.
      sql/sql_delete.cc:
        Query_log_event have new extra parameter.
      sql/sql_acl.cc:
        Query_log_event have new extra parameter.
      sql/handler.cc:
        Query_log_event have new extra parameter.
      sql/item_func.cc:
        Query_log_event have new extra parameter.
      sql/sql_parse.cc:
        Query_log_event have new extra parameter.
      220acb32
  26. 28 Nov, 2004 1 commit
  27. 25 Nov, 2004 2 commits
    • unknown's avatar
      spelling fixed/comments added (postreview fixes) · 7108deee
      unknown authored
      sql/mysqld.cc:
        spelling fixed
      sql/sql_base.cc:
        spelling fixed
      sql/sql_delete.cc:
        spelling fixed
      sql/sql_parse.cc:
        comments added
      sql/sql_prepare.cc:
        comments added
      sql/sql_update.cc:
        spelling fixed
      sql/sql_view.cc:
        spelling fixed
      sql/table.cc:
        spelling fixed
      7108deee
    • unknown's avatar
      post-merge fix · f88d0193
      unknown authored
      mysql-test/r/view.result:
        changes in error number, and key in view processing
      mysql-test/t/view.test:
        changes in error number, and key in view processing
      sql/mysql_priv.h:
        changes functions
      sql/sp.cc:
        now we report to setup_tables(), are we setuping SELECT...INSERT
      sql/sql_base.cc:
        fixed finding table, taking in account join view, which can have not TABLE pointer
        now we report to setup_tables(), are we setuping SELECT...INSERT and ennumerete insert table separately
      sql/sql_delete.cc:
        now we report to setup_tables(), are we setuping SELECT...INSERT
      sql/sql_help.cc:
        now we report to setup_tables(), are we setuping SELECT...INSERT
      sql/sql_insert.cc:
        fixed returning value of functions
      sql/sql_load.cc:
        now we report to setup_tables(), are we setuping SELECT...INSERT
        removed second setup_tables call (merge)
      sql/sql_olap.cc:
        now we report to setup_tables(), are we setuping SELECT...INSERT
      sql/sql_parse.cc:
        UPDATE->MULTIUPDATE switching fixed
      sql/sql_prepare.cc:
        UPDATE->MULTIUPDATE switching fixed
      sql/sql_select.cc:
        now we report to setup_tables(), are we setuping SELECT...INSERT
      sql/sql_update.cc:
        UPDATE->MULTIUPDATE switching fixed
      sql/sql_view.cc:
        returning value fixed
      sql/sql_view.h:
        returning value fixed
      f88d0193
  28. 21 Nov, 2004 1 commit
  29. 13 Nov, 2004 1 commit
    • unknown's avatar
      now my_printf_error is not better then my_error, but my_error call is shorter · 8d71bcec
      unknown authored
      used only one implementation of format parser of (printf)
      fixed multistatement
      
      
      include/mysqld_error.h:
        newerror messages
      mysql-test/t/key.test:
        unknown error replaced with real error
      mysys/my_error.c:
        my_error & my_printf_error use my_vsprintf
      sql/field_conv.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/ha_innodb.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/handler.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/item.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/item_cmpfunc.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/item_func.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/item_strfunc.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/lock.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/log.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/parse_file.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/procedure.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/protocol.cc:
        no need reset thd->lex->found_colon to break multiline sequance now, send_error called too late
      sql/repl_failsafe.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/set_var.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/share/czech/errmsg.txt:
        new errors converted from unknown error
      sql/share/danish/errmsg.txt:
        new errors converted from unknown error
      sql/share/dutch/errmsg.txt:
        new errors converted from unknown error
      sql/share/english/errmsg.txt:
        new errors converted from unknown error
      sql/share/estonian/errmsg.txt:
        new errors converted from unknown error
      sql/share/french/errmsg.txt:
        new errors converted from unknown error
      sql/share/german/errmsg.txt:
        new errors converted from unknown error
      sql/share/greek/errmsg.txt:
        new errors converted from unknown error
      sql/share/hungarian/errmsg.txt:
        new errors converted from unknown error
      sql/share/italian/errmsg.txt:
        new errors converted from unknown error
      sql/share/japanese/errmsg.txt:
        new errors converted from unknown error
      sql/share/korean/errmsg.txt:
        new errors converted from unknown error
      sql/share/norwegian-ny/errmsg.txt:
        new errors converted from unknown error
      sql/share/norwegian/errmsg.txt:
        new errors converted from unknown error
      sql/share/polish/errmsg.txt:
        new errors converted from unknown error
      sql/share/portuguese/errmsg.txt:
        new errors converted from unknown error
      sql/share/romanian/errmsg.txt:
        new errors converted from unknown error
      sql/share/russian/errmsg.txt:
        new errors converted from unknown error
      sql/share/serbian/errmsg.txt:
        new errors converted from unknown error
      sql/share/slovak/errmsg.txt:
        new errors converted from unknown error
      sql/share/spanish/errmsg.txt:
        new errors converted from unknown error
      sql/share/swedish/errmsg.txt:
        new errors converted from unknown error
      sql/share/ukrainian/errmsg.txt:
        new errors converted from unknown error
      sql/slave.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sp.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sp_head.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_acl.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_analyse.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_base.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_class.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_db.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_delete.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_handler.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_insert.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_load.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_map.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_parse.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
        multi-row command fixed
      sql/sql_prepare.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
        remover send_error ingected from 4.1
      sql/sql_rename.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_repl.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_select.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_show.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_table.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_trigger.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_udf.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_update.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_view.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/sql_yacc.yy:
        now my_printf_error is not better then my_error, but my_error call is shorter
      sql/table.cc:
        now my_printf_error is not better then my_error, but my_error call is shorter
      strings/my_vsnprintf.c:
        * format support added to my_vsprint
      8d71bcec
  30. 12 Nov, 2004 1 commit
    • unknown's avatar
      post-review fixes · 9e921615
      unknown authored
      mysql-test/r/rpl_rotate_logs.result:
        removed host dependence in error messages
      mysql-test/t/rpl_rotate_logs.test:
        removed host dependence in error messages
      mysys/my_error.c:
        comment about using my_error family functions
      sql/filesort.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/ha_innodb.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/handler.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/item.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/item_cmpfunc.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/item_func.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/item_strfunc.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/item_subselect.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/item_sum.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/lock.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/log.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/mysql_priv.h:
        error check moved to fill_record
      sql/mysqld.cc:
        fixed error messages
      sql/parse_file.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/protocol.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/protocol_cursor.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/repl_failsafe.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/set_var.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/slave.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sp.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sp_head.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sp_rcontext.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_acl.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_analyse.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_base.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
        error check moved to fill_record
      sql/sql_class.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_class.h:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_db.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_delete.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
        error check moved to fill_record
      sql/sql_handler.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_help.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_insert.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
        error check moved to fill_record
      sql/sql_lex.cc:
        layout fixed
      sql/sql_load.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_map.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_parse.cc:
        error check moved to fill_record
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_prepare.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_rename.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_repl.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_select.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_show.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_table.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_trigger.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_udf.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_union.cc:
        error check moved to fill_record
      sql/sql_update.cc:
        error check moved to fill_record
      sql/sql_view.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/sql_yacc.yy:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/table.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      sql/unireg.cc:
        changing my_error on my_message and my_printf_error where if they are prefered
      9e921615
  31. 11 Nov, 2004 1 commit
    • unknown's avatar
      Few more places with thd->lex replaced with lex (mysql_update, · 7161b21f
      unknown authored
      check_simple_select). This change was inspired by Monty in December 2003
      when thd->lex became a pointer in 4.1.
      
      
      sql/sql_parse.cc:
        Few more places with thd->lex replaced with lex.
      sql/sql_update.cc:
        Few more places with thd->lex replaced with lex.
      7161b21f
  32. 07 Nov, 2004 1 commit
    • unknown's avatar
      postreview fixes · f1b9bf69
      unknown authored
      mysql-test/r/multi_update.result:
        test with multiupdate reopening tables
      mysql-test/t/multi_update.test:
        test with multiupdate reopening tables
      sql/item.cc:
        processor for cleunuping items in item tree
      sql/item.h:
        processor for cleunuping items in item tree
      sql/sql_update.cc:
        fixed case when lock reopened tables
      sql/table.cc:
        methos for cleunup view itema of table if they are present
      sql/table.h:
        methos for cleunup view itema of table if they are present
      f1b9bf69
  33. 05 Nov, 2004 1 commit
    • unknown's avatar
      new lock for multiupdate: · 8b0ece5e
      unknown authored
      - open and create derived tables
      - detect which tables should be locked for write
      - lock and fill derived tables
      some unitialized variables fixed
      
      
      mysql-test/r/lock_multi.result:
        correct results returned
      mysql-test/r/multi_update.result:
        correct results returned
      mysql-test/r/view.result:
        correct results returned
      mysql-test/t/multi_update.test:
        correct results returned
      mysql-test/t/view.test:
        correct results returned
      sql/mysql_priv.h:
        derived tables processing splited on table creation and table filling
      sql/sql_base.cc:
        derived tables processing splited on table creation and table filling
      sql/sql_class.h:
        function to detect when we need fill derived tables
      sql/sql_derived.cc:
        derived tables processing splited on table creation and table filling
      sql/sql_lex.cc:
        fixed uninitialized value
      sql/sql_load.cc:
        fixed uninitialized value
      sql/sql_parse.cc:
        initialization muved (will be done for all queries)
      sql/sql_prepare.cc:
        preparation of multiupdate changed a bit because new locking procedure
      sql/sql_update.cc:
        new lock for multiupdate:
        - open and create derived tables
        - detect which tables should be locked for write
        - lock and fill derived tables
      sql/table.h:
        place to store select_result between creation and filling tables
      8b0ece5e