An error occurred fetching the project authors.
  1. 10 Sep, 2004 2 commits
    • unknown's avatar
      sql_yacc.yy: · 9af3278f
      unknown authored
        Make "FRAC_SECOND"/"SQL_TSI_FRAC_SECOND" non-reserved words,
        must like "SECOND"/"SQL_TSI_SECOND", "MINUTE"/"SQL_TSI_MINUTE",
        etc.
        Will wait for okay to push. (It doesn't break any tests.)
      
      
      sql/sql_yacc.yy:
        Make "FRAC_SECOND"/"SQL_TSI_FRAC_SECOND" non-reserved words,
        must like "SECOND"/"SQL_TSI_SECOND", "MINUTE"/"SQL_TSI_MINUTE",
        etc.
      9af3278f
    • unknown's avatar
      Fixed BUG#3294: Stored procedure crash if table dropped before use. · 1912148c
      unknown authored
        Dropping the table was not the real problem, the problem was with errors
        occuring within error handlers.
      
      
      mysql-test/r/sp-error.result:
        New test case for BUG#3294.
      mysql-test/t/sp-error.test:
        New test case for BUG#3294.
      sql/sp_head.cc:
        Use hreturn instruction both for continue and exit handlers (a special case
        of a jump).
      sql/sp_head.h:
        Use hreturn instruction both for continue and exit handlers (a special case
        of a jump).
      sql/sp_rcontext.cc:
        Keep track on if we're in a handler already, for error handling.
      sql/sp_rcontext.h:
        Keep track on if we're in a handler already, for error handling.
      sql/sql_yacc.yy:
        Use hreturn instruction both for continue and exit handlers (a special case
        of a jump).
      1912148c
  2. 08 Sep, 2004 2 commits
    • unknown's avatar
      WL#1218 "Triggers" · 12ce293a
      unknown authored
      After review and after merge fixes.
      
      
      mysql-test/t/trigger.test:
        After merge fix. Updated error codes.
      sql/sp_head.cc:
        After merge fix.
        To give some chances for functions/triggers we have to close tables during sp_instr_* 
        execution only if we have opened them before.
      sql/sp_head.h:
        After merge fix. sp_instr constructor now takes one more argument.
      sql/sql_trigger.cc:
        After merge and review fixes.
        Some variable renaming and optimizations.
      sql/sql_yacc.yy:
        After merge fixes.
        sp_instr_* classes now require sp context as constructor parameter.
        Also we should be careful with adding table for which we are creating trigger to table 
        list. Some elements in trigger body can damage LEX::query_tables and so we should add this
        table to list only after parsing trigger body.
      12ce293a
    • unknown's avatar
      Fixed BUG#5000: SPs can be created with no default database. · c92b5349
      unknown authored
        Easy to prevent crash, but the question was how to treat this case?
        We ended up implementing the "global" SPs (i.e. with no associated
        db), which were planned but left unresolved when SPs moved into dbs.
        So now things like "call .p()" work too.
      
      
      mysql-test/r/sp-error.result:
        New test case for BUG#5000, and "global" SPs in general.
      mysql-test/t/sp-error.test:
        New test case for BUG#5000, and "global" SPs in general.
      sql/sp.cc:
        Prevent crash when the new db is null.
      sql/sp_head.cc:
        Don't set the db part of the name to thd->db, we have already set it correctly
        in the provided name struct.
        Also, don't attempt to change "no-db" when executing an SP.
      sql/sql_yacc.yy:
        Added support for the "global SP" syntax, e.g ".p()".
      c92b5349
  3. 07 Sep, 2004 1 commit
    • unknown's avatar
      WL#1218 "Triggers". Some very preliminary version of patch. · 52ac4935
      unknown authored
      Mostly needed for Monty for him getting notion what needed for triggers 
      from new .FRM format. 
      
      Things to be done:
      - Right placement of trigger's invocations
      - Right handling of errors in triggers (including transaction rollback)
      - Support for priviliges
      - Right handling of DROP/RENAME table (hope that it will be handled automatically
        with merging of .TRG into .FRM file)
      - Saving/restoring some information critical for trigger creation and replication
        with their definitions (e.g. sql_mode, creator, ...)
      - Replication
      
      Already has some known bugs so probably not for general review.
      
      
      include/mysqld_error.h:
        Added trigger related error codes.
      sql/Makefile.am:
        Added sql_trigger.* files to list of sources from which mysqld is built.
      sql/item.cc:
        Added Item_trigger_field class representing field of new/old version of row which is 
        inserted/updated/deleted and for which trigger is invoked.
      sql/item.h:
        Added enums for describing trigger properties. (Here because of dependencies).
        Added Item_trigger_field class representing field of new/old version of row which is 
        inserted/updated/deleted and for which trigger is invoked.
      sql/item_func.cc:
        Added Item_func_set_user_var::print_as_stmt() for printing of assignment to ser variable
        from stored procedures.
        Added comment clarifying why we don't need set no_send_ok when calling stored functions.
      sql/item_func.h:
        Added Item_func_set_user_var::print_as_stmt() for printing of assignment to ser variable
        from stored procedures.
      sql/lex.h:
        Symbols used in statements defining triggers were added.
      sql/mysql_priv.h:
        Exported some functions needed for triggers implementation.
      sql/parse_file.cc:
        Cleaned up FILE_OPTIONS_STRLIST handling (needed for triggers).
      sql/parse_file.h:
        Cleaned up FILE_OPTIONS_STRLIST handling (needed for triggers).
      sql/share/czech/errmsg.txt:
        Added trigger related error messages.
      sql/share/danish/errmsg.txt:
        Added trigger related error messages.
      sql/share/dutch/errmsg.txt:
        Added trigger related error messages.
      sql/share/english/errmsg.txt:
        Added trigger related error messages.
      sql/share/estonian/errmsg.txt:
        Added trigger related error messages.
      sql/share/french/errmsg.txt:
        Added trigger related error messages.
      sql/share/german/errmsg.txt:
        Added trigger related error messages.
      sql/share/greek/errmsg.txt:
        Added trigger related error messages.
      sql/share/hungarian/errmsg.txt:
        Added trigger related error messages.
      sql/share/italian/errmsg.txt:
        Added trigger related error messages.
      sql/share/japanese/errmsg.txt:
        Added trigger related error messages.
      sql/share/korean/errmsg.txt:
        Added trigger related error messages.
      sql/share/norwegian-ny/errmsg.txt:
        Added trigger related error messages.
      sql/share/norwegian/errmsg.txt:
        Added trigger related error messages.
      sql/share/polish/errmsg.txt:
        Added trigger related error messages.
      sql/share/portuguese/errmsg.txt:
        Added trigger related error messages.
      sql/share/romanian/errmsg.txt:
        Added trigger related error messages.
      sql/share/russian/errmsg.txt:
        Added trigger related error messages.
      sql/share/serbian/errmsg.txt:
        Added trigger related error messages.
      sql/share/slovak/errmsg.txt:
        Added trigger related error messages.
      sql/share/spanish/errmsg.txt:
        Added trigger related error messages.
      sql/share/swedish/errmsg.txt:
        Added trigger related error messages.
      sql/share/ukrainian/errmsg.txt:
        Added trigger related error messages.
      sql/sp_head.cc:
        sp_head::init_strings(): added support for triggers 
          (we don't have most of strings for them)
        sp_head::execute_function(): triggers don't require RETURN
        sp_head::reset_lex(): added propagation of trigger properties to LEX used for 
         parsing of statements composing trigger body.
        Added two more SP instructions:
        - sp_instr_set_user_var for setting user variables in stored functions and triggers
          (we can't use sp_instr_stmt and "SET @A:=..." statement since it will close open 
          tables and thus break execution of calling statement.
        - sp_instr_set_trigger_field for assignment to fields of row being updated/inserted in
          triggers
      sql/sp_head.h:
        Added new type of sp_head object - TYPE_ENUM_TRIGGER
        Added two more SP instructions:
        - sp_instr_set_user_var for setting user variables in stored functions and triggers
          (we can't use sp_instr_stmt and "SET @A:=..." statement since it will close open 
          tables and thus break execution of calling statement.
        - sp_instr_set_trigger_field for assignment to fields of row being updated/inserted in
          triggers
      sql/sql_base.cc:
        Now freeing memory occupied by trigger related structures when closing tables.
        open_unireg_entry(): added loading of triggers for table.
        find_field_in_real_table() is now public since it required by Item_trigger_field in item.cc
      sql/sql_delete.cc:
        Added triggers invocation for DELETE (should be fixed for sure :))
      sql/sql_insert.cc:
        Added triggers invocation for INSERT (should be fixed for sure :))
      sql/sql_lex.cc:
        Added trg_new_row_fake_var variable pointer to which is used for distinguishing between
        assignment to NEW row field (when parsing trigger definition) and structured variable.
        Added initialization of LEX->trg_table to lex_start(). (When triggers are parsed during
        opening of table it points to table object.)
      sql/sql_lex.h:
        Added trigger related commands.
        Added st_trg_chistics structure describing properties of trigger being created
        (as struct and as LEX member).
        Added trg_new_row_fake_var variable pointer to which is used for
        distinguishing between assignment to NEW row field (when parsing trigger definition)
        and structured variable.
        Added LEX::trg_table which points to table being opened when we are parsing trigger
        definition while opening table.
      sql/sql_parse.cc:
        Added support for CREATE/DROP TRIGGER commands.
      sql/sql_table.cc:
        Cleanup. close_cached_table() always returns 0 and its result is not analyzed in most
        places so chenged its return type to void.
      sql/sql_update.cc:
        Added triggers invocation for UPDATE (should be fixed for sure :))
      sql/sql_yacc.yy:
        Added support for CREATE/DROP TRIGGER statements.
        Added support for OLD/NEW row identifiers in trigger.
        Made assignment to user variables not to break execution of stored function or trigger.
      sql/table.h:
        Added TABLE::triggers member representing triggers for this table.
      52ac4935
  4. 04 Sep, 2004 1 commit
    • unknown's avatar
      Print value of Item_param if it has a value (when debugging) · fa3bfbe4
      unknown authored
      libmysql/libmysql.c:
        More debug
      sql/item.h:
        Print value of param if it has a value (when debugging)
      sql/log.cc:
        Better variable name
      sql/sql_insert.cc:
        Fix bug casused by merge
      sql/sql_parse.cc:
        Added missing command names (caused crash when running with --debug)
      sql/sql_select.cc:
        More debugging
      sql/sql_yacc.yy:
        Fixed typo
      tests/client_test.c:
        More debugging
      fa3bfbe4
  5. 03 Sep, 2004 1 commit
    • unknown's avatar
      sql_yacc.yy: · 0d34c635
      unknown authored
        Allow FROM or IN in SHOW KEYS, as in other SHOW statements.
      
      
      sql/sql_yacc.yy:
        Allow FROM or IN in SHOW KEYS, as in other SHOW statements.
      0d34c635
  6. 31 Aug, 2004 2 commits
    • unknown's avatar
      after review patch · 1dc52f07
      unknown authored
      mysql-test/r/negation_elimination.result:
        new tests of negation elimination
      mysql-test/t/negation_elimination.test:
        new tests of negation elimination
      sql/item.h:
        test of boolean functions added
      sql/item_cmpfunc.cc:
        NOT subtree is already checked, so wee need to return just argument
      sql/item_cmpfunc.h:
        test of boolean functions added
      sql/mysql_priv.h:
        'place' to detect WHERE clause
      sql/sql_parse.cc:
        function for creation negated expression
      sql/sql_select.cc:
        removed unused function
      sql/sql_select.h:
        removed unused function
      sql/sql_yacc.yy:
        'place' to detect WHERE clause
      1dc52f07
    • unknown's avatar
      Better easier to call error message format. · e9c594e6
      unknown authored
      e9c594e6
  7. 30 Aug, 2004 1 commit
  8. 29 Aug, 2004 1 commit
    • unknown's avatar
      NOT elimination moved in parsing (suggested by Monty) · f45c482a
      unknown authored
      sql/item_cmpfunc.cc:
        NOT elimination moved in parsing (we do not need fix fields in it and PS processing)
      sql/item_cmpfunc.h:
        NOT elimination moved in parsing (we do not need fix fields in it and PS processing)
      sql/sql_select.cc:
        NOT elimination moved in parsing (we do not need fix fields in it and PS processing)
      sql/sql_yacc.yy:
        NOT elimination moved in parsing
      f45c482a
  9. 27 Aug, 2004 1 commit
  10. 26 Aug, 2004 2 commits
    • unknown's avatar
      42771f98
    • unknown's avatar
      Major rehacking and cleanup of sp_pcontext. · 071651ef
      unknown authored
      This finishes (almost) WL#2002: Implement stored procedure GOTO.
      Only the syntax issue for free labels remains ("label L;" vs "L:").
      
      
      include/mysqld_error.h:
        New error code for GOTO in SP handler.
      mysql-test/r/sp-error.result:
        New error test cases for GOTO.
      mysql-test/r/sp.result:
        New test cases for GOTO.
        Also removed some things that made it impossible to run the test in
        an external (debugged) mysqld.
      mysql-test/t/sp-error.test:
        New error test cases for GOTO.
      mysql-test/t/sp.test:
        New test cases for GOTO.
        Also removed some things that made it impossible to run the test in
        an external (debugged) mysqld.
      sql/share/czech/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/danish/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/dutch/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/english/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/estonian/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/french/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/german/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/greek/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/hungarian/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/italian/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/japanese/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/korean/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/norwegian-ny/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/norwegian/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/polish/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/portuguese/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/romanian/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/russian/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/serbian/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/slovak/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/spanish/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/swedish/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/share/ukrainian/errmsg.txt:
        New error message for GOTO in SP handler.
      sql/sp_head.cc:
        Code cleanup (renaming of pcontext methods), support goto, and fixed bug
        in jump shortcutting in the optimizer (detect infinite loops).
      sql/sp_head.h:
        Code cleanup (renaming of pcontext methods), support goto, and fixed bug
        in jump shortcutting in the optimizer (detect infinite loops).
      sql/sp_pcontext.cc:
        Major rehack and cleanup:
        - We now push and pop a chain of contexts during parsing (instead of having
          a single one).
        - Makes error detection for GOTO easier and enables some optmizations and
          debugger support.
        - Makes it a little trickier to keep track on variable and cursor indexes instead.
        - Renamed things to get a more consistent naming scheme too.
      sql/sp_pcontext.h:
        Major rehack and cleanup:
        - We now push and pop a chain of contexts during parsing (instead of having
          a single one).
        - Makes error detection for GOTO easier and enables some optmizations and
          debugger support.
        - Makes it a little trickier to keep track on variable and cursor indexes instead.
        - Renamed things to get a more consistent naming scheme too.
      sql/sql_yacc.yy:
        Changes to reflect the rework and renamings in sp_pcontext, and fixed
        some GOTO error checking.
      071651ef
  11. 24 Aug, 2004 2 commits
    • unknown's avatar
      Fixed BUG#3157: Crash if stored procedure contains IF EXISTS, · ac06195c
      unknown authored
      and BUG#336: Subselects with tables does not work as values for
      local SP variables (which was closed before with a temp. fix, but not
      actually fixed).
      
      
      mysql-test/r/sp-error.result:
        Moved test case for BUG#336 to sp.test, as it's not generating an error any longer.
      mysql-test/r/sp.result:
        Move test case for BUG#336 from sp-error.test and added new test case
        for BUG#3157.
      mysql-test/t/sp-error.test:
        Moved test case for BUG#336 to sp.test, as it's not generating an error any longer.
      mysql-test/t/sp.test:
        Move test case for BUG#336 from sp-error.test and added new test case
        for BUG#3157.
      sql/sp_head.cc:
        Open and close tables in set, jump-if[-not] and freturn instructions if
        the value expression is a subselect.
      sql/sp_head.h:
        Store tables in set, jump-if[-not] and freturn instructions if
        the value expression is a subselect.
      sql/sql_yacc.yy:
        Store tables in set, jump-if[-not] and freturn instructions if
        the value expression is a subselect.
      ac06195c
    • unknown's avatar
      Fixed a valgrind warning when creating stored procedures containing complex · 5a10f1ac
      unknown authored
      unions (crashed randomly), and made "label" not a reserved word.
      
      
      sql/sql_parse.cc:
        Fixed valgrind warning for certain complex unions (which sometime caused crash).
      sql/sql_yacc.yy:
        The temporary(?) "label" statement should not be a reserved word.
      5a10f1ac
  12. 19 Aug, 2004 1 commit
    • unknown's avatar
      after merge fixes · ae2bf627
      unknown authored
      strings/my_vsnprintf.c:
        %.#s support in my_vsnprintf
      BitKeeper/etc/ignore:
        Added EXCEPTIONS-CLIENT to the ignore list
      ae2bf627
  13. 17 Aug, 2004 1 commit
    • unknown's avatar
      WL#2002: Implement stored procedure GOTO. · 9b5a6f72
      unknown authored
      Mostly done, it works, but the temporary LABEL syntax still to be fixed.
      
      
      mysql-test/r/sp-error.result:
        New test case for WL#2002 (GOTO).
      mysql-test/r/sp.result:
        New test case for WL#2002 (GOTO).
        (Also corrected another test)
      mysql-test/t/sp-error.test:
        New test case for WL#2002 (GOTO).
      mysql-test/t/sp.test:
        New test case for WL#2002 (GOTO).
        (Also corrected another test)
      sql/lex.h:
        New symbol GOTO.
        Also a temporary symbol LABEL, which hopefully will go away soon.
      sql/sp_head.cc:
        Fixed backpatching to cope with free GOTO labels an hpop and cpop instructions.
        Also optimized away pointless jump instructions.
      sql/sp_head.h:
        Fixed backpatching to cope with free GOTO labels an hpop and cpop instructions.
        We now sometimes generate hpop/cpop 0 instructions but the optimizer removes them.
      sql/sp_pcontext.cc:
        Added free GOTO labels, and support for coping with jumps out of blocks
        with handlers or cursors.
      sql/sp_pcontext.h:
        Added free GOTO labels, and support for coping with jumps out of blocks
        with handlers or cursors.
      sql/sql_yacc.yy:
        Added GOTO and LABEL, and adjusted backpatching accordingly. Also fixed LEAVE
        out of blocks. The LABEL syntax will go away soon, hopefully.
      9b5a6f72
  14. 13 Aug, 2004 1 commit
    • unknown's avatar
      skip resolving field in table list if table list is not accessable due to groupping (BUG#4814) · d0c87702
      unknown authored
      mysql-test/r/func_gconcat.result:
        fix of test queries
      mysql-test/r/subselect.result:
        resolving fields of grouped outer SELECT
      mysql-test/t/func_gconcat.test:
        fix of test queries
      mysql-test/t/subselect.test:
        resolving fields of grouped outer SELECT
      sql/item.cc:
        skip resolving field in table list if table list is not accessable due to groupping
        layout fixed
      sql/item_subselect.cc:
        detection of place of subquery
      sql/item_subselect.h:
        detection of place of subquery
      sql/mysql_priv.h:
        enum_parsing_place made global type
      sql/sql_lex.cc:
        enum_parsing_place made global type
      sql/sql_lex.h:
        enum_parsing_place made global type
      sql/sql_yacc.yy:
        enum_parsing_place made global type
      d0c87702
  15. 11 Aug, 2004 1 commit
  16. 10 Aug, 2004 1 commit
    • unknown's avatar
      Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server". · 68d7b266
      unknown authored
      Instead of trying to open time zone tables during calculation of CONVERT_TZ() function
      or setting of @@time_zone variable we should open and lock them with the rest of 
      statement's table (so we should add them to global table list) and after that use such 
      pre-opened tables for loading info about time zones.
      
      
      mysql-test/r/timezone2.result:
        Added test for bug #4508
      mysql-test/t/timezone2.test:
        Added test for bug #4508
      scripts/mysql_create_system_tables.sh:
        Added one more test time zone to time zone tables which is needed for test for bug #4508.
      sql/item_create.cc:
        CONVERT_TZ() now is treated as special function.
      sql/item_create.h:
        CONVERT_TZ() now is treated as special function.
      sql/item_timefunc.cc:
        Item_func_convert_tz now uses list of pre-opened time zone tables instead of trying to
        open them ad-hoc. Also it avoid calling of current_thd.
      sql/item_timefunc.h:
        Added comment describing special nature of CONVERT_TZ() function.
        Optimization: Added own fix_fields() method and tz_tables member for caching pointer
        to list of open time zone tables to Item_func_convert_tz class.
      sql/lex.h:
        CONVERT_TZ() now is treated as special function.
      sql/mysql_priv.h:
        Removed function which is no longer used.
      sql/set_var.cc:
        Now my_tz_find() accepts list of pre-opened time zone tables as last argument 
        and no longer needs pointer to current THD.
      sql/set_var.h:
        Exported sys_time_zone, which is now used in sql_yacc.yy for quick finding out if we are
        setting @@time_zone variable.
      sql/sql_base.cc:
        Moved propagation of pointers to open tables from global list to local select lists to
        open_and_lock_tables(), also added implicit usage of time zone tables as condition for
        such propagation.
      sql/sql_lex.cc:
        Added fake_time_zone_tables_list which is used to indicate that time zone tables are
        implicitly used in statement.
        st_select_lex_unit::create_total_list(): if time zone tables are implicitly used in
        statement add them to global tables list.
      sql/sql_lex.h:
        Added LEX::time_zone_tables_used member which is used to indicate that time zone tables 
        are implicitly used in this statement (by pointing to fake_time_zone_table_list) and 
        for holding pointer to those tables after they've been opened.
      sql/sql_parse.cc:
        We should also create global table list if statement uses time zone tables implicitly.
        Added initialization of LEX::time_zone_tables_used to mysql_query_init().
      sql/sql_prepare.cc:
        We should also create global table list if statement uses time zone tables implicitly.
      sql/sql_select.cc:
        Removed functions which are no longer used.
      sql/sql_yacc.yy:
        CONVERT_TZ() and @@time_zone variable are handled in special way since they implicitly 
        use time zone tables.
      sql/tztime.cc:
        Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
        If statement uses CONVERT_TZ() function or @@time_zone variable is set then it implicitly
        uses time zone tables. We need to open and lock such tables with all other tables of 
        such statement.
        
        All code responsible for opening table was removed from tz_load_from_db() and function was 
        renamed to tz_load_from_open_tables() (which uses list of pre-opened tables).
        We also have new functions for construction and initialization of table list of time
        zone tables.
        my_tz_find() now always require list of pre-opened time zone tables and no longer needs
        current THD. So we have to pre-open them in my_tz_init().
        Also now we try to open time zone tables only if they were found during startup.
      sql/tztime.h:
        New function for construction of table list of time zone tables my_tz_get_table_list().
        Now my_tz_find() requires list of pre-pened time zone tables instead of current thread.
      68d7b266
  17. 06 Aug, 2004 2 commits
    • unknown's avatar
      join_nested.result, join_nested.test: · 3478d656
      unknown authored
        Added a test case for bug #4922.
      sql_select.cc:
        Blocked an optimization performed by join_read_const_table when
        applied to an inner table of a nested outer join.
        It was done to fix bug #4922.
      sql_yacc.yy:
        Fixed a typo bug in the rule for join_table.
      
      
      sql/sql_yacc.yy:
        Fixed a typo bug in the rule for join_table.
      sql/sql_select.cc:
        Blocked an optimization performed by join_read_const_table when
        applied to an inner table of a nested outer join.
        It was done to fix bug #4922.
      mysql-test/t/join_nested.test:
        Added a test case for bug #4922.
      mysql-test/r/join_nested.result:
        Added a test case for bug #4922.
      3478d656
    • unknown's avatar
      Fixed BUG#4902: Stored procedure with SHOW WARNINGS leads to packet error, · 177ef90b
      unknown authored
        and tried to do it properly this time, digging out all show commands that
        need the multi results flag set.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#4902, with lots of other show commands as well.
      mysql-test/t/sp.test:
        New test case for BUG#4902, with lots of other show commands as well.
      sql/sp_head.cc:
        The check for possible multiple result commands was becomming unwieldly,
        so we moved it to a separate function, and added loads of new command codes
        to the test.
      sql/sp_head.h:
        The check for possible multiple result commands was becomming unwieldly,
        so we moved it to a separate function.
      sql/sql_yacc.yy:
        The check for possible multiple result commands was becomming unwieldly,
        so we moved it to a separate function.
      177ef90b
  18. 29 Jul, 2004 2 commits
    • unknown's avatar
      Fixed BUG#434: Stored procedure which drops itself causes crash. · 4467bcf2
      unknown authored
      Simply disallow it, just as we disallow creation of routines from within
      other SPs.
      
      
      include/mysqld_error.h:
        New error code for when attempting to drop a stored routine from within
        another stored routine.
      mysql-test/r/sp-error.result:
        New test case for BUG#4344.
      mysql-test/t/sp-error.test:
        New test case for BUG#4344.
      sql/share/czech/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/danish/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/dutch/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/english/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/estonian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/french/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/german/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/greek/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/hungarian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/italian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/japanese/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/korean/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/norwegian-ny/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/norwegian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/polish/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/portuguese/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/romanian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/russian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/serbian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/slovak/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/spanish/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/swedish/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/share/ukrainian/errmsg.txt:
        New error message for when attempting to drop a stored routine from within
        another stored routine.
      sql/sql_yacc.yy:
        Don't allow drop function/procedure from within another function/procedure.
      4467bcf2
    • unknown's avatar
      Fixed BUG#4318: Stored Procedure packet error if HANDLER statement, · 96aeecf2
      unknown authored
      at least partially. It doesn't crash or give packets out of order
      any more, but it's unclear why it doesn't actually return anything
      from within an SP. This should be investigated at some point, but
      for the moment this will have to do. (It is a rather obscure feature... :)
      
      
      mysql-test/r/sp.result:
        Test case for BUG#4318.
      mysql-test/t/sp.test:
        Test case for BUG#4318.
      sql/sql_yacc.yy:
        Recognize HANDLER READ as another statement that might result in multiple results.
      96aeecf2
  19. 26 Jul, 2004 1 commit
  20. 22 Jul, 2004 1 commit
    • unknown's avatar
      fixed SP variables detecting (BUG#4604) · 48ea6e3b
      unknown authored
      fixed error handling
      
      
      mysql-test/r/view.result:
        SP variables inside view test
      mysql-test/t/view.test:
        SP variables inside view test
      sql/sql_base.cc:
        fixed error messages handling
      sql/sql_yacc.yy:
        fixed SP variables detecting
      48ea6e3b
  21. 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
  22. 08 Jul, 2004 1 commit
  23. 07 Jul, 2004 2 commits
    • unknown's avatar
      patch for task WL 1941 "NO_C_ESCAPE sql_mode" · a7727013
      unknown authored
      mysql-test/r/sql_mode.result:
        added test for WL 1941 "NO_C_ESCAPE sql_mode"
      mysql-test/t/sql_mode.test:
        added test for WL 1941 "NO_C_ESCAPE sql_mode"
      sql/mysql_priv.h:
        added MODE_NO_BACKSLASH_ESCAPES
      sql/mysqld.cc:
        added mode NO_BACKSLASH_ESCAPES
      sql/sql_lex.cc:
        added test for MODE_NO_BACKSLASH_ESCAPES when testing escaped character
      sql/sql_yacc.yy:
        added using of "" as escape by default
         in LIKE function if MODE_NO_BACKSLASH_ESCAPES
      a7727013
    • unknown's avatar
      Don't allow badly formed UTF8 identitiers · 5ef15478
      unknown authored
      5ef15478
  24. 02 Jul, 2004 1 commit
  25. 26 Jun, 2004 2 commits
    • unknown's avatar
      removed using lex->select_lex.options is SHOW TABLE [STATUS] commands (BUG#4288) · f7b9e75b
      unknown authored
      mysql-test/r/func_group.result:
        fixed
      mysql-test/r/ps.result:
        SHOW TABLE STATUS test
      mysql-test/t/ps.test:
        SHOW TABLE STATUS test
      sql/sql_parse.cc:
        Use lex->describe instead of lex->select_lex.options
      sql/sql_yacc.yy:
        removed unneed initialization of lex->select_lex.options
      f7b9e75b
    • unknown's avatar
      after merge fixed · 7eb1afab
      unknown authored
      mysql-test/r/flush_table.result:
        after merge fixed
        duplicated tests removed
      mysql-test/t/flush_table.test:
        after merge fixed
        duplicated tests removed
      sql/sql_yacc.yy:
        alias is not db-qualified
      7eb1afab
  26. 25 Jun, 2004 1 commit
    • unknown's avatar
      af · 62746a77
      unknown authored
      sql/sql_select.cc:
        After merge fix
      sql/sql_yacc.yy:
        After merge fix
      62746a77
  27. 24 Jun, 2004 2 commits
    • unknown's avatar
      parameter of my_yyoverflow made independed from YYSIZE_T (BUG#4204) · d75022ff
      unknown authored
      sql/sql_parse.cc:
        parameter of my_yyoverflow made independed from YYSIZE_T
      sql/sql_yacc.yy:
        parameter of my_yyoverflow made independed from YYSIZE_T
      d75022ff
    • unknown's avatar
      Fix for Bug#4030 "Client side conversion string -> date type doesn't · 9dde4188
      unknown authored
      work (prepared statements)" and after-review fixes:
      - str_to_TIME renamed to str_to_datetime to pair with str_to_time
      - functions str_to_time and str_to_TIME moved to sql-common
      - send_data_str now supports MYSQL_TYPE_TIME, MYSQL_TIME_DATE,
        MYSQL_TIME_DATETIME types of user input buffers.
      - few more comments in the client library
      - a test case added.
      
      
      VC++Files/libmysql/libmysql.dsp:
        new file: my_time.c
      VC++Files/libmysqld/libmysqld.dsp:
        new file: my_time.c
      VC++Files/sql/mysqld.dsp:
        new file: my_time.c
      include/Makefile.am:
        - mysql_time.h added to the list of installed client library headers
      include/mysql.h:
        - declarations for MYSQL_TIME and enum_mysql_timestamp_type moved to 
        mysql_time.h, which is in shared use of client library and mysys.
      libmysql/Makefile.shared:
        - my_time.lo added to the list of libmysql objects
      libmysql/libmysql.c:
        Fix for bug#4030 "Client side conversion string -> date type doesn't work
         (prepared statements)" and cleanup.
        - added case labels for TIME/DATE/DATETIME types to send_data_str
        - comments for read_binary_{date,time,datetime}, fetch_result_*, fetch_results.
      libmysqld/Makefile.am:
        - my_time.c added
      sql-common/Makefile.am:
        - my_time.c added to the list of files included into source distribution.
      sql/Makefile.am:
        my_time.c added to the list of mysqld sources.
      sql/field.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
      sql/item.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
      sql/item_timefunc.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
      sql/mysql_priv.h:
        - added typedefs for TIME and timestamp_type
        - removed declarations for str_to_time and str_to_TIME (now this functions
          reside in mysys)
      sql/mysqld.cc:
        - log_10_int moved to mysys (it's used by str_to_TIME and str_to_time)
        - enum values TIMESTAMP_{TIME,DATE,DATETIME} were renamed to
          MYSQL_TIMESTAMP_{TIME,DATE,DATETIME}
      sql/set_var.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
      sql/set_var.h:
        - fixed timestamp_type usage to be compatible with typedef.
      sql/sql_prepare.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME} were renamed to
          MYSQL_TIMESTAMP_{TIME,DATE,DATETIME}
        - embedded library implementation of set_param_{time,date,datetime} is
        much simplier now, as MYSQL_TIME is the same as TIME.
      sql/sql_yacc.yy:
        - s/\<TIMESTAMP_/MYSQL_TIMESTAMP/gc
      sql/structs.h:
        - declarations for TIME and timestamp_type replaced with typedefs
        - str_to_datetime arguments moved to mysys headers
      sql/time.cc:
        - str_to_time and str_to_TIME moved to mysys
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...} as these names are now
          exported to client.
        - str_to_TIME renamed to str_to_datetime to pair with str_to_time
        - str_to_TIME_with_warn renamed accordingly
      sql/tztime.cc:
        - TIMESTAMP_{TIME,DATE,DATETIME,...} renamed to 
          MYSQL_TIMESTAMP_{TIME,DATETIME,DATE,...}
      tests/client_test.c:
        - a test case for Bug#4030 "Client side conversion string -> date type 
        doesn't work (prepared statements)"
      9dde4188
  28. 23 Jun, 2004 3 commits
    • unknown's avatar
      parameter of my_yyoverflow made independed from YYSIZE_T (BUG#4204) · a616e1de
      unknown authored
      mysql-test/r/union.result:
        test of correct parser stack overflow handling
      mysql-test/t/union.test:
        test of correct parser stack overflow handling
      sql/sql_parse.cc:
        parameter of my_yyoverflow made independed from YYSIZE_T
      sql/sql_yacc.yy:
        parameter of my_yyoverflow made independed from YYSIZE_T
      a616e1de
    • unknown's avatar
      handler interface cleanups: · 9a554b47
      unknown authored
        more logical table/index_flags
        return  HA_ERR_WRONG_COMMAND instead of abstract methods where appropriate
        max_keys and other limits renamed to max_supported_keys/etc
        max_keys/etc are now wrappers to max_supported_keys/etc 
        ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to real {index,rnd}_{init,end} to enforce strict pairing
      
      
      include/myisam.h:
        increasing myisam_max_temp_file_length
      include/my_base.h:
        handler interface cleanup
      myisam/mi_static.c:
        warning removed
      mysql-test/Makefile.am:
        followup
      mysql-test/r/fulltext.result:
        fulltext indexes are not ordered
      mysql-test/r/rpl_user_variables.result:
        followup
      sql/field.cc:
        index_flags
      sql/filesort.cc:
        rnd_init -> ha_rnd_init
        rnd_end -> ha_rnd_end
      sql/ha_berkeley.cc:
        cleanup
      sql/ha_berkeley.h:
        table/index_flags revamped
      sql/ha_heap.cc:
        ensure index is accessed only after index_init (esp. important for temp tables)
      sql/ha_heap.h:
        table/index_flags revamped
      sql/ha_innodb.cc:
        don't workaround MySQL sloppiness
      sql/ha_innodb.h:
        table/index_flags revamped
      sql/ha_isam.h:
        table/index_flags revamped
      sql/ha_isammrg.h:
        table/index_flags revamped
      sql/ha_myisam.cc:
        ensure index is accessed only after index_init (esp. important for temp tables)
      sql/ha_myisam.h:
        table/index_flags revamped
      sql/ha_myisammrg.h:
        table/index_flags revamped
      sql/handler.cc:
        handler interface cleanups
      sql/handler.h:
        handler interface cleanups:
          more logical table/index_flags
          return  HA_ERR_WRONG_COMMAND instead of abstract methods
          max_keys and other limits renamed to max_supported_keys/etc
          max_keys/etc are now wrappers to max_supported_keys/etc 
          ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to enforce strict pairing
      sql/item_subselect.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/lex.h:
        renamed to avoid conflicts
      sql/opt_range.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
        table/index_flags cleanup
      sql/opt_range.h:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/opt_sum.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
        table/index_flags cleanup
      sql/records.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_acl.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_cache.cc:
        cleanup
      sql/sql_delete.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_handler.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_help.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_insert.cc:
        table/index_flags cleanup
      sql/sql_select.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
        table/index_flags cleanup
      sql/sql_table.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
        table/index_flags cleanup
      sql/sql_update.cc:
        index_init/index_end/rnd_init/rnd_end strict pairing fixed
      sql/sql_yacc.yy:
        INDEX -> INDEX_SYM
      sql/table.cc:
        table/index_flags cleanup
      9a554b47
    • unknown's avatar
      Fix and test case for BUG#3899 · 91e27b02
      unknown authored
      mysql-test/r/alter_table.result:
        Test case for BUG#3899
      mysql-test/t/alter_table.test:
        Test case for BUG#3899
      sql/sql_yacc.yy:
        Fix for BUG#3899: call ALTER_INFO::reset to clear ALTER_INFO::drop_list and ALTER_INFO::alter_list
      91e27b02