An error occurred fetching the project authors.
  1. 30 Jul, 2005 1 commit
    • unknown's avatar
      Fix bug #11335 View redefines TinyInt(1) column definition · a292b424
      unknown authored
      Item_type_holder doesn't store information about length and exact type of
      original item which results in redefining length to max_length and geometry 
      type to longtext.
      
      Changed the way derived tables except unions are built. Now they are created
      from original field list instead of list of Item_type_holder.
      
      
      mysql-test/r/subselect.result:
        Fixed wrong test case result. bug#11335
      mysql-test/r/view_grant.result:
         Fixed wrong test case result. bug#11335
      mysql-test/r/view.result:
        Added test case for bug #11335. Fixed wrong test case result.
      mysql-test/t/view.test:
        Test case for bug #11335 View  redefines TinyInt(1) column definition.
      sql/sql_union.cc:
        Fix bug #11335 View redefines TinyInt(1) column definition.
        Changed the way derived tables except unions are built. Now they are created from original field list instead of list of Item_type_holders.
      sql/sql_select.cc:
        Fix bug #11335 View redefines TinyInt(1) column definition.
        Added special handling of DATE/TIME fields to preserve field's type in tmp field creation.
        In create_tmp_field() for Item_field added special handling of case when item have to be able to store NULLs but underlaid field is NOT NULL.
      sql/item_sum.cc:
        Fix bug #11335 View redefines TinyInt(1) column definition.
        Added special handling of DATE/TIME fields to preserve field's type while tmp
        field created in Item_sum_hybrid::create_tmp_field().
      a292b424
  2. 04 Jul, 2005 1 commit
    • unknown's avatar
      Fixes during review of new code · 306ebf7b
      unknown authored
      - Mostly indentation fixes
      - Added missing test
      - Ensure that Item_func_case() checks for stack overruns
      - Use real_item() instead of (Item_ref*) item
      - Fixed wrong error handling
      
      
      myisam/mi_unique.c:
        Improved comments
      myisam/myisampack.c:
        Updated version number
      mysql-test/r/group_by.result:
        Added test that was lost during earlier merge
      mysql-test/r/information_schema.result:
        Safety fix: Drop procedures before used
      mysql-test/t/group_by.test:
        Added test that was lost during earlier merge
      mysql-test/t/information_schema.test:
        Safety fix: Drop procedures before used
      mysys/hash.c:
        Updated comment
      sql/field.cc:
        false -> FALSE
      sql/ha_ndbcluster.cc:
        Fix some style issues
        - No () around argument to 'case'
        - Space before ( in switch and if
        - Removed 'goto'
        - Added {}
        - Added () to make expressions easier to read
        - my_snprintf -> strmov
      sql/handler.cc:
        if( -> if (
      sql/item.cc:
        Indentation changes
      sql/item.h:
        false -> FALSE
      sql/item_cmpfunc.cc:
        Ensure that Item_func_case() check for stack overrun properly
      sql/item_cmpfunc.h:
        Ensure that Item_func_case() check for stack overrun properly
      sql/item_func.cc:
        Indentation fixes
        Fixed wrong goto label
      sql/mysqld.cc:
        Remove test for opt_disable_networking as this flag can never be set here
      sql/opt_range.cc:
        Simplify code
      sql/sql_class.h:
        Move define out from middle of class definition
      sql/sql_parse.cc:
        Remove extra empty lines
      sql/sql_select.cc:
        use real_item() instead of (Item_ref*) item
        Modifed function comment to be align with others
        Simple optimization
      sql/sql_union.cc:
        Portability fix:
        Don't use 'bool_variable|=...'
      sql/sql_view.cc:
        Move List_iterator_fast out from loops (rewind is faster than creating a new itearator)
      strings/ctype-utf8.c:
        if( -> if (
      strings/ctype.c:
        Remove disabled code
      strings/decimal.c:
        Indentation fixes
      strings/xml.c:
        Indentation fixes
      306ebf7b
  3. 01 Jul, 2005 1 commit
    • unknown's avatar
      Name resolution context added (BUG#6443) · b4f595b9
      unknown authored
      include/my_bitmap.h:
        new bitmap operation
      mysql-test/r/view.result:
        added warnings
        Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
      mysql-test/t/view.test:
        Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
      mysys/my_bitmap.c:
        new bitmap operation
      sql/field.h:
        index of field in table added
      sql/item.cc:
        Name resolution context added
        table list removed from fix_fields() arguments
      sql/item.h:
        Name resolution context added
        table list removed from fix_fields() arguments
      sql/item_cmpfunc.cc:
        table list removed from fix_fields() arguments
      sql/item_cmpfunc.h:
        table list removed from fix_fields() arguments
      sql/item_func.cc:
        table list removed from fix_fields() arguments
      sql/item_func.h:
        table list removed from fix_fields() arguments
      sql/item_row.cc:
        table list removed from fix_fields() arguments
      sql/item_row.h:
        table list removed from fix_fields() arguments
      sql/item_strfunc.cc:
        fixed server crash on NULL argument
      sql/item_strfunc.h:
        table list removed from fix_fields() arguments
      sql/item_subselect.cc:
        table list removed from fix_fields() arguments
      sql/item_subselect.h:
        table list removed from fix_fields() arguments
      sql/item_sum.cc:
        table list removed from fix_fields() arguments
      sql/item_sum.h:
        table list removed from fix_fields() arguments
      sql/item_timefunc.cc:
        table list removed from fix_fields() arguments
      sql/item_timefunc.h:
        table list removed from fix_fields() arguments
      sql/item_uniq.h:
        table list removed from fix_fields() arguments
      sql/log_event.cc:
        Name resolution context added
      sql/log_event.h:
        Name resolution context added
      sql/mysql_priv.h:
        Name resolution context added
      sql/set_var.cc:
        table list removed from fix_fields() arguments
      sql/share/errmsg.txt:
        new error message
      sql/sp.cc:
        Name resolution context added
      sql/sp_head.cc:
        table list removed from fix_fields() arguments
      sql/sp_head.h:
        Name resolution context added
      sql/sql_base.cc:
        table list removed from fix_fields() arguments
        Name resolution context added
      sql/sql_class.cc:
        renamed variable
      sql/sql_delete.cc:
        Name resolution context added
      sql/sql_derived.cc:
        Name resolution context added
      sql/sql_do.cc:
        table list removed from fix_fields() arguments
      sql/sql_handler.cc:
        Name resolution context added
      sql/sql_help.cc:
        Name resolution context added
      sql/sql_insert.cc:
        Name resolution context added
        table list removed from fix_fields() arguments
      sql/sql_lex.cc:
        Name resolution context added
      sql/sql_lex.h:
        removed resolve mode (information stored into name resolution context)
      sql/sql_load.cc:
        table list removed from fix_fields() arguments
      sql/sql_olap.cc:
        Name resolution context added
      sql/sql_parse.cc:
        Name resolution context added
      sql/sql_prepare.cc:
        table list removed from fix_fields() arguments
      sql/sql_select.cc:
        table list removed from fix_fields() arguments
      sql/sql_show.cc:
        Name resolution context added
      sql/sql_trigger.cc:
        table list removed from fix_fields() arguments
      sql/sql_udf.h:
        table list removed from fix_fields() arguments
      sql/sql_union.cc:
        Name resolution context added
      sql/sql_update.cc:
        Name resolution context added
      sql/sql_view.cc:
        Name resolution context added
      sql/sql_view.h:
        table list removed from fix_fields() arguments
      sql/sql_yacc.yy:
        Name resolution context added
      sql/table.cc:
        Name resolution context added
        merged view processing moved
      sql/table.h:
        merged view processing moved
      b4f595b9
  4. 29 Jun, 2005 1 commit
  5. 24 Jun, 2005 1 commit
    • unknown's avatar
      - don't call JOIN::join_free(1) twice for every join in JOIN::cleanup(). · 97e78d60
      unknown authored
      The reason it happened was that both, JOIN::cleanup() and JOIN::join_free(),
      went over all nested joins and called cleanup/join_free for them.
      For that:
      - split recursive and non-recursive parts of JOIN::cleanup() and
      JOIN::join_free()
      - rename JOIN::cleanup to JOIN::destroy, as it actually destroys its
        argument
      - move the recursive part of JOIN::cleanup to st_select_lex::cleanup
      - move the non-recursive part of JOIN::join_free to the introduced
        method JOIN::cleanup().
      
      
      sql/sql_lex.h:
        Add st_select_lex::cleanup, a counterpart of st_select_lex_unit::cleanup()
      sql/sql_select.cc:
        - remove two unused arguments from return_zero_rows
        - split JOIN::join_free and JOIN::cleanup to recursive and non-recursive
          parts.
        - note, the assert in JOIN::join_free _does_ fail in having.test.
          We have two options: a) propagate `full' flag to the nested joins.
          We did it before, and this patch didn't change it. If so, we 
          can end up cleaning up an uncacheable JOIN (that is, the join that
          we might need again).
          b) evaluate own 'full' flag on every level. In this case, we might
          end up with tables freed in mysql_unlock_read_tables, but not
          cleaned up properly, and this may be even worse. The test suite
          passes with both approaches, but not with the assert.
      sql/sql_select.h:
        - declarations for JOIN::cleanup() and JOIN::join_free()
      sql/sql_union.cc:
        Add st_select_lex::cleanup, a counterpart of st_select_lex_unit::cleanup():
        move the recursive part of JOIN::cleanup to it.
      97e78d60
  6. 17 Jun, 2005 1 commit
    • unknown's avatar
      Clean up warnings and build problems on Windows. (Bug #11045) · 94d1d886
      unknown authored
      VC++Files/sql/mysqld.dsp:
        Link debug server against debug yassl
      sql/examples/ha_archive.cc:
        Fix type for variables used to store number of rows
        Add cast when reading current position
      sql/examples/ha_archive.h:
        Fix variables used to store rows to ha_rows
      sql/ha_federated.cc:
        Remove unused variables, fix type of variable used to store query id
      sql/item_strfunc.cc:
        Remove unused variables
      sql/sql_acl.cc:
        Remove unused variables
      sql/sql_lex.cc:
        Add casts to fix type used for counting number of rows
      sql/sql_lex.h:
        Fix size of options to be ulong again
      sql/sql_insert.cc:
        Fix type of query id value
      sql/sql_union.cc:
        Cast value for number of rows to ha_rows
      sql/sql_yacc.yy:
        Remove unused variable
      sql/table.cc:
        Add casts for handling key_part lengths
      94d1d886
  7. 15 Jun, 2005 1 commit
    • unknown's avatar
      renamed: · f1e42a0b
      unknown authored
        Item_buff -> Cached_item
        Item_arena -> Query_arena
        TEST_ASSERT -> YYERROR_UNLESS
      
      
      sql/item.h:
        renamed:
          Item_buff -> Cached_item
      sql/item_buff.cc:
        renamed:
          Item_buff -> Cached_item
      sql/item_func.cc:
        renamed:
          Item_arena -> Query_arena
      sql/item_subselect.cc:
        renamed:
          Item_arena -> Query_arena
      sql/sp_head.cc:
        renamed:
          Item_arena -> Query_arena
      sql/sp_head.h:
        renamed:
          Item_arena -> Query_arena
      sql/sql_base.cc:
        renamed:
          Item_arena -> Query_arena
      sql/sql_class.cc:
        renamed:
          Item_arena -> Query_arena
      sql/sql_class.h:
        renamed:
          Item_arena -> Query_arena
      sql/sql_lex.cc:
        renamed:
          Item_arena -> Query_arena
      sql/sql_prepare.cc:
        renamed:
          Item_arena -> Query_arena
      sql/sql_select.cc:
        renamed:
          Item_arena -> Query_arena
      sql/sql_select.h:
        renamed:
          Item_buff -> Cached_item
          Item_arena -> Query_arena
      sql/sql_union.cc:
        renamed:
          Item_arena -> Query_arena
      sql/sql_view.cc:
        renamed:
          Item_arena -> Query_arena
      sql/sql_yacc.yy:
        renamed:
          TEST_ASSERT -> YYERROR_UNLESS
      sql/table.cc:
        renamed:
          Item_arena -> Query_arena
      f1e42a0b
  8. 07 Jun, 2005 1 commit
    • unknown's avatar
      Patch two (the final one) for Bug#7306 "the server side preparedStatement · 5188f031
      unknown authored
       error for LIMIT placeholder".
      The patch adds grammar support for LIMIT ?, ? and changes the
      type of ST_SELECT_LEX::select_limit,offset_limit from ha_rows to Item*,
      so that it can point to Item_param.
      
      
      mysql-test/include/ps_modify.inc:
        Fix existing tests: now LIMIT can contain placeholders.
      mysql-test/include/ps_query.inc:
        Fix existing tests: now LIMIT can contain placeholders.
      mysql-test/r/ps.result:
        Add basic test coverage for LIMIT ?, ? and fix test results.
      mysql-test/r/ps_2myisam.result:
        Fix test results: now LIMIT can contain placeholders.
      mysql-test/r/ps_3innodb.result:
        Fix test results: now LIMIT can contain placeholders.
      mysql-test/r/ps_4heap.result:
        Fix test results: now LIMIT can contain placeholders.
      mysql-test/r/ps_5merge.result:
        Fix test results: now LIMIT can contain placeholders.
      mysql-test/r/ps_6bdb.result:
        Fix test results: now LIMIT can contain placeholders.
      mysql-test/r/ps_7ndb.result:
        Fix test results: now LIMIT can contain placeholders.
      mysql-test/t/ps.test:
        Add basic test coverage for LIMIT ?, ?.
      sql/item.h:
        Add a short-cut for (ulonglong) val_int() to Item.
        Add a constructor to Item_int() that accepts ulonglong.
        Simplify Item_uint constructor by using the c-tor above.
      sql/item_subselect.cc:
        Now select_limit has type Item *.
        We can safely create an Item in Item_exists_subselect::fix_length_and_dec():
        it will be allocated in runtime memory root and freed in the end of
        execution.
      sql/sp_head.cc:
        Add a special initalization state for stored procedures to 
        be able to easily distinguish the first execution of a stored procedure
        from prepared statement prepare.
      sql/sql_class.h:
        Introduce new state 'INITIALIZED_FOR_SP' to be able to easily distinguish
        the first execution of a stored procedure from prepared statement prepare.
      sql/sql_derived.cc:
        - use unit->set_limit() to set unit->select_limit_cnt, offset_limit_cnt
          evreryplace. Add a warning about use of set_limit in 
        mysql_derived_filling.
      sql/sql_error.cc:
        - use unit->set_limit() to set unit->select_limit_cnt, offset_limit_cnt
          evreryplace.
        - this change is also aware of bug#11095 "show warnings limit 0 returns 
        all rows instead of zero rows", so the one who merges the bugfix from
        4.1 can use local version of sql_error.cc.
      sql/sql_handler.cc:
        - use unit->set_limit() to initalize 
        unit->select_limit_cnt,offset_limit_cnt everyplace.
      sql/sql_lex.cc:
        Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
      sql/sql_lex.h:
        Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
      sql/sql_parse.cc:
        - use unit->set_limit() to initalize 
        unit->select_limit_cnt,offset_limit_cnt everyplace. 
        - we can create an Item_int to set global limit of a statement:
        it will be created in the runtime mem root and freed in the end of
        execution.
      sql/sql_repl.cc:
        Use unit->set_limit to initialize limits.
      sql/sql_select.cc:
        - select_limit is now Item* so the proper way to check for default value
        is to compare it with NULL.
      sql/sql_union.cc:
        Evaluate offset_limit_cnt using the new type of ST_SELECT_LEX::offset_limit
      sql/sql_view.cc:
        Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
      sql/sql_yacc.yy:
        Add grammar support for LIMIT ?, ? clause.
      5188f031
  9. 02 Jun, 2005 1 commit
    • unknown's avatar
      Give Item_arena::is_stmt_prepare a more descriptive name (it marks · 892032a2
      unknown authored
      the code that is active for SP as well in 5.0)
      
      
      sql/item.cc:
        Rename of an Item_arena method.
      sql/item_subselect.cc:
        Rename of an Item_arena method.
      sql/sql_class.h:
        Rename of an Item_arena method.
      sql/sql_parse.cc:
        Rename of an Item_arena method.
      sql/sql_union.cc:
        Rename of an Item_arena method.
      892032a2
  10. 30 May, 2005 2 commits
    • unknown's avatar
      One more post-review fix. · d8cec2ab
      unknown authored
      d8cec2ab
    • unknown's avatar
      Preparatory (and the most problematic) patch for Bug#7306 · 78422442
      unknown authored
      "the server side preparedStatement error for LIMIT placeholder",
      which moves all uses of LIMIT clause from PREPARE to OPTIMIZE
      and later steps.
      After-review fixes.
      
      
      mysql-test/r/group_min_max.result:
        Test results fixed for EXPLAINs when using GROUP_MIN_MAX access plan.
      sql/item_subselect.cc:
        Move setting of the internal LIMIT used for IN/ALL/ANY/EXISTS 
        subqueries to one place: Item_exists_subselect::fix_length_and_dec().
        This implies that unit->select_limit_cnt is not set until the item is 
        fixed. This is OK, as now LIMIT values are not used until JOIN::optimize.
      sql/mysql_priv.h:
        setup_tables no longer needs a special flag for the case when
        it's called from JOIN::reinit() (we don't need to call setup_tables
        between two executions of a correlated subquery).
      sql/opt_range.cc:
        Fix a glitch in GROUP_MIN_MAX access plan: we should use table metadata,
        not field data, to evaluate max_used_key_length, which is then
        used for explain.
      sql/sp.cc:
        - setup_tables signature changed.
      sql/sql_base.cc:
        - setup_tables no longer needs a special mode for subqueries.
          Unused checks were removed.
      sql/sql_delete.cc:
        - setup_tables signature changed
      sql/sql_help.cc:
        - setup_tables signature changed
      sql/sql_insert.cc:
        - setup_tables signature changed
      sql/sql_lex.cc:
        Consolidate setting of internal LIMIT for IN/ALL/ANY/EXISTS subqeries
        in one place, and hence remove it from st_select_lex::test_limit().
      sql/sql_lex.h:
        Cleanup signature of st_select_lex_unit::init_prepare_fake_select_lex().
      sql/sql_load.cc:
        - setup_tables signature changed
      sql/sql_olap.cc:
        - setup_tables signature changed
      sql/sql_parse.cc:
        - st_select_lex_unit::set_limit() signature changed
      sql/sql_select.cc:
        Move setting of JOIN::select_limit from JOIN::prepare
        to JOIN::optimize. At prepare, limit is unknown yet.
        Remove excessive cleanups from JOIN::reinit which were overwriting
        join->join_tab[i]->table->used_keys. This fixes the bug which was triggered
        by the change in item_subselect.cc.
      sql/sql_union.cc:
        Class st_select_lex_unit was changed to avoid calls to 
         st_select_lex_unit::set_limit from places where it may be unknown.
        Now unit->select_limit_cnt is set at ::exec(). 
        st_select_lex_unit::init_prepare_fake_select_lex(): 
         - move out set_limit functionality
         - remove a few lines of dead code.
        st_select_lex_unit::prepare():
          - now we don't call set_limit at the time of prepare, so the value  
            of unit->select_limit_cnt may be unknown here. Use sl->select_limit
            instead.
        st_select_lex_unit::exec():
          - cleanup
          - call set_limit explicitly as it has been moved out of 
           init_prepare_fake_select_lex.
      sql/sql_update.cc:
        - setup_tables signature changed
      78422442
  11. 23 Mar, 2005 2 commits
    • unknown's avatar
      client/mysqltest.c · 58aeecb0
      unknown authored
          corrected number of fields for --enable_metadata
      sql/sql_union.cc
          fixed a apparent typo in assert
      
      
      client/mysqltest.c:
        corrected number of fields for --enable_metadata
      mysql-test/r/metadata.result:
        corrected number of fields for --enable_metadata
      mysql-test/r/ps_1general.result:
        corrected number of fields for --enable_metadata
      mysql-test/r/ps_2myisam.result:
        corrected number of fields for --enable_metadata
      mysql-test/r/ps_3innodb.result:
        corrected number of fields for --enable_metadata
      mysql-test/r/ps_4heap.result:
        corrected number of fields for --enable_metadata
      mysql-test/r/ps_5merge.result:
        corrected number of fields for --enable_metadata
      mysql-test/r/type_enum.result:
        corrected number of fields for --enable_metadata
      sql/sql_union.cc:
        fixed a apparent typo in assert
      58aeecb0
    • unknown's avatar
      fixed union types merging and table related metadata (BUG#8824) · 5a425250
      unknown authored
      mysql-test/r/func_group.result:
        new result
      mysql-test/r/metadata.result:
        new result
        test of metadata of variables, unions and derived tables
      mysql-test/r/union.result:
        new results
        test of union of enum
      mysql-test/t/metadata.test:
        test of metadata of variables, unions and derived tables
      mysql-test/t/union.test:
        test of union of enum
      sql/field.cc:
        Field type merging rules added
        Fixed table name/alias returting for field made from temporary tables
      sql/field.h:
        removed unned field type reporting
      sql/item.cc:
        fixed bug in NEW_DATE type field creartion
        replaced mechanism of merging types of UNION
      sql/item.h:
        replaced mechanism of merging types of UNION
      sql/item_func.h:
        new item type to make correct field type detection possible
      sql/item_subselect.cc:
        added table name parameter to prepare() to show right table alias for derived tables
      sql/sql_derived.cc:
        added table name parameter to prepare() to show right table alias for derived tables
      sql/sql_lex.h:
        added table name parameter to prepare() to show right table alias for derived tables
      sql/sql_parse.cc:
        made function for enum/set pack length calculation
      sql/sql_prepare.cc:
        added table name parameter to prepare() to show right table alias for derived tables
      sql/sql_select.cc:
        new temporary table field creation by Item_type_holder
        fixed table alias for temporary table
      sql/sql_union.cc:
        added table name parameter to prepare() to show right table alias for derived tables
      5a425250
  12. 02 Mar, 2005 1 commit
  13. 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
  14. 24 Feb, 2005 1 commit
    • unknown's avatar
      Show all generated warnings in SHOW ERROR · eb18f93a
      unknown authored
      Previously we only stored the first given error (the error sent to the client)
      
      
      include/mysys_err.h:
        Moved ER_FILENOTFOUND last to avoid getting 'error 0'
      mysql-test/r/backup.result:
        More warnings from in case of errors
      mysql-test/r/innodb.result:
        More warnings from in case of errors
      mysql-test/r/key_cache.result:
        More warnings from in case of errors
      mysql-test/r/myisam.result:
        More warnings from in case of errors
      mysql-test/r/preload.result:
        More warnings from in case of errors
      mysql-test/r/repair.result:
        More warnings from in case of errors
      mysql-test/r/rpl_failed_optimize.result:
        More warnings from in case of errors
      mysql-test/r/subselect.result:
        More warnings from in case of errors
      mysql-test/t/backup.test:
        Portability fix
      mysql-test/t/innodb.test:
        Avoid some warnings
      mysql-test/t/myisam.test:
        Portability fix
      mysql-test/t/rpl_rotate_logs.test:
        Portablitiy fix
      mysys/errors.c:
        Move ER_FILENOTFOUND last to avoid error 0
      sql/mysql_priv.h:
        Indentation change
      sql/mysqld.cc:
        Save all given errors for SHOW ERRORS
      sql/protocol.cc:
        Store new errors for SHOW ERROR
        (Ignore those that are already reported with my_error())
      sql/sql_class.cc:
        More errors with SHOW ERROR
      sql/sql_class.h:
        More errors with SHOW ERROR
      sql/sql_error.cc:
        More errors with SHOW ERROR
      sql/sql_parse.cc:
        Temporary fix: Don't give error for the to-be-removed 'pre-open tables code'
      sql/sql_show.cc:
        More debugging
        Don't register errors while populating schema tables.
        (If we do, we get a LOT of warnings from information_schema.test)
      sql/sql_table.cc:
        Don't register errors from handler in drop table (as we already do it the upper level DROP TABLE code)
        Don't register errors for 'restore_table' as in most cases the table doesn't exists
      sql/sql_union.cc:
        Use file->write_row() instead of 'write_record'.
        This gives us easer to handle error messages and is faster than the old version
      eb18f93a
  15. 04 Feb, 2005 1 commit
    • unknown's avatar
      A fix: bug#6931: Date Type column problem when using UNION-Table · 66eb71f3
      unknown authored
             bug#7833:  Wrong datatype of aggregate column is returned
      
      
      mysql-test/r/func_group.result:
        Test case for bug 7833:  Wrong datatype of aggregate column is returned
      mysql-test/r/union.result:
        Test case for bug 6931: Date Type column problem when using UNION-Table.
      mysql-test/t/func_group.test:
        Test case for bug 7833:  Wrong datatype of aggregate column is returned
      mysql-test/t/union.test:
        Test case for bug 6931: Date Type column problem when using UNION-Table.
      66eb71f3
  16. 18 Jan, 2005 1 commit
    • unknown's avatar
      fixing wrong value for "examined rows" when UNION's are used. · 59ef5bed
      unknown authored
      mysql-test/r/union.result:
        result for a test case for the wrong examined rows with UNION's
      mysql-test/t/union.test:
        test case for the wrong examined rows with UNION's
      sql/sql_union.cc:
        a patch for the wrong examined rows with UNION's
      59ef5bed
  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. 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
  19. 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
  20. 18 Nov, 2004 1 commit
    • unknown's avatar
      reporting empty result added in case of max/min optimisation of ALL/ANY/SOME subqueries · 9438c2ca
      unknown authored
      fixed null processing in NOT operation used in ALL subquery (Bug #6247)
      
      
      mysql-test/r/subselect.result:
        new tests of ALL/ANY wiews
      mysql-test/t/subselect.test:
        new tests of ALL/ANY wiews
      sql/item_cmpfunc.cc:
        fixed special NOT ALL processing
        fixed processing max/min optimized subqueries with empty results (added methods to detect empty results) and special NOP operation to process them for SOME/ANY sobqueries
      sql/item_cmpfunc.h:
        fixed processing max/min optimized subqueries with empty results (added methods to detect empty results) and special NOP operation to process them for SOME/ANY sobqueries
      sql/item_subselect.cc:
        reporting empty result added for max/min subqueries
      sql/item_subselect.h:
        reporting empty result added for max/min subqueries
      sql/item_sum.cc:
        reporting empty result added fox max/min aggregate functions
      sql/item_sum.h:
        reporting empty result added fox max/min aggregate functions
      sql/sql_class.cc:
        reporting empty result added for max/min subqueries
      sql/sql_parse.cc:
        reporting empty result added for max/min subqueries
      sql/sql_union.cc:
        reporting empty result added for max/min subqueries
      9438c2ca
  21. 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
  22. 09 Nov, 2004 1 commit
    • unknown's avatar
      After merge fixes · db676261
      unknown authored
      Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
      (Before one had to change thd->mem_root ; push_back(); restore mem_root.
      
      
      mysql-test/t/range.test:
        After merge fixRecR
      sql/item_func.cc:
        After merge fix
      sql/item_sum.cc:
        After merge fix
      sql/opt_range.cc:
        After merge fix
      sql/parse_file.cc:
        After merge fix
      sql/sp.cc:
        After merge fix
      sql/sp_head.cc:
        After merge fix
      sql/sp_head.h:
        After merge fix
      sql/sql_base.cc:
        After merge fix
      sql/sql_class.h:
        After merge fix
      sql/sql_list.h:
        Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
        (Before one had to change thd->mem_root ; push_back(); restore mem_root.
      sql/sql_prepare.cc:
        After merge fix
      sql/sql_select.cc:
        After merge fix
      sql/sql_table.cc:
        After merge fix
        Fixed problem with OPTIMIZE on INNODB tables
      sql/sql_trigger.cc:
        After merge fix
      sql/sql_union.cc:
        After merge fix
      sql/sql_view.cc:
        After merge fix
      sql/sql_yacc.yy:
        After merge fix
      sql/table.cc:
        After merge fix
      db676261
  23. 07 Nov, 2004 1 commit
    • unknown's avatar
      Simpler arena swapping code · 435b20aa
      unknown authored
      Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root.
      This gives us the following benefits:
      - Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases)
      - Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT)
      - We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root
      
      
      
      client/mysqltest.c:
        Remove some not needed defines
        (Things like this should be done in config-win.h)
      include/config-win.h:
        Added popen() and pclose() compatibility macros
      mysql-test/t/rpl_failed_optimize-master.opt:
        Portability fix
      sql/ha_berkeley.cc:
        New thd->memroot handling
      sql/item_cmpfunc.cc:
        Simpler arena swapping code
      sql/item_func.cc:
        Simpler arena swapping code
      sql/item_subselect.cc:
        Simpler arena swapping code
        New thd->mem_root handling
      sql/item_sum.cc:
        New thd->mem_root handling
      sql/item_timefunc.cc:
        Fixed not-initalized usage errors found by valgrind
      sql/log_event.cc:
        New thd->mem_root handling
      sql/mysql_priv.h:
        New thd->mem_root handling
      sql/mysqld.cc:
        New thd->mem_root handling
      sql/opt_range.cc:
        New thd->mem_root handling
      sql/repl_failsafe.cc:
        New thd->mem_root handling
      sql/set_var.cc:
        New thd->mem_root handling
      sql/sql_acl.cc:
        New thd->mem_root handling
      sql/sql_base.cc:
        Simpler arena swapping code
        New thd->mem_root handling
      sql/sql_class.cc:
        New thd->mem_root handling
      sql/sql_class.h:
        Simpler arena swapping code
        New thd->mem_root handling
      sql/sql_db.cc:
        New thd->mem_root handling
      sql/sql_error.cc:
        New thd->mem_root handling
      sql/sql_help.cc:
        New thd->mem_root handling
      sql/sql_insert.cc:
        New thd->mem_root handling
      sql/sql_parse.cc:
        New thd->mem_root handling
        Added some extra checking of return value of new
      sql/sql_prepare.cc:
        New thd->mem_root handling
      sql/sql_select.cc:
        New thd->mem_root handling
      sql/sql_select.h:
        New thd->mem_root handling
      sql/sql_union.cc:
        Simpler arena swapping code
      sql/sql_yacc.yy:
        New thd->mem_root handling
      sql/table.cc:
        New thd->mem_root handling
      sql/thr_malloc.cc:
        New thd->mem_root handling
      tests/client_test.c:
        Added drop table to some tests
        Changed some table names to 't1'
      435b20aa
  24. 26 Oct, 2004 1 commit
    • unknown's avatar
      A lot of fixes for prepared statements (PS): · 853c2c78
      unknown authored
      New mysqltest that can run mysqltest with PS
      Added support for ZEROFILL in PS
      Fixed crash when one called mysql_stmt_store_result() without a preceding mysql_stmt_bind_result()
      Updated test cases to support --ps-protocol
      (Some tests are still run using old protocol)
      Fixed crash in PS when using SELECT * FROM t1 NATURAL JOIN t2...
      Fixed crash in PS when using sub queries
      Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever"
      Fixed wrong permissions check in PS and multi-table updates (one could get permission denied for legal quries)
      Fix for PS and SELECT ... PROCEDURE
      Reset all warnings when executing a new PS query
      group_concat(...ORDER BY) didn't work with PS
      Fixed problem with test suite when not using innodb
      
      
      BitKeeper/deleted/.del-innodb-lock-master.opt~f76a4a1999728f87:
        Delete: mysql-test/t/innodb-lock-master.opt
      client/Makefile.am:
        mysqltest now uses regex
      client/mysqltest.c:
        Added support for testing of prepared statements (with --ps-protocol)
        Main code was done by Kent, I did mainly some cleanups and minor bug fixes
        New test commands:
        --disable_ps_protocol
        --enable_ps_protocol
        NOTE: new code still has some things that needs to be cleaned up.
        For example run_query_stmt_handle_error() should be made more general so that same code can be used also by 'normal' queries
      configure.in:
        mysqltest now uses regex
      libmysql/libmysql.c:
        Reset warning_count after prepare (safety). In the future we should also provide warnings on prepare
        integer -> string conversion now handles ZEROFILL
        double -> string conversion is now closer to the one in the server
        Fixed crash when one called mysql_stmt_store_result() without preceding mysql_stmt_bind_result()
      libmysqld/examples/Makefile.am:
        mysqltest now uses regex
      mysql-test/include/have_query_cache.inc:
        Fixes for --ps-protocol
      mysql-test/include/ps_conv.inc:
        Fixes for --ps-protocol
      mysql-test/mysql-test-run.sh:
        Added options --ps-protocol
      mysql-test/r/ctype_utf8.result:
        Fixed test case
      mysql-test/r/fulltext_cache.result:
        Changed output of MATCH to use round() to get same numbers with --ps-protocol
      mysql-test/r/fulltext_left_join.result:
        Changed output of MATCH to use round() to get same numbers with --ps-protocol
      mysql-test/r/fulltext_multi.result:
        Changed output of MATCH to use round() to get same numbers with --ps-protocol
      mysql-test/r/innodb-lock.result:
        Fixed test to work even if Innodb is not compiled in.
      mysql-test/t/create.test:
        Fixes for --ps-protocol
      mysql-test/t/ctype_utf8.test:
        Remove warnings
      mysql-test/t/date_formats.test:
        Fixes for --ps-protocol
      mysql-test/t/fulltext_cache.test:
        Changed output of MATCH to use round() to get same numbers with --ps-protocol
      mysql-test/t/fulltext_left_join.test:
        Changed output of MATCH to use round() to get same numbers with --ps-protocol
      mysql-test/t/fulltext_multi.test:
        Changed output of MATCH to use round() to get same numbers with --ps-protocol
      mysql-test/t/func_group.test:
        Fixes for --ps-protocol
      mysql-test/t/func_sapdb.test:
        Fixes for --ps-protocol
      mysql-test/t/innodb-lock.test:
        Fixed test to work even if Innodb is not compiled in.
      mysql-test/t/insert.test:
        Fixes for --ps-protocol
      mysql-test/t/insert_select.test:
        Fixes for --ps-protocol
      mysql-test/t/insert_update.test:
        Fixes for --ps-protocol
      mysql-test/t/metadata.test:
        Fixes for --ps-protocol
      mysql-test/t/multi_statement.test:
        Fixes for --ps-protocol
      mysql-test/t/ps_1general.test:
        Fixes for --ps-protocol
      mysql-test/t/rollback.test:
        Fixes for --ps-protocol
      mysql-test/t/rpl_redirect.test:
        Fixes for --ps-protocol
      mysql-test/t/rpl_user_variables.test:
        Fixes for --ps-protocol
      mysql-test/t/select.test:
        Fixes for --ps-protocol
      mysql-test/t/status.test:
        Fixes for --ps-protocol
      mysql-test/t/type_blob.test:
        Fixes for --ps-protocol
      mysql-test/t/type_float.test:
        Fixes for --ps-protocol
      mysql-test/t/union.test:
        Fixes for --ps-protocol
      mysql-test/t/warnings.test:
        Fixes for --ps-protocol
      mysys/my_alloc.c:
        More debugging information
      sql-common/client.c:
        More debugging information
      sql-common/my_time.c:
        TIME didn't support full range with PS
      sql/field.cc:
        TIME didn't support full range with PS
      sql/item_cmpfunc.cc:
        IN(constants,...) didn't work with PS
      sql/item_subselect.cc:
        Some subqueries didn't work with PS
      sql/item_sum.cc:
        group_concat(...ORDER BY) didn't work with PS
        Removed variable warning_available as 'warning' can be used for this.
      sql/item_sum.h:
        Removed not needed variable
      sql/protocol.cc:
        TIME didn't support full range with PS
      sql/set_var.cc:
        Style fix
      sql/sql_base.cc:
        setup_wild() didn't properly restore old arena, which caused core dump in PS when using
        SELECT * FROM t1 NATURAL JOIN t2...
      sql/sql_class.cc:
        Style fix
      sql/sql_error.cc:
        Style fix
      sql/sql_insert.cc:
        Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever"
      sql/sql_lex.h:
        Fix for PS and procedures
      sql/sql_parse.cc:
        More debugging information
        Make a copy of 'db' in PS as this may change
        Fixed wrong permissions check in PS and multi-table updates
      sql/sql_prepare.cc:
        Fix for PS and SELECT ... PROCEDURE
        Reset all warnings when executing a new query
      sql/sql_union.cc:
        Fixes for PS and SELECT ... PROCEDURE
        Reset 'with_wild' as 'wild' is resolved on prepare
      853c2c78
  25. 22 Oct, 2004 3 commits
    • unknown's avatar
      A fix and test case for Bug#6088 "FOUND_ROWS returns wrong values for · 9b5cf946
      unknown authored
      prepared statements when LIMIT is used" and post-review comments.
      The fix changes the approach we calculate the need for ORDER BY 
      in UNION: the previous was not PS friendly, as it damaged SELECT_LEX 
      options in case of single select.
      
      
      mysql-test/r/ps.result:
        Test results fixed: the test case for Bug#6088
      mysql-test/r/subselect.result:
        Test results fixed: now we don't perform ORDER BY for parts of UNION
        if there is no LIMIT clause.
      mysql-test/t/ps.test:
        A test case for Bug#6088 "FOUND_ROWS returns wrong values for
         prepared statements when LIMIT is used".
      sql/sql_union.cc:
        The actual fix for Bug#6088:
        - don't modify SELECT_LEX'es
        - use boolean variable can_skip_order_by to check if we can skip
          ORDER BY in UNION
      9b5cf946
    • unknown's avatar
      Followup to fix for bug#6050: fix valgrind warnings. · 1cd249e0
      unknown authored
      sql/item.cc:
        Fix valgrind errors: we need Item::name to point to PS memory
        as well.
      sql/item.h:
        set_field no longer can be reused as is for PS purposes.
      sql/sql_union.cc:
        Item_field::set_field -> Item_field::reset_field.
      1cd249e0
    • unknown's avatar
      A fix and test case for Bug#6050 "EXECUTE stmt reports ambiguous field · 4512a46e
      unknown authored
      names with ident. tables fr. diff. schemata": revise all uses of
      Item_field and make them prepared-statements friendly when necessary.
      
      
      mysql-test/r/ps.result:
        Test results fixed: the test case for Bug#6050
      mysql-test/r/ps_1general.result:
        Test results fixed: in prepared statements we expand '*' to a list
        of fully qualified fields (db.table.column).
      mysql-test/t/ps.test:
        A test for Bug#6050 "EXECUTE stmt reports ambiguous fieldnames with 
        ident. tables fr. diff. schemata"
      sql/item.cc:
        Revise all Item_field constructors: we need to make sure that no Item_field
        object points to unaccessible memory in prepared statements.
      sql/item.h:
        Revise all Item_field constructors: we need to make sure that no Item_field
        object points to unaccessible memory in prepared statements.
      sql/sql_base.cc:
        Item_field use changed to be prepared statements friendly.
      sql/sql_class.h:
        New check of Item_arena state.
      sql/sql_union.cc:
        Fixing the problem with name resolving in UNION and prepared statements:
        In case of SELECT a, b, c FROM t1 UNION SELECT a, b, c FROM t2 the list of
        selected items is represented as a List<Item_field>, where each 
        Item_field points to a field of temporary table.
        But the temporary table is created anew on each execution of the prepared 
        statement. So on each subsequent execution we should reset Item_field
        items to point to fields from freshly-created temporary table.
      sql/table.h:
        Comment TABLE member.
      4512a46e
  26. 20 Oct, 2004 1 commit
    • unknown's avatar
      errors without code removed · 066c9056
      unknown authored
      net_printf/send_error calls replaced by my_error family functions
      -1/1 (sent/unsent) error reporting removed
      (WL#2133)
      
      
      include/mysqld_error.h:
        new errors added.
      mysql-test/r/rpl_charset.result:
        new error
      mysql-test/r/rpl_timezone.result:
        new error
      mysql-test/r/sp-security.result:
        more clean error message
      mysql-test/r/sp.result:
        now error state intercepted correctly
      mysql-test/t/connect.test:
        new error message
      mysql-test/t/rpl_charset.test:
        new error message
      mysql-test/t/rpl_timezone.test:
        new error
      mysql-test/t/sp-security.test:
        more correct error handling
      mysql-test/t/sp.test:
        now error state intercepted correctly
      sql/ha_innodb.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/ha_innodb.h:
        -1/1 (sent/unsent) error reporting removed
      sql/item.cc:
        only boolean values should be returned by fix_fields()
      sql/item_cmpfunc.cc:
        only boolean values should be returned by fix_fields()
      sql/item_func.cc:
        only boolean values should be returned by fix_fields()
        net_printf/send_error calls replaced by my_error family functions
      sql/item_row.cc:
        only boolean values should be returned by fix_fields()
      sql/item_subselect.cc:
        only boolean values should be returned by fix_fields()
        -1/1 (sent/unsent) error reporting removed
      sql/item_subselect.h:
        -1/1 (sent/unsent) error reporting removed
      sql/item_sum.cc:
        only boolean values should be returned by fix_fields()
      sql/item_timefunc.cc:
        only boolean values should be returned by fix_fields()
      sql/item_uniq.h:
        only boolean values should be returned by fix_fields()
      sql/mysql_priv.h:
        -1/1 (sent/unsent) error reporting removed
      sql/mysqld.cc:
        net_printf/send_error calls replaced by my_error family functions
        changes in my_message_sql to support error handling correctly
      sql/protocol.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/protocol_cursor.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/repl_failsafe.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/repl_failsafe.h:
        -1/1 (sent/unsent) error reporting removed
      sql/set_var.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/share/czech/errmsg.txt:
        new error messages
      sql/share/danish/errmsg.txt:
        new error messages
      sql/share/dutch/errmsg.txt:
        new error messages
      sql/share/english/errmsg.txt:
        new error messages
      sql/share/estonian/errmsg.txt:
        new error messages
      sql/share/french/errmsg.txt:
        new error messages
      sql/share/german/errmsg.txt:
        new error messages
      sql/share/greek/errmsg.txt:
        new error messages
      sql/share/hungarian/errmsg.txt:
        new error messages
      sql/share/italian/errmsg.txt:
        new error messages
      sql/share/japanese/errmsg.txt:
        new error messages
      sql/share/korean/errmsg.txt:
        new error messages
      sql/share/norwegian-ny/errmsg.txt:
        new error messages
      sql/share/norwegian/errmsg.txt:
        new error messages
      sql/share/polish/errmsg.txt:
        new error messages
      sql/share/portuguese/errmsg.txt:
        new error messages
      sql/share/romanian/errmsg.txt:
        new error messages
      sql/share/russian/errmsg.txt:
        new error messages
      sql/share/serbian/errmsg.txt:
        new error messages
      sql/share/slovak/errmsg.txt:
        new error messages
      sql/share/spanish/errmsg.txt:
        new error messages
      sql/share/swedish/errmsg.txt:
        new error messages
      sql/share/ukrainian/errmsg.txt:
        new error messages
      sql/slave.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/slave.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sp.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/sp_head.cc:
        new eror handling support
        net_printf/send_error calls replaced by my_error family functions
      sql/sp_rcontext.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_acl.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/sql_acl.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_base.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_class.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_class.h:
        my_messhage_sql now set/reset query_error flag
      sql/sql_db.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_delete.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_do.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_error.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_handler.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_help.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/sql_insert.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_lex.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_load.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_map.cc:
        errors without code removed
      sql/sql_parse.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed from mysql_execute_command
      sql/sql_prepare.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/sql_repl.cc:
        error messages fixed
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/sql_repl.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_select.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_select.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_show.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_table.cc:
        net_printf/send_error calls replaced by my_error family functions
        -1/1 (sent/unsent) error reporting removed
      sql/sql_trigger.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_udf.cc:
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_union.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_update.cc:
        -1/1 (sent/unsent) error reporting removed
        net_printf/send_error calls replaced by my_error family functions
      sql/sql_view.cc:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_view.h:
        -1/1 (sent/unsent) error reporting removed
      sql/sql_yacc.yy:
        net_printf/send_error calls replaced by my_error family functions
      066c9056
  27. 19 Oct, 2004 1 commit
    • unknown's avatar
      sql_union.cc: · ad8865cb
      unknown authored
        Check DERIVATION_NONE only for UNIONS.
      
      
      sql/sql_union.cc:
        Check DERIVATION_NONE only for UNIONS.
      ad8865cb
  28. 18 Oct, 2004 1 commit
  29. 05 Oct, 2004 1 commit
  30. 28 Sep, 2004 1 commit
    • unknown's avatar
      Strict mode & better warnings · 2a491215
      unknown authored
      Under strict mode MySQL will generate an error message if there was any conversion when assigning data to a field.
      Added checking of date/datetime fields.
      If strict mode, give error if we have not given value to field without a default value (for INSERT)
      
      
      client/mysqltest.c:
        Added --exit as an option to abort a test in a middle (good for debugging)
      include/my_time.h:
        Added flags to allow checking of dates in strict mode
      include/mysql_com.h:
        Added flag to check if field has a default value or not
      include/mysqld_error.h:
        New error messages for strict mode
      include/sql_state.h:
        Fixed SQL states (for strict mode tests)
      mysql-test/r/auto_increment.result:
        Updated error messages
      mysql-test/r/func_sapdb.result:
        Added test for ALLOW_INVALID_DATES
      mysql-test/r/func_str.result:
        Updated error messages
      mysql-test/r/func_time.result:
        Updated error messages
      mysql-test/r/insert.result:
        Updated error messages
      mysql-test/r/loaddata.result:
        Updated error messages
      mysql-test/r/select.result:
        Updated error messages
      mysql-test/r/sp.result:
        Updated error messages
      mysql-test/r/timezone2.result:
        Updated error messages
      mysql-test/r/type_datetime.result:
        Updated error messages
      mysql-test/r/type_decimal.result:
        Updated error messages
      mysql-test/r/type_float.result:
        Updated error messages
      mysql-test/r/type_ranges.result:
        Updated error messages
      mysql-test/r/type_time.result:
        Updated error messages
      mysql-test/r/type_uint.result:
        Updated error messages
      mysql-test/r/warnings.result:
        Updated error messages
      mysql-test/t/func_sapdb.test:
        Aded test
      sql-common/my_time.c:
        Added checking of dates
      sql/field.cc:
        Better error messages
        Optimization of warning handling (by introducing of check_int())
        Changed to use my_strtoll10()
      sql/field.h:
        Added check_int()
      sql/item_func.cc:
        Warnings when dividing by NULL
      sql/item_func.h:
        Warnings when dividing by NULL
      sql/item_timefunc.cc:
        Testing of date/datetime
        Use macros instead of constants
      sql/mysql_priv.h:
        New modes (part of strict mode)
      sql/mysqld.cc:
        New modes (part of strict mode)
      sql/opt_range.cc:
        Simple optimizations
      sql/protocol.cc:
        Add note/warning level to find_handler()
      sql/set_var.cc:
        Added mode 'traditional'
      sql/share/czech/errmsg.txt:
        New error messages for strict mode
      sql/share/danish/errmsg.txt:
        New error messages for strict mode
      sql/share/dutch/errmsg.txt:
        New error messages for strict mode
      sql/share/english/errmsg.txt:
        New error messages for strict mode
      sql/share/estonian/errmsg.txt:
        New error messages for strict mode
      sql/share/french/errmsg.txt:
        New error messages for strict mode
      sql/share/german/errmsg.txt:
        New error messages for strict mode
      sql/share/greek/errmsg.txt:
        New error messages for strict mode
      sql/share/hungarian/errmsg.txt:
        New error messages for strict mode
      sql/share/italian/errmsg.txt:
        New error messages for strict mode
      sql/share/japanese/errmsg.txt:
        New error messages for strict mode
      sql/share/korean/errmsg.txt:
        New error messages for strict mode
      sql/share/norwegian-ny/errmsg.txt:
        New error messages for strict mode
      sql/share/norwegian/errmsg.txt:
        New error messages for strict mode
      sql/share/polish/errmsg.txt:
        New error messages for strict mode
      sql/share/portuguese/errmsg.txt:
        New error messages for strict mode
      sql/share/romanian/errmsg.txt:
        New error messages for strict mode
      sql/share/russian/errmsg.txt:
        New error messages for strict mode
      sql/share/serbian/errmsg.txt:
        New error messages for strict mode
      sql/share/slovak/errmsg.txt:
        New error messages for strict mode
      sql/share/spanish/errmsg.txt:
        New error messages for strict mode
      sql/share/swedish/errmsg.txt:
        New error messages for strict mode
      sql/share/ukrainian/errmsg.txt:
        New error messages for strict mode
      sql/sp_rcontext.cc:
        Add note/warning level to find_handler()
      sql/sp_rcontext.h:
        Add note/warning level to find_handler()
      sql/sql_base.cc:
        Fix bug for detecting crashed table
      sql/sql_class.cc:
        Variables for strct mode
      sql/sql_class.h:
        Variables for strct mode
      sql/sql_error.cc:
        In strict mode, convert warnings to errors
      sql/sql_insert.cc:
        Strict mode
        If strict mode, give error if we have not given value to field without a default value
      sql/sql_load.cc:
        Strict mode
      sql/sql_parse.cc:
        Strict mode.
        Add flag to field if it doesn't have a default value
      sql/sql_select.cc:
        Added comment
        Prepare for upper level handling of table->status
      sql/sql_union.cc:
        Added THD to write_record()
      sql/sql_update.cc:
        Strict mode
      sql/table.cc:
        Handling of default values
      sql/time.cc:
        Checking of dates
      2a491215
  31. 09 Sep, 2004 2 commits
    • unknown's avatar
      post merge fixes · b386f888
      unknown authored
      mysql-test/t/merge.test:
        additional test
      sql/item.h:
        parameter to detect need of saving view field names
      sql/item_subselect.cc:
        arena fix
        used nearest thd pointer
      sql/item_sum.cc:
        after merge fix
      sql/mysql_priv.h:
        after merge fix
      sql/sql_base.cc:
        fixed unique test
        fixed postmerge arena mamgement
      sql/sql_class.h:
        mey method to detect conventional execution
      sql/sql_handler.cc:
        new parameter
      sql/sql_lex.cc:
        fixed postmerge arena mamgement
      sql/sql_parse.cc:
        fixed unique test
      sql/sql_select.cc:
        fixed postmerge arena mamgement
      sql/sql_union.cc:
        fixed postmerge arena mamgement
      sql/sql_view.cc:
        fixed postmerge arena mamgement
      sql/table.cc:
        fixed postmerge arena mamgement
      b386f888
    • unknown's avatar
      After merge fixes of merge with 4.1 that included the new arena code. · 33efc967
      unknown authored
      Fixed (together with Guilhem) bugs in mysqlbinlog regarding --offset
      Prefix addresses with 0x for easier comparisons of debug logs
      Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index
      This fix changed some 'index' queries to 'range' queries in the test suite
      Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause.
      This fix removed of a lot of 'Using where' notes in the test suite.
      Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS
      Give NOTE instead of WARNING for safe field-type conversions
      
      
      Makefile.am:
        Don't automaticly update files from bk
      client/mysqlbinlog.cc:
        Merge with 4.1 (+ apply bug fixes for --offset and --start-position)
      include/my_sys.h:
        Faster clear_alloc_root()
      mysql-test/r/bdb.result:
        Updated results after merge
      mysql-test/r/create.result:
        Updated results after merge
      mysql-test/r/func_group.result:
        Updated results after merge
      mysql-test/r/func_if.result:
        Updated results after merge
      mysql-test/r/heap_btree.result:
        Updated results after merge
      mysql-test/r/index_merge.result:
        Updated results after merge
      mysql-test/r/index_merge_ror.result:
        Updated results after merge
      mysql-test/r/innodb.result:
        Updated results after merge
      mysql-test/r/join_outer.result:
        Updated results after merge
      mysql-test/r/mysqlbinlog2.result:
        Updated results after merge
      mysql-test/r/negation_elimination.result:
        Updated results after merge
      mysql-test/r/null.result:
        Updated results after merge
        Added more tests
      mysql-test/r/null_key.result:
        Updated results after merge
        Added more tests
      mysql-test/r/order_by.result:
        Updated results after merge
      mysql-test/r/range.result:
        Updated results after merge
        Added more tests
      mysql-test/r/rpl_charset.result:
        Updated results after merge
      mysql-test/r/sp-error.result:
        Updated results after merge
      mysql-test/r/sp.result:
        Updated results after merge
        Added delete of some stored procedures in an attempt to be able to re-run test even if it aborts in the middle
      mysql-test/r/type_blob.result:
        Updated results after merge
        (Some warnings are now notes)
      mysql-test/r/user_var.result:
        Updated results after merge
        Added more tests
      mysql-test/r/variables.result:
        Updated results after merge
      mysql-test/r/view.result:
        Updated results after merge
      mysql-test/t/mysqlbinlog2.test:
        Updated tests to use new positions
      mysql-test/t/null.test:
        More tests
      mysql-test/t/null_key.test:
        More tests
      mysql-test/t/range.test:
        More tests
      mysql-test/t/rpl_charset.test:
        Avoid big diffs in the future if tests changes
      mysql-test/t/sp-error.test:
        Updated error numbers
      mysql-test/t/sp-security.test:
        Updated error numbers
      mysql-test/t/sp.test:
        Updated results after merge
        Added delete of some stored procedures in an attempt to be able to re-run test even if it aborts in the middle
      mysql-test/t/user_var.test:
        More tests
      mysql-test/t/view.test:
        Updated error numbers
      mysys/my_alloc.c:
        Write into debug log the address of the allocated area
      sql/ha_isam.cc:
        Prefix addresses with 0x for easier comparisons of debug logs
      sql/ha_myisam.cc:
        Prefix addresses with 0x for easier comparisons of debug logs
      sql/ha_ndbcluster.cc:
        Add missing enum to switch
      sql/handler.cc:
        remove compiler warning
      sql/item.cc:
        More debugging
        Simple cleanup
      sql/item.h:
        Move Item::cleanup() to item.cc
      sql/item_cmpfunc.cc:
        Fix arena code
      sql/item_subselect.cc:
        After merge fixes
      sql/item_subselect.h:
        After merge fixes
      sql/item_sum.cc:
        Updated comment
      sql/log_event.cc:
        Remove wrong test
      sql/mysql_priv.h:
        Indentation fixes
      sql/mysqld.cc:
        After merge fixes
        Added 0x to pointers in debug log
      sql/opt_range.cc:
        Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index
        This fix changed some 'index' queries to 'range' queries in the test suite
      sql/set_var.cc:
        Indentation fixes
      sql/sp_head.cc:
        Set state to INITIALIZED to make SP work with new arena code
      sql/sql_base.cc:
        After merge fixes
      sql/sql_class.cc:
        More debugging
        Use clear_alloc_root() instead of init_alloc_root() as the former is faster
      sql/sql_class.h:
        New method 'only_prepare()'
      sql/sql_lex.cc:
        After merge fixes
      sql/sql_lex.h:
        After merge fixes
      sql/sql_parse.cc:
        Fix for timezone tables. (The old way to add timezone tables to global list in 'create_total_list' doesn't work anymore)
        Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS
      sql/sql_prepare.cc:
        After merge fixes
      sql/sql_select.cc:
        Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause.
        This fix removed of a lot of 'Using where' notes in the test suite
      sql/sql_table.cc:
        Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS
      sql/sql_union.cc:
        After merge fix
      sql/sql_view.cc:
        After merge fix
      sql/table.cc:
        After merge fix
      sql/tztime.cc:
        Update timezone table handling to use new table lists structure
      sql/tztime.h:
        Update timezone table handling to use new table lists structure
      sql/unireg.cc:
        Use 0x before pointers
      33efc967
  32. 03 Sep, 2004 1 commit
  33. 20 Aug, 2004 1 commit
    • unknown's avatar
      Fix for bug#4912 "mysqld crashs in case a statement is executed · 095b686c
      unknown authored
       a second time". The bug was caused by incompatibility of
      negations elimination algorithm and PS: during first statement 
      execute a subtree with negation was replaced with equivalent 
      subtree without NOTs.
      The problem was that although this transformation was permanent, 
      items of the new subtree were created in execute-local memory.
      The patch adds means to check if it is the first execute of a
      prepared statement, and if this is the case, to allocate items
      in memory of the prepared statement.
      The implementation:
      - backports Item_arena from 5.0
      - adds Item_arena::is_stmt_prepare(), 
        Item_arena::is_first_stmt_execute().
      - deletes THD::allocate_temporary_pool_for_ps_preparing(),
        THD::free_temporary_pool_for_ps_preparing(); they
        were redundant.
      and adds a few invariants:
      - thd->free_list never contains junk (= freed items)
      - thd->current_arena is never null. If there is no
        prepared statement, it points at the thd. 
      The rest of the patch contains mainly mechanical changes and
      cleanups.
      
      
      mysql-test/r/ps.result:
        Test results updated (test case for Bug#4912)
      mysql-test/t/ps.test:
        A test case for Bug#4912 "mysqld crashs in case a statement is 
        executed a second time"
      sql/item_cmpfunc.cc:
        current_statement -> current_arena
      sql/item_subselect.cc:
        Statement -> Item_arena, current_statement -> current_arena
      sql/item_subselect.h:
        Item_subselect does not need to save thd->current_statement.
      sql/item_sum.cc:
        Statement -> Item_arena
      sql/item_sum.h:
        Statement -> Item_arena
      sql/mysql_priv.h:
        Statement -> Item_arena
      sql/sql_base.cc:
        current_statement -> current_arena
      sql/sql_class.cc:
        - Item_arena
        - convenient set_n_backup_statement, restore_backup_statement
        (nice idea, Sanja)
      sql/sql_class.h:
        - Item_arena: backport from 5.0
        - allocate_temporary_pool_for_ps_preparing,
          free_temporary_pool_for_ps_preparing removed.
      sql/sql_derived.cc:
        current_statement -> current_arena
      sql/sql_lex.cc:
        current_statement -> current_arena
      sql/sql_parse.cc:
        Deploy invariant that thd->free_list never contains junk items
        (backport from 5.0).
      sql/sql_prepare.cc:
        - backporting Item_arena
        - no need to allocate_temporary_pool_for_ps_preparing().
      sql/sql_select.cc:
        Fix for bug#4912 "mysqld crashs in case a statement is 
        executed a second time": if this is the first execute of
        a prepared statement, negation elimination is
        done in memory of the prepared statement.
      sql/sql_union.cc:
        Backporting Item_arena from 5.0.
      095b686c
  34. 03 Aug, 2004 1 commit
    • unknown's avatar
      Port of cursors to be pushed into 5.0 tree: · eaf34dd8
      unknown authored
      - client side part is simple and may be considered stable
      - server side part now just joggles with THD state to save execution
        state and has no additional locking wisdom.
        Lot's of it are to be rewritten.
      
      
      include/mysql.h:
        Cursor patch to push into the main tree, client library part (considered 
        stable):
        - new statement attribute STMT_ATTR_CURSOR_TYPE
        - MYSQL_STMT::flags to store statement cursor type
        - MYSQL_STMT::server_status to store server status (i. e. if the server
        was able to open a cursor for this query).
      include/mysql_com.h:
        Cursor patch to push into the main tree, client library part (considered 
        stable):
        - new COMmand, COM_FETCH, to fetch K rows from read-only cursor.
          By design should support scrollable cursors as well.
        - a few new server statuses:
          SERVER_STATUS_CURSOR_EXISTS is sent by server in reply to COM_EXECUTE,
          when cursor was successfully opened for this query
          SERVER_STATUS_LAST_ROW_SENT is sent along with the last row to prevent one
          more round trip just for finding out that all rows were fetched from 
          this cursor (this is server mem savier also).
        - and finally, all possible values of STMT_ATTR_CURSOR_TYPE, 
          while now we support only CURSORT_TYPE_NO_CURSOR and 
          CURSOR_TYPE_READ_ONLY
      libmysql/libmysql.c:
        Cursor patch to push into the main tree, client library part (considered 
        stable):
        - simple additions to mysql_stmt_fetch implementation to read data 
          from an opened cursor: we can read up to iteration count rows per
          one request; read rows are buffered in the same way as rows of
          mysql_stmt_store_result.
        - now send stmt->flags to server to let him now if we wish to have 
          a cursor for this statement.
        - support for setting/getting statement cursor type.
      libmysqld/examples/Makefile.am:
        Testing cursors was originally implemented in C++. Now when these tests
        go into client_test, it's time to convert it to C++ as well.
      libmysqld/lib_sql.cc:
        - cleanup: send_fields flags are now named.
      sql/ha_innodb.cc:
        - cleanup: send_fields flags are now named.
      sql/mysql_priv.h:
        - cursors support: declaration for server-side handler of COM_FETCH
      sql/protocol.cc:
        - cleanup: send_fields flags are now named.
        - we can't anymore assert that field_types[field_pos] is sensible:
          if we have COM_EXCUTE(stmt1), COM_EXECUTE(stmt2), COM_FETCH(stmt1)
          field_types[field_pos] will point to fields of stmt2.
      sql/protocol.h:
        - cleanup: send_fields flag_s_ are now named.
      sql/protocol_cursor.cc:
        - cleanup: send_fields flags are now named.
      sql/repl_failsafe.cc:
        - cleanup: send_fields flags are now named.
      sql/slave.cc:
        - cleanup: send_fields flags are now named.
      sql/sp.cc:
        - cleanup: send_fields flags are now named.
      sql/sp_head.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_acl.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_class.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_class.h:
        - cleanup: send_fields flags are now named.
      sql/sql_error.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_handler.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_help.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_parse.cc:
        Server side support for cursors:
        - handle COM_FETCH
        - enforce assumption that whenever we free thd->free_list, 
          we reset it to zero. This way it's much easier to handle free_list
          in prepared statements implementation.
      sql/sql_prepare.cc:
        Server side support for cursors:
        - implementation of mysql_stmt_fetch (fetch some rows from open cursor).
        - management of cursors memory is quite tricky now.
        - execute_stmt can't be reused anymore in mysql_stmt_execute and 
          mysql_sql_stmt_execute
      sql/sql_repl.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_select.cc:
        Server side support for cursors:
        - implementation of Cursor::open, Cursor::fetch (buggy when it comes to
          non-equi joins), cursor cleanups.
        - -4 -3 -0 constants indicating return value of sub_select and end_send are
          to be renamed to something more readable:
          it turned out to be not so simple, so it should come with the other patch.
      sql/sql_select.h:
        Server side support for cursors:
        - declaration of Cursor class.
        - JOIN::fetch_limit contains runtime value of rows fetched via cursor.
      sql/sql_show.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_table.cc:
        - cleanup: send_fields flags are now named.
      sql/sql_union.cc:
        - if there was a cursor, don't cleanup unit: we'll need it to fetch
          the rest of the rows.
      tests/Makefile.am:
        Now client_test is in C++.
      tests/client_test.cc:
        A few elementary tests for cursors.
      BitKeeper/etc/ignore:
        Added libmysqld/examples/client_test.cc to the ignore list
      eaf34dd8
  35. 15 Jul, 2004 1 commit
    • unknown's avatar
      VIEW · 8790b1e6
      unknown authored
      two TABLE_LIST copy eliminated
      
      
      include/mysqld_error.h:
        errors of view
      libmysqld/Makefile.am:
        new view file
      mysql-test/r/connect.result:
        SHOW TABLE show type of table
      mysql-test/r/ctype_recoding.result:
        SHOW TABLE show type of table
      mysql-test/r/drop.result:
        SHOW TABLE show type of table
      mysql-test/r/grant.result:
        new two privileges (CRETEA|SHOW VIEW)
      mysql-test/r/lowercase_table.result:
        SHOW TABLE show type of table
      mysql-test/r/ps_1general.result:
        SHOW TABLE show type of table
      mysql-test/r/rename.result:
        SHOW TABLE show type of table
      mysql-test/r/rpl000009.result:
        SHOW TABLE show type of table
      mysql-test/r/rpl_error_ignored_table.result:
        SHOW TABLE show type of table
      mysql-test/r/select.result:
        SHOW TABLE show type of table
      mysql-test/r/system_mysql_db.result:
        SHOW TABLE show type of table
        new two privileges (CRETEA|SHOW VIEW)
      mysql-test/t/system_mysql_db_fix.test:
        removing all system tables
      scripts/mysql_fix_privilege_tables.sql:
        new two privileges (CRETEA|SHOW VIEW)
      sql/Makefile.am:
        new VIEW related file
      sql/ha_myisammrg.cc:
        two TABLE_LIST copy eliminated
      sql/item.cc:
        VIEW
      sql/item.h:
        VIEW
      sql/item_subselect.cc:
        VIEW
      sql/item_subselect.h:
        VIEW
      sql/lex.h:
        VIEW
      sql/lock.cc:
        VIEW
      sql/mysql_priv.h:
        VIEW
      sql/mysqld.cc:
        VIEW
        new parameter - sql_updatable_view_key
      sql/opt_sum.cc:
        two TABLE_LIST copy eliminated
      sql/set_var.cc:
        new parameter - sql_updatable_view_key
      sql/share/czech/errmsg.txt:
        errors messages of views
      sql/share/danish/errmsg.txt:
        errors messages of views
      sql/share/dutch/errmsg.txt:
        errors messages of views
      sql/share/english/errmsg.txt:
        errors messages of views
      sql/share/estonian/errmsg.txt:
        errors messages of views
      sql/share/french/errmsg.txt:
        errors messages of views
      sql/share/german/errmsg.txt:
        errors messages of views
      sql/share/greek/errmsg.txt:
        errors messages of views
      sql/share/hungarian/errmsg.txt:
        errors messages of views
      sql/share/italian/errmsg.txt:
        errors messages of views
      sql/share/japanese/errmsg.txt:
        errors messages of views
      sql/share/korean/errmsg.txt:
        errors messages of views
      sql/share/norwegian-ny/errmsg.txt:
        errors messages of views
      sql/share/norwegian/errmsg.txt:
        errors messages of views
      sql/share/polish/errmsg.txt:
        errors messages of views
      sql/share/portuguese/errmsg.txt:
        errors messages of views
      sql/share/romanian/errmsg.txt:
        errors messages of views
      sql/share/russian/errmsg.txt:
        errors messages of views
      sql/share/serbian/errmsg.txt:
        errors messages of views
      sql/share/slovak/errmsg.txt:
        errors messages of views
      sql/share/spanish/errmsg.txt:
        errors messages of views
      sql/share/swedish/errmsg.txt:
        errors messages of views
      sql/share/ukrainian/errmsg.txt:
        errors messages of views
      sql/slave.cc:
        two TABLE_LIST copy eliminated
      sql/sp.cc:
        VIEW
      sql/sql_acl.cc:
        VIEW
      sql/sql_acl.h:
        VIEW
      sql/sql_base.cc:
        VIEW
      sql/sql_cache.cc:
        two TABLE_LIST copy eliminated
      sql/sql_class.h:
        VIEW
      sql/sql_db.cc:
        two TABLE_LIST copy eliminated
      sql/sql_delete.cc:
        VIEW
      sql/sql_derived.cc:
        VIEW
      sql/sql_handler.cc:
        two TABLE_LIST copy eliminated
      sql/sql_help.cc:
        two TABLE_LIST copy eliminated
      sql/sql_insert.cc:
        VIEW
      sql/sql_lex.cc:
        VIEW
      sql/sql_lex.h:
        VIEW
      sql/sql_load.cc:
        VIEW
      sql/sql_olap.cc:
        VIEW
      sql/sql_parse.cc:
        two TABLE_LIST copy eliminated
        VIEW
      sql/sql_prepare.cc:
        VIEW
      sql/sql_rename.cc:
        two TABLE_LIST copy eliminated
      sql/sql_select.cc:
        VIEW
      sql/sql_show.cc:
        VIEW
      sql/sql_table.cc:
        VIEW
      sql/sql_union.cc:
        VIEW
      sql/sql_update.cc:
        VIEW
      sql/sql_yacc.yy:
        VIEW
      sql/table.cc:
        VIEW
      sql/table.h:
        VIEW
      sql/tztime.cc:
        two TABLE_LIST copy eliminated
      sql/unireg.h:
        VIEW
      tests/client_test.c:
        VIEW
      8790b1e6