1. 22 Mar, 2004 1 commit
    • unknown's avatar
      WL#1366: Use the schema (db) associated with an SP. · 645d19f6
      unknown authored
      Phase 4 (final): Remove associated stored procedures when a database is dropped.
      
      
      mysql-test/r/sp-security.result:
        drop database now deletes associated SPs.
      mysql-test/r/sp.result:
        drop database now deletes associated SPs.
      mysql-test/t/sp-security.test:
        drop database now deletes associated SPs.
      mysql-test/t/sp.test:
        drop database now deletes associated SPs.
      sql/sp.cc:
        New function for deleting all SPs associated with a database.
      sql/sp.h:
        New function for deleting all SPs associated with a database.
      sql/sp_cache.cc:
        New function for just invalidating all SP caches (when dropping a database).
      sql/sp_cache.h:
        New function for just invalidating all SP caches (when dropping a database).
      sql/sql_db.cc:
        When dropping a database, also delete all associated SPs.
      645d19f6
  2. 19 Mar, 2004 1 commit
    • unknown's avatar
      WL#1366: Use the schema (db) associated with an SP. · d2ad3cff
      unknown authored
      Phase 3: Made qualified names work for functions as well.
      
      
      mysql-test/r/sp-security.result:
        New testcases for functions with qualified names.
      mysql-test/t/sp-security.test:
        New testcases for functions with qualified names.
      sql/item_func.cc:
        Added error handling for stored function, if it doesn't exist.
      sql/item_func.h:
        Set null_value if execution of a stored function fails.
      sql/mysql_priv.h:
        Reverted previous change: No optional args for mysql_change_db().
        (SPs use a specially tailored function instead.)
      sql/sp.cc:
        Copied mysql_change_db() from sql_db.cc and modified specially for SPs.
      sql/sp_head.cc:
        Fixed error handling for errors in functions during query/statement execution.
      sql/sql_db.cc:
        Reverted previous change: No optional args for mysql_change_db().
        (SPs use a specially tailored function instead.)
      sql/sql_yacc.yy:
        Reworked the stored function/UDF invokation parsing and added qualified names
        for stored functions. UDFs now have precedence over stored functions (whith
        unqualified name). When using an unqualified name, only IDENT_sys is allowed
        (i.e. no unreserved keywords), since we get unresolvable reduce/reduce conflicts
        otherwise.
      d2ad3cff
  3. 18 Mar, 2004 1 commit
    • unknown's avatar
      Merge · edf20030
      unknown authored
      
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/t/sp.test:
        Auto merged
      sql/sp.cc:
        SCCS merged
      edf20030
  4. 17 Mar, 2004 2 commits
    • unknown's avatar
      Merge mysql.com:/usr/local/bk/mysql-5.0 · b440d2cf
      unknown authored
      into mysql.com:/home/pem/work/mysql-5.0-merge
      
      
      b440d2cf
    • unknown's avatar
      Fix BUG#2674: Crash if return system variable in stored procedures. · 36dd9723
      unknown authored
      Had to initialize some fields in lex before parsing an SP read from
      mysql.proc.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#2674.
      mysql-test/t/sp.test:
        New test case for BUG#2674.
      sql/sp.cc:
        We need to initialize some thd->lex fields (e.g. unit master pointers) since
        LEX::uncacheable() depends on this, and it's called when looking up system
        variables during parsing.
      36dd9723
  5. 15 Mar, 2004 1 commit
  6. 11 Mar, 2004 1 commit
    • unknown's avatar
      WL#1366: Use the schema (db) associated with an SP. · eb4aa092
      unknown authored
      Phase 2: Make SPs belong to a DB, and use qualified names.
        As a side effect, using USE in an SP is no longer allowed.
        (It just doesn't work otherwise.)
      
      
      include/mysqld_error.h:
        New error code (USE is no longer allowed in a stored procedure).
      include/sql_state.h:
        New error state (USE is no longer allowed in a stored procedure).
      mysql-test/r/sp-error.result:
        Updated result for test of USE in SP (not allowed now).
      mysql-test/r/sp-security.result:
        Updated test results for new db column and qualified procedured names.
      mysql-test/r/sp.result:
        Updated results for USE in SP (as it's no longer allowed), and
        for new db column in status result.
      mysql-test/t/sp-error.test:
        Moved test of USE in SP from sp.test (as it's no longer allowed).
      mysql-test/t/sp-security.test:
        Ajusted tests for new db column and qualified procedured names.
      mysql-test/t/sp.test:
        Moved test of USE in SP to sp-error.test (as it's no longer allowed).
        Adjusted tests for new db column in status result.
      sql/mysql_priv.h:
        mysql_change_db() now has optional arguments for use by SP with qualified names.
      sql/share/czech/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/danish/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/dutch/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/english/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/estonian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/french/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/german/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/greek/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/hungarian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/italian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/japanese/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/korean/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/norwegian-ny/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/norwegian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/polish/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/portuguese/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/romanian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/russian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/serbian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/slovak/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/spanish/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/swedish/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/share/ukrainian/errmsg.txt:
        New error message: USE is not allowed in a stored procedure.
      sql/sp.cc:
        SPs are now "belong" to a DB and may have qualified names.
        New functions for changing DB ("use") when parsing and invoking SPs.
      sql/sp.h:
        New functions for changing DB ("use") when parsing and invoking SPs.
      sql/sp_cache.cc:
        Use the qualified name in the SP cache.
      sql/sp_head.cc:
        New function for allocating a qualified SP name (used in sql_yacc.yy).
        Change DB when executing an SP (if needed).
        Moved thd_mem_root swap functions from sp_head.h.
      sql/sp_head.h:
        New function for allocating a qualified SP name (used in sql_yacc.yy).
        Moved thd_mem_root swap functions to sp_head.cc.
      sql/sql_db.cc:
        mysql_change_db() now has optional arguments for use by SP with qualified names
        (for use when reading an SP from database and executing it); also allow "unusing"
        a database, i.e. setting thd->thd to "".
      sql/sql_yacc.yy:
        Initialize qualfied SP names correctly.
        USE is no longer allowed in an SP.
      eb4aa092
  7. 02 Mar, 2004 2 commits
    • unknown's avatar
      Merge mysql.com:/usr/local/bk/mysql-5.0 · 5aa57221
      unknown authored
      into mysql.com:/home/pem/work/mysql-5.0
      
      
      sql/sp_head.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      5aa57221
    • unknown's avatar
      Fixed BUG#2777: Stored procedure doesn't observe definer's rights. · 857b5957
      unknown authored
      SQL SECURITY DEFINER must enforce reduced rights too, not just additional rights.
      
      
      mysql-test/r/sp-security.result:
        Test case for BUG#2777: Make sure that SQL SECURITY DEFINER enforces reduced rights.
      mysql-test/t/sp-security.test:
        Test case for BUG#2777: Make sure that SQL SECURITY DEFINER enforces reduced rights.
      sql/sql_acl.cc:
        Clear rights before changing them in acl_getroot_no_password so that
        reduced rights work too, and take care of db acls as well.
      857b5957
  8. 01 Mar, 2004 1 commit
    • unknown's avatar
      Fixed small race condition, when global query_id was modified · 23a6b4ed
      unknown authored
      without proper locking.
      
      
      sql/sp_head.cc:
        Added missing locking of LOCK_thread_count to place where ::query_id is 
        modified.
      sql/sql_parse.cc:
        Added comment to the only place where we are modifying ::query_id
        without following locking protocol, to avoid mistakes in future.
      BitKeeper/etc/logging_ok:
        Logging to logging@openlogging.org accepted
      23a6b4ed
  9. 17 Feb, 2004 2 commits
    • unknown's avatar
      WL#1366: Use the schema (db) associated with an SP. · e55c4ed1
      unknown authored
      Phase 1: Introduced sp_name class, for qualified name support.
      
      
      sql/item_func.cc:
        Introduced sp_name class; moved some methods from item_func.h.
      sql/item_func.h:
        Introduced sp_name class; moved some methods to item_func.cc.
      sql/sp.cc:
        Introduced sp_name class, for qualified name support.
      sql/sp.h:
        Introduced sp_name class, for qualified name support.
      sql/sp_cache.cc:
        Introduced sp_name class, for qualified name support.
      sql/sp_cache.h:
        Introduced sp_name class, for qualified name support.
      sql/sp_head.cc:
        Introduced sp_name class, for qualified name support.
      sql/sp_head.h:
        Introduced sp_name class, for qualified name support.
      sql/sql_lex.h:
        Introduced sp_name class, for qualified name support.
      sql/sql_parse.cc:
        Introduced sp_name class, for qualified name support.
      sql/sql_yacc.yy:
        Introduced sp_name class, for qualified name support.
      e55c4ed1
    • unknown's avatar
      Merge mysql.com:/usr/local/bk/mysql-5.0 · 7444a50a
      unknown authored
      into mysql.com:/home/pem/work/mysql-5.0
      
      
      7444a50a
  10. 16 Feb, 2004 2 commits
  11. 13 Feb, 2004 7 commits
  12. 12 Feb, 2004 10 commits
  13. 11 Feb, 2004 9 commits
    • unknown's avatar
      Post-merge fixes. · b5c8de4c
      unknown authored
      b5c8de4c
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · f2753fe9
      unknown authored
      into mysql.com:/home/dlenev/src/mysql-4.1-bg2248
      
      
      include/mysql.h:
        Auto merged
      libmysql/libmysql.c:
        Auto merged
      f2753fe9
    • unknown's avatar
      Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1 · 7df19a09
      unknown authored
      into bar.intranet.mysql.r18.ru:/usr/home/bar/mysql-4.1
      
      
      7df19a09
    • unknown's avatar
      Bug 2701: Function CHARSET() inconsistency · b268952f
      unknown authored
      CONVERT3 was removed, it was for test purposes,
      and rather harmful.
      
      
      b268952f
    • unknown's avatar
      Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1 · 861d3f41
      unknown authored
      into deer.(none):/home/hf/work/mysql-4.1.2208
      
      
      sql/sql_parse.cc:
        Auto merged
      861d3f41
    • unknown's avatar
      Addition to the fix for #2208 · e5c142a4
      unknown authored
      Made code shorter and more correct
      
      
      libmysql/client_settings.h:
        cli_next_result removed
      libmysql/libmysql.c:
        cli_next_result removed
      e5c142a4
    • unknown's avatar
      Manual merge. · 28ac1ba4
      unknown authored
      28ac1ba4
    • unknown's avatar
      Merge gbichot@213.136.52.20:/home/bk/mysql-4.1 · e2f0e8f2
      unknown authored
      into mysql.com:/home/mysql_src/mysql-4.1
      
      
      e2f0e8f2
    • unknown's avatar
      Fix for BUG#2703 · 0aa48dc5
      unknown authored
      "MySQL server does not detect if garbage chars at the end of query":
      
      Detect garbage chars at the end of the query or at the end of a query
      for a prepared statement (which happens if mysql_real_query() or mysql_prepare()
      were called with a too big 'length' parameter (bigger than the real intended
      length of the query: then we receive a query + garbage characters from the
      client). This resulted in garbage chars written into the binlog.
      Now instead the client receives something like:
      'You have an error in your SQL syntax.  Check the manual that corresponds
      to your MySQL server version for the right syntax to use near '!stmt'
      at line 1' i.e. the server is pointing at the weird tail of the query
      (this '!stmt' are the garbage chars sent by the client).
      All tests pass, except mysqldump.test and ctype_utf8.test but they failed
      before the patch.
      
      
      sql/sql_parse.cc:
        Detect garbage chars at the end of the query
        (which happens if mysql_real_query() was called with a too big 'length'
        parameter (bigger than the real intended length of the query: then
        we receive a query + garbage characters from the client).
      sql/sql_prepare.cc:
        Detect garbage chars at the end of the query
        (which happens if mysql_prepare() was called with a too big 'length'
        parameter (bigger than the real intended length of the query: then
        we receive a query + garbage characters from the client).
      tests/client_test.c:
        The change to sql_parse.cc and sql_prepare.cc rightfully gives many
        syntax errors to tests/client_test.c which is full of
        mysql_prepare(mysql, "SHOW TABLES", 100).
        Correcting all these commands.
      0aa48dc5