An error occurred fetching the project authors.
  1. 01 Jul, 2005 2 commits
    • unknown's avatar
      fix bugs found by gcc 3.4 compiler · a17ee9fa
      unknown authored
      sql/sp_head.h:
        removed unused parameter
      sql/sql_lex.cc:
        make correct operation order
      sql/sql_yacc.yy:
        removed unused parameter
      a17ee9fa
    • unknown's avatar
      Name resolution context added (BUG#6443) · f75ad371
      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
      f75ad371
  2. 22 Jun, 2005 1 commit
    • unknown's avatar
      Fix bug #9728 decreased functionality in "on duplicate key update" · 75ff2275
      unknown authored
      Remove changes made by bug fix #8147. They strips list of insert_table_list to
      only insert table, which results in error reported in bug #9728.
      Added flag to Item to resolve ambigous fields reported in bug #8147.
      
      
      sql/item.h:
        Fix bug#9728  decreased functionality in "on duplicate key update".
      sql/item.cc:
        Fix bug#9728  decreased functionality in "on duplicate key update"
      sql/sql_parse.cc:
        Fix bug#9728  decreased functionality in "on duplicate key update"
      sql/sql_base.cc:
        Fix bug#9728  decreased functionality in "on duplicate key update".
      sql/sql_yacc.yy:
        Fix bug#9728  decreased functionality in "on duplicate key update"
      mysql-test/t/insert_select.test:
        Test case for bug#9728 Decreased functionality in "on duplicate key update".
      mysql-test/r/insert_select.result:
        Test case for bug#9728 Decreased functionality in "on duplicate key update".
      75ff2275
  3. 21 Jun, 2005 1 commit
    • unknown's avatar
      fixed view fields names check and generation (changed after Trudy review:... · 24b2ed72
      unknown authored
      fixed view fields names check and generation (changed after Trudy review: underlying field names treat as user set ones) (BUG#7448)
      
      
      mysql-test/r/view.result:
        test of view field names generation
      mysql-test/t/view.test:
        test of view field names generation
      sql/item.cc:
        add a flag that indicates that the name of the item was an auto-generated one and so can be changed in a view
      sql/item.h:
        add a flag that indicates that the name of the item was an auto-generated one and so can be changed in a view
        layout fixed
      sql/item_func.cc:
        line made less then 80 columns
      sql/sql_view.cc:
        fixed checking of duplicates of view fields:
        1) case-insensitive system charset/collation is used now to compare view filds
        2) in case if the duplicate field name was of an auto-generated one, we create another unique name for it
      sql/sql_yacc.yy:
        add a flag that indicates that the name of the item was an auto-generated one and so can be changed in a view
      24b2ed72
  4. 17 Jun, 2005 1 commit
    • unknown's avatar
      Rename all prepared statements COM_ commands to prefix with COM_STMT_ · 85e0957a
      unknown authored
      libmysql/libmysql.c:
        Rename.
      libmysqld/lib_sql.cc:
        Rename.
      sql/item_cmpfunc.cc:
        Use proper method to check for stmt prepare, only_prepare is removed.
      sql/mysql_priv.h:
        Remove an obsolete define. Rename mysql_stmt_free to mysql_stmt_close.
      sql/sql_class.h:
        Remove THD::only_prepare.
        Rename.
      sql/sql_lex.cc:
        Rename COM_PREPARE -> COM_STMT_PREPARE
      sql/sql_parse.cc:
        Rename.
      sql/sql_prepare.cc:
        Rename.
      sql/sql_yacc.yy:
        Rename.
      tests/mysql_client_test.c:
        Rename.
      85e0957a
  5. 15 Jun, 2005 1 commit
    • unknown's avatar
      renamed: · bb7b0c05
      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
      bb7b0c05
  6. 10 Jun, 2005 1 commit
  7. 09 Jun, 2005 1 commit
    • unknown's avatar
      select.test, select.result: · 1d14ff87
      unknown authored
        Added a test case for bug #10084.
      sql_yacc.yy:
        Fixed bug #10084: STRAIGHT_JOIN for expressions with ON was
        added.
      
      
      sql/sql_yacc.yy:
        Fixed bug #10084: STRAIGHT_JOIN for expressions with ON was
        added.
      mysql-test/r/select.result:
        Added a test case for bug #10084.
      mysql-test/t/select.test:
        Added a test case for bug #10084.
      1d14ff87
  8. 08 Jun, 2005 3 commits
    • unknown's avatar
      Disable dynamic SQL in stored routines. · f60587e6
      unknown authored
      This is to close Bug#10975, Bug#7115, Bug#10605 
      This feature will be implemented in a future release.
      
      
      mysql-test/r/sp-error.result:
        Test results fixed (test coverage for disabled Dynamic SQL in SP).
      mysql-test/t/sp-error.test:
        Test coverage to disable Dynamic SQL in stored routines.
      sql/sql_yacc.yy:
        Disable dynamic SQL in stored routines.
      f60587e6
    • unknown's avatar
      Fix for bug #11158 "Can't perform multi-delete in stored procedure". · 6bde3e93
      unknown authored
      In order to make multi-delete SP friendly we need to have all table 
      locks for the elements of main statement table list properly set 
      at the end of parsing.
      
      Also performed small cleanup: We don't need relink_tables_for_multidelete()
      any longer since the only case now when TABLE_LIST::correspondent_table
      is non-zero are tables in auxilary table list of multi-delete and these
      tables are handled specially in mysql_multi_delete_prepare().
      
      
      mysql-test/r/sp-threads.result:
        Added test case for bug #11158 "Can't perform multi-delete in stored
        procedure".
      mysql-test/t/sp-threads.test:
        Added test case for bug #11158 "Can't perform multi-delete in stored
        procedure".
      sql/mysql_priv.h:
        - Removed third argument from the declaration of multi_delete_precheck()
          as nowdays we calculate number of tables in multi-delete from which
          we are going to delete rows right at the end of statement parsing.
        - Introduced definition of multi_delete_set_locks_and_link_aux_tables()
          which is responsible for propagation of proper table locks from
          multi-delete's auxilary table list to the main list and binding
          corresponding tables in these two lists.
      sql/sql_base.cc:
        Removed relink_tables_for_multidelete() routine and its invocations.
        We don't need them in 5.0 since the only case now when
        TABLE_LIST::correspondent_table is non-zero are tables in auxilary table
        list of multi-delete and these tables are handled specially in
        mysql_multi_delete_prepare().
      sql/sql_lex.h:
        LEX::table_count
          Added description of new role of this LEX member for multi-delete. 
          Now for this statement we store number of tables from which we should
          delete records there.
      sql/sql_parse.cc:
        multi_delete_precheck():
          Moved code which is responsible for iterating through auxilary table
          list and binding its elements with corresponding elements of main
          table list, and properly updating locks in it to separate function -
          multi_delete_set_locks_and_link_aux_tables(). This is because in order
          to make multi-delete SP friendly we need to have all locks set properly
          at the end of statement parsing. So we are introducing new function
          which will be called from parser.
          We also calculate number of tables from which we are going to perform
          deletions there and store this number for later usage in
          LEX::table_count.
          Also removed some no longer needed code.
      sql/sql_prepare.cc:
        mysql_test_multidelete():
          Now multi_delete_precheck() takes only two arguments, so we don't
          need to pass fake third parameter.
      sql/sql_yacc.yy:
        delete:
          In order to make multi-delete SP friendly we need to have all table 
          locks for the elements of main statement table list properly set 
          at the end of parsing.
      6bde3e93
    • unknown's avatar
  9. 07 Jun, 2005 3 commits
    • unknown's avatar
      sql_yacc.yy: · 2bf1f4d9
      unknown authored
        Added missing ';'.
      
      
      sql/sql_yacc.yy:
        Added missing ';'.
      2bf1f4d9
    • unknown's avatar
      Fix for bug #10015 "Crash in InnoDB if stored routines are used". · a2bf92f2
      unknown authored
      We should not allow explicit or implicit transaction commits inside
      of stored functions or triggers (so in autocommit mode we should not
      do commits after execution of sub-statement).
      Also since we don't support nested statement transactions in 5.0,
      we shouldn't commit or rollback stmt transactions while we are inside
      stored functions or triggers. This should be fixed in later (>=5.1)
      releases.
      
      
      mysql-test/r/sp_trans.result:
        Added test for bug #10015 "Crash in InnoDB if stored routines are used"
        and for general transaction handling inside of functions.
      mysql-test/t/sp_trans.test:
        Added test for bug #10015 "Crash in InnoDB if stored routines are used"
        and for general transaction handling inside of functions.
      sql/handler.cc:
        ha_trans_commit()/ha_trans_rollback():
          Since we don't support nested statement transactions in 5.0,
          we can't commit or rollback stmt transactions while we are inside
          stored functions or triggers. So we simply do nothing now.
          This should be fixed in later ( >= 5.1) releases.
      sql/item_func.cc:
        Item_func_sp::execute():
          Set THD::transaction.in_sub_stmt flag to TRUE during stored function
          execution to prevent commits and rollbacks for statement level
          transactions, since doing them will ruin such transaction for
          stateemtn which calls this function.
      sql/share/errmsg.txt:
        Added error message which says that statements doing explicit or implicit
        commits are disallowed in triggers and stored functions.
      sql/sql_base.cc:
        close_thread_tables():
          Clarified comment about committing of statement transactions in
          prelocked mode.
      sql/sql_class.h:
        THD::transaction:
          Added in_sub_stmt method which indicates that we are executing
          statements from trigger or stored function now, and thus
          statement transaction belongs to statement which invoked this
          routine and we should not commit or rollback it while executing
          these sub-statements.
      sql/sql_parse.cc:
        end_active_trans()/begin_trans()/end_trans():
          We should not commit or rollback global (non-stmt) transaction
          if we are executing stored function or trigger. These checks will
          catch situation when we are trying to do commit or rollback in stored
          procedure which is called from function or trigger.
      sql/sql_trigger.h:
        Table_triggers_list::process_triggers():
          Set THD::transaction.in_sub_stmt flag to TRUE during trigger
          execution to prevent commits and rollbacks for statement level
          transactions, since doing them will ruin such transaction for
          stateemtn which invokes this trigger.
      sql/sql_yacc.yy:
        Prohibited usage of statements which do explicit or implicit commit or
        rollback inside of stored functions and triggers.
      a2bf92f2
    • unknown's avatar
      Patch two (the final one) for Bug#7306 "the server side preparedStatement · 59544040
      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.
      59544040
  10. 03 Jun, 2005 2 commits
    • unknown's avatar
      Move USE_PRAGMA_IMPLEMENTATION to proper place · 90931c2e
      unknown authored
      Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
      Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
      Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
      
      
      mysql-test/r/func_gconcat.result:
        Move innodb specific test to innodb.test
        Changed table name r2 -> t2
        More test to see how ROLLUP was optimized
      mysql-test/r/innodb.result:
        Moved test here form func_gconcat
      mysql-test/r/olap.result:
        New test results after optimization
      mysql-test/t/func_gconcat.test:
        Move innodb specific test to innodb.test
        Changed table name r2 -> t2
        More test to see how ROLLUP was optimized
      mysql-test/t/innodb.test:
        Moved test here form func_gconcat
      sql/field.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_berkeley.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_blackhole.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_heap.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_innodb.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_isam.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_isammrg.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_myisam.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_myisammrg.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/ha_ndbcluster.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/handler.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/hash_filo.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_cmpfunc.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_func.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
        Ensure that 'null_value' is not accessed before val() is called
      sql/item_geofunc.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_strfunc.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_subselect.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_sum.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_timefunc.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/item_uniq.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/log_event.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/mysql_priv.h:
        Change key_map_full to not be const as we are giving it a proper value on startup
      sql/mysqld.cc:
        Move key_map variables here and initialize key_map_full properly
      sql/opt_range.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/opt_range.h:
        Fix that test_quick_select() works with any ammount of keys
      sql/procedure.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/protocol.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/protocol_cursor.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/set_var.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_analyse.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_class.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_crypt.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_insert.cc:
        Fixed that max_rows is ulong
      sql/sql_list.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_map.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_olap.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_select.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
        Fixed that ROLLUP don't have to always create a temporary table
        Added new argument to remove_const() to make above possible
        Fixed some errors that creapt up when we don't always do a temporary table for ROLLUP
      sql/sql_string.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_table.cc:
        Simple optimizations
        Fixed wrong checking of build_table_path() in undef-ed code
      sql/sql_udf.cc:
        Move USE_PRAGMA_IMPLEMENTATION to proper place
      sql/sql_yacc.yy:
        removed extra {}
      90931c2e
    • unknown's avatar
      Post review fix of BUG#10969. · f9fa47f5
      unknown authored
      sql/item.h:
        Return name as LEX_STRING instead of its components.
      sql/sql_yacc.yy:
        Name returned as LEX_STRING instead of its components.
      f9fa47f5
  11. 01 Jun, 2005 2 commits
  12. 31 May, 2005 1 commit
    • unknown's avatar
      Bug#10413 - Invalid column name is not rejected · 5907a9cd
      unknown authored
        Stop ignoring name parts and check for validity
      
      
      mysql-test/r/create.result:
        Test for bug#10413
      mysql-test/t/create.test:
        Test for bug#10413
      sql/sql_yacc.yy:
        Bug#10413
          Stop ignoring parts of fully qualified names.
      5907a9cd
  13. 27 May, 2005 2 commits
    • unknown's avatar
      Fixed BUG#8409: Stored procedure crash if function contains FLUSH · 75e241bc
      unknown authored
        by simply disabling FLUSH for stored functions. (I can't really work.)
      
      
      mysql-test/r/sp-error.result:
        New test case for BUG#8409.
      mysql-test/t/sp-error.test:
        New test case for BUG#8409.
      sql/sql_yacc.yy:
        Disable FLUSH for stored functions.
      75e241bc
    • unknown's avatar
      Fix for trigger.test failure in --debug mode. · 81b76ace
      unknown authored
      We can't have Item_trigger_field as aggregated object inside of
      sp_instr_set_trigger_field class since in this case its destructor
      will be called twice. So instead let us create this Item separately
      and store pointer to it in instruction object.
      
      
      sql/sp_head.cc:
        sp_instr_set_trigger_field:
          We can't have Item_trigger_field as aggregated object since in this
          case its destructor will be called twice, so let us store pointer
          to this Item (Another way to avoid this is to exclude this Item
          from free_list but this can't be done in elegant way in 5.0 and
          will also cause additional problems with Item::cleanup()).
      sql/sp_head.h:
        sp_instr_set_trigger_field:
          We can't have Item_trigger_field as aggregated object since in this
          case its destructor will be called twice, so let us store pointer
          to this Item (Another way to avoid this is to exclude this Item
          from free_list but this can't be done in elegant way in 5.0 and
          will also cause additional problems with Item::cleanup()).
      sql/sql_yacc.yy:
        We can't have Item_trigger_field as aggregated object inside of
        sp_instr_set_trigger_field class since in this case its destructor
        will be called twice. So instead let us create this Item separately
        and store pointer to it in instruction object.
      81b76ace
  14. 25 May, 2005 1 commit
    • unknown's avatar
      Fix that we can read tables with the 'older' decimal format used in 5.0.3 & 5.0.4 · edaca67e
      unknown authored
      We will however give a warning when opening such a table that users should use ALTER TABLE ... FORCE to fix
      the table. In future release we will fix that REPAIR TABLE will be able to handle this case
      
      
      sql/sql_lex.h:
        Support for ALTER TABLE ... FORCE
      sql/sql_table.cc:
        CHECK TABLE now gives a note if table->s->crashed was set
      sql/sql_yacc.yy:
        Support for ALTER TABLE ... FORCE
      sql/table.cc:
        
        Fix that we can read tables with the 'older' decimal format used in 5.0.3 & 5.0.4
        (Now we store display length in the .frm table while we previously stored precision)
      sql/table.h:
        Store in TABLE_SHARE version number of MySQL where table was created (or checked)
      edaca67e
  15. 20 May, 2005 1 commit
    • unknown's avatar
      Fixed BUG#10537: Server crashes while loading data file into table through · 5e8fbc83
      unknown authored
                        procedure.
        by simply disabling 'load' in stored procedures, like it's already disabled
        for prepared statements. (They must be made "re-execution" safe before
        working with either PS or SP.)
      
      
      mysql-test/r/sp-error.result:
        New test case for BUG#10537.
      mysql-test/t/sp-error.test:
        New test case for BUG#10537.
      sql/sql_yacc.yy:
        Disable LOAD in stored procedures (just as for prepared statements).
      5e8fbc83
  16. 18 May, 2005 2 commits
  17. 17 May, 2005 3 commits
    • unknown's avatar
      After merge fix · cfb02c34
      unknown authored
      sql/sql_update.cc:
        Add missing join method
      cfb02c34
    • unknown's avatar
      Bug#10246 - Parser: bad syntax for GRANT EXECUTE · 480506e1
      unknown authored
        Rename some functions
        more fine-grained sp privileges
        make grant/revoke sp grammar less ambigious
      
      
      mysql-test/r/sp-security.result:
        change test for new syntax
      mysql-test/r/system_mysql_db.result:
        change test for new syntax
      mysql-test/t/sp-security.test:
        change test for new syntax
      scripts/mysql_create_system_tables.sh:
        now store routine_type for procs_priv
      scripts/mysql_fix_privilege_tables.sql:
        now store routine_type for procs_priv
      sql/item_func.cc:
        rename of function
      sql/mysql_priv.h:
        rename of function
      sql/sp_head.cc:
        extra arg for check_some_routine_access
      sql/sql_acl.cc:
        rename of function. now handle func/proc acls seperately
      sql/sql_acl.h:
        rename of function
      sql/sql_parse.cc:
        rename of function
        grants for procs handled distinctly from funcs
      sql/sql_show.cc:
        check_some_routine_access extra arg
      sql/sql_base.cc:
        fix for build
      sql/sql_yacc.yy:
        fix for build
      480506e1
    • unknown's avatar
      sql_yacc.yy: · b7cc28ac
      unknown authored
        missing semicolon added
      sql_base.cc:
        bad merge fixed
      sp_head.cc, view.test, view.result:
        Correct restoring view name in SP table locking BUG#9758
      configure.in:
        restore -fno-implicit-templates -fno-exceptions -fno-rtti in configure
      
      
      configure.in:
        restore -fno-implicit-templates -fno-exceptions -fno-rtti in configure
      mysql-test/r/view.result:
        Correct restoring view name in SP table locking BUG#9758
      mysql-test/t/view.test:
        Correct restoring view name in SP table locking BUG#9758
      sql/sp_head.cc:
        Correct restoring view name in SP table locking BUG#9758
      sql/sql_base.cc:
        bad merge fixed
      sql/sql_yacc.yy:
        missing semicolon added
      b7cc28ac
  18. 16 May, 2005 1 commit
    • unknown's avatar
      After merge fixes · d17645ed
      unknown authored
      mysql-test/r/alter_table.result:
        Fixed results after merge
      sql/handler.cc:
        Trivial optimzation
      sql/sql_table.cc:
        Trvial optimization
      sql/sql_yacc.yy:
        After merge fix
      sql/unireg.cc:
        Removed argument 'null_fields' from make_empty_rec() as it was not needed
        Moved assert() to right place to take bit fields into account
      d17645ed
  19. 13 May, 2005 1 commit
    • unknown's avatar
      Fixes during review · af207c39
      unknown authored
      mysql-test/r/select.result:
        Better error message
      mysql-test/t/select.test:
        Better error message
      sql/hostname.cc:
        Join identical code
      sql/sql_yacc.yy:
        Combine code (and get a better error message)
      strings/ctype-ucs2.c:
        Cast pointer differencess
      af207c39
  20. 09 May, 2005 1 commit
    • unknown's avatar
      Bug#8733 - server accepts malformed query (multiply mentioned distinct) · 41d86a60
      unknown authored
        Detect conflicting options in SELECT
      
      
      mysql-test/r/select.result:
        Test for bug#8733
      mysql-test/t/select.test:
        Test for bug#8733
      sql/mysql_priv.h:
        New bit for ALL
      sql/sql_yacc.yy:
        We want to complain if DISTINCT or ALL is used in SELECT when a
        conflicting option is already selected.
      41d86a60
  21. 08 May, 2005 1 commit
    • unknown's avatar
      Bug#8191 - SELECT INTO OUTFILE insists on FROM clause · 803bbd96
      unknown authored
        Fix bug + include test case.
        Enable outfile tests.
      
      
      mysql-test/t/outfile.test:
        Reenable outfile tests
        Add test for Bug#8191
      sql/sql_yacc.yy:
        Fix Bug#8191
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      803bbd96
  22. 07 May, 2005 1 commit
    • unknown's avatar
      Bug#9666 - Can't use 'DEFAULT FALSE' for column of type bool · d2265693
      unknown authored
        Fix bug by moving TRUE/FALSE in with other literals.
      
      
      mysql-test/r/create.result:
        Test for Bug#9666
      mysql-test/t/create.test:
        Test for Bug#9666
      sql/sql_yacc.yy:
        Move TRUE/FALSE in with other literals.
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      d2265693
  23. 06 May, 2005 1 commit
    • unknown's avatar
      Fixes while reviewing new code · 19fc09c5
      unknown authored
      Added option --count to mysqlshow (to show number of rows)
      Fixed possible core dump in information schema
      
      
      client/client_priv.h:
        --count for mysqlshow
      client/mysqlshow.c:
        Added option --count to be used when the user want's number of rows per table in the output
        (We shouldn't use count(*) as default as this can be a slow operation)
      mysys/my_thr_init.c:
        Correct comment
      sql/ha_berkeley.cc:
        Remove not used variable
      sql/ha_berkeley.h:
        Remove not used variable
      sql/ha_innodb.cc:
        Remove not used function
      sql/ha_ndbcluster.cc:
        false -> FALSE
        true -> TRUE
      sql/handler.cc:
        Added and fixed comments
        Remove 'strange' code to remove compiler warnings (better to do things like this with attribute)
      sql/item.cc:
        false -> FALSE
      sql/item_cmpfunc.cc:
        Fixed indentation
      sql/item_cmpfunc.h:
        marked BETWEEN as a bool function
      sql/item_func.cc:
        Simple optimzation
      sql/key.cc:
        Removed wrong code
      sql/log.cc:
        Check result from open_index_file()
      sql/mysql_priv.h:
        Simplyfy some test of netware
      sql/mysqld.cc:
        Fixed indentation
        Check result form open_index_file()
        Simplify code with IF_NETWARE()
      sql/opt_range.cc:
        false -> FALSE
        true -> TRUE
        Fixed indentation
      sql/opt_sum.cc:
        Fixed comments
      sql/sp_head.cc:
        Simple optimzation
        Move variable declarations to begining of blocks
      sql/sql_acl.cc:
        Fix long lines
        Rename xx -> column
        Move declaration to beginning of block
      sql/sql_parse.cc:
        Removed comment
      sql/sql_select.cc:
        Indentation fixes
      sql/sql_show.cc:
        Fixed reference outside of array (possible core dump)
      sql/sql_table.cc:
        Simplify code
        Combine common code
      sql/sql_test.cc:
        false -> FALSE
      sql/sql_trigger.cc:
        false -> false
        true -> TRUE
      sql/sql_yacc.yy:
        Simpler test
      sql/unireg.cc:
        Added comment
      19fc09c5
  24. 26 Apr, 2005 2 commits
    • unknown's avatar
      union.result: · 75075381
      unknown authored
        Results for the above test case
      union.test:
        A test case for bug #10032 involving UNION's and ORDER BY clause
      sql_yacc.yy:
        Fix for a bug #10032 involving a parser bug with UNION's and ORDER BY
      
      
      sql/sql_yacc.yy:
        Fix for a bug #10032 involving a parser bug with UNION's and ORDER BY
      mysql-test/t/union.test:
        A test case for bug #10032 involving UNION's and ORDER BY clause
      mysql-test/r/union.result:
        Results for the above test case
      75075381
    • unknown's avatar
      Fixed BUG#8408: Stored procedure crash if function contains SHOW · 7f7725f3
      unknown authored
        We simply have to disallow any kind of result set being sent back
        from a function. Can't see any way to make that to work.
      
      
      mysql-test/r/sp-error.result:
        New test case for BUG#8408.
      mysql-test/t/sp-error.test:
        New test case for BUG#8408.
      sql/item_func.cc:
        Disable result sets from functions but temporarily turning CLIENT_MULTI_RESULTS off.
      sql/share/errmsg.txt:
        Added error message for statements not allowed in functions (detected during parsing).
      sql/sql_yacc.yy:
        Don't allow result sets in functions.
      7f7725f3
  25. 20 Apr, 2005 1 commit
    • unknown's avatar
      Fixed BUG#7047: Stored procedure crash if alter procedure · 0dcda338
      unknown authored
        by simply disallowing alter procedure/function in an SP (as for drop).
      
      
      mysql-test/r/sp-error.result:
        Added test case for BUG#7047.
      mysql-test/t/sp-error.test:
        Added test case for BUG#7047.
      sql/share/errmsg.txt:
        Modified error message for "update procedure/function" too.
      sql/sql_yacc.yy:
        Don't allow alter procedure/function in an SP.
      0dcda338
  26. 19 Apr, 2005 1 commit
    • unknown's avatar
      Bug#9102 - Stored proccedures: function which returns blob causes crash · 515f37f2
      unknown authored
        Initialization of fields for sp return type was not complete.
      
      
      mysql-test/r/sp.result:
        Bug#9102
          Test for bug
      mysql-test/t/sp.test:
        Bug#9102
          Test for bug
      sql/mysql_priv.h:
        Bug#9102
          new function: sp_prepare_create_field()
      sql/sp_head.cc:
        Strip spaces and do charset conversion for sp function typelibs
      sql/sql_table.cc:
        Bug#9102
          new function - sp_prepare_create_field()
          prepares create_field in similar way to mysql_prepare_table()
      sql/sql_yacc.yy:
        Bug#9102
      515f37f2
  27. 15 Apr, 2005 2 commits
    • unknown's avatar
      BUG#9922 - INSERT SELECT with UNIONs allows concurrent INSERTs · 01be8f73
      unknown authored
      don't set lex->lock_option=TL_READ in the parser for SELECT
      
      01be8f73
    • unknown's avatar
      Fix for bug #9486 "Can't perform multi-update in stored procedure". · 34983181
      unknown authored
      New more SP-locking friendly approach to handling locks in multi-update.
      Now we mark all tables of multi-update as needing write lock at parsing
      stage and if possible downgrade lock at execution stage (For its work
      SP-locking mechanism needs to know all lock types right after parsing
      stage).
      
      
      mysql-test/r/sp-threads.result:
        Added test for bug #9486 "Can't perform multi-update in stored procedure".
      mysql-test/t/sp-threads.test:
        Added test for bug #9486 "Can't perform multi-update in stored procedure".
      sql/sp_head.cc:
        SP_TABLE, sp_head::merge_table_list()/add_used_tables_to_table_list():
          Since some queries during their execution (e.g. multi-update)
          may change type of lock for some of their tables and thus change
          lock_type member for some of elements of table list, we should
          store type of lock in SP_TABLE struct explicitly instead of using
          lock_type member of TABLE_LIST object pointed by SP_TABLE::table.
      sql/sql_lex.h:
        Removed no longer used LEX::multi_lock_option member.
      sql/sql_prepare.cc:
        mysql_test_update():
          We don't need to bother about LEX::multi_lock_option if we convert
          multi-update to update anymore. Since nowdays multi-update uses 
          TABLE_LIST::lock_type for specifying lock level of updated tables
          instead of LEX::multi_lock_option.
      sql/sql_update.cc:
        mysql_update()/mysql_multi_update_prepare():
         Now we mark all tables of multi-update as needing write lock at parsing
         stage and if possible downgrade lock at execution stage. Old approach
         (don't set lock type until execution stage) was not working well with
         SP-locking (For its work SP-locking mechanism needs to know all lock 
         types right after parsing stage).
        
        mysql_multi_update():
          We should return FALSE if no error occurs.
      sql/sql_yacc.yy:
        update:
         Now we mark all tables of multi-update as needing write lock at parsing
         stage and if possible downgrade lock at execution stage. Old approach
         (don't set lock type until execution stage) was not working well with
         SP-locking (For its work SP-locking mechanism needs to know all lock 
         types right after parsing stage).
      34983181