1. 15 Dec, 2003 1 commit
    • unknown's avatar
      Fixed various memory leaks. · 1d77c041
      unknown authored
      
      sql/sp.cc:
        Fixed memory leaks. Deletion of sps now in sp_cache.
      sql/sp_cache.cc:
        Fixed memory leaks. Use implicit delete of objects to make sure
        they're always freed.
      sql/sp_cache.h:
        Fixed memory leaks. Use implicit delete of objects to make sure
        they're always freed.
      sql/sp_head.cc:
        Fixed memory leaks. Make sure we use the right mem_root during parsing.
      sql/sp_head.h:
        Fixed memory leaks. Make sure we use the right mem_root during parsing.
      sql/sql_parse.cc:
        Fixed memory leaks. Don't forget to free the temporary object created at definition.
      sql/sql_yacc.yy:
        Fixed memory leaks. Make sure we use the right mem_root during parsing.
      1d77c041
  2. 13 Dec, 2003 1 commit
    • unknown's avatar
      WL#1365: Implement definer's rights execution of stored procedures. · a6f85eea
      unknown authored
      (Also put the hostpart back in the definer column.)
      
      
      mysql-test/r/sp-error.result:
        Moved error test from sp.test
      mysql-test/r/sp.result:
        Moved error test to sp-error.test.
        Put hostpart back into definer column in mysql.proc.
      mysql-test/t/sp-error.test:
        Moved error test from sp.test
      mysql-test/t/sp.test:
        Moved error test to sp-error.test.
        Put hostpart back into definer column in mysql.proc.
      sql/item_func.cc:
        (Maybe) switch security context before invoking a stored function.
      sql/sp.cc:
        Renamed creator into definer, for more consistent terminology, and put the
        hostpart back.
      sql/sp_head.cc:
        Some fixes in the way things are allocated, and moved set_info() definition
        here from sp_head.h. creator is now called definer, and is split into a
        user and host part.
        Added functions for (possible) change and restore of privileges, for sql security
        definer calls.
      sql/sp_head.h:
        Moved set_info() definition here from sp_head.h.
        creator is now called definer, and is split into a user and host part.
        Added functions for (possible) change and restore of privileges, for sql security
        definer calls.
      sql/sql_acl.cc:
        New function acl_getroot_no_password() for getting the privileges used when
        calling an SP with sql security definer.
      sql/sql_acl.h:
        New function acl_getroot_no_password() for getting the privileges used when
        calling an SP with sql security definer.
      sql/sql_parse.cc:
        (Maybe) switch security context before invoking a stored procedure.
      sql/sql_yacc.yy:
        Fixed typo.
      a6f85eea
  3. 12 Dec, 2003 2 commits
    • unknown's avatar
      Don't want host in the definer's column. · 8630ca9a
      unknown authored
      8630ca9a
    • unknown's avatar
      In order to make ALTER PROCEDURE|FUNCTION work correctly, and in general to · cabd28c6
      unknown authored
      make characteristics (and SHOW) work right, we had to separate the old
      definition blob in the mysql.proc table into separate fields for parameters,
      return type, and body, and handle the characteristics (like SQL SECURITY)
      separately... and then reassemble the CREATE string for parsing, of course.
      This is rather ugly, mostly the parser bit. (Hopefully that will be better
      with the new parser.)
      
      
      Docs/sp-imp-spec.txt:
        Separated the definitions string of the procedure into different columns
        in the mysql.proc schema.
      mysql-test/r/sp.result:
        New characteristics tests.
      mysql-test/t/sp.test:
        New characteristics tests.
      scripts/mysql_create_system_tables.sh:
        Separated the definitions string of the procedure into different columns
        in the mysql.proc schema.
      scripts/mysql_fix_privilege_tables.sql:
        Separated the definitions string of the procedure into different columns
        in the mysql.proc schema.
      sql/sp.cc:
        Separated the definitions string of the procedure into different columns.
        Rewrote much of the code related this (have a assemble the definition
        string from its different parts now) and the way characteristics are now
        handled, in order to make ALTER actually work.
      sql/sp.h:
        Changed prototypes.
      sql/sp_head.cc:
        Rewrote much of the code related to the new mysql.proc schema with separate
        definition fields (have to assemble the definition string from its different
        parts now) and the way characteristics are now handled, in order to make ALTER
        actually work.
      sql/sp_head.h:
        Separated the different parts of the definition strings: name, parameters,
        return type (for functions) and body.
      sql/sql_yacc.yy:
        Separated the different parts of the definition strings: name, parameters,
        return type (for functions) and body.
        This is ugly and messy; hopefully there's a more elegant way to do this
        when the new parser is installed.
      cabd28c6
  4. 11 Dec, 2003 1 commit
    • unknown's avatar
      WL#1364: Store some environmental values with SPs and use at invokation · b5627bb0
      unknown authored
      sql_mode is stored and used with SPs.
      sql_select_limit is always unlimited in SPs.
      
      
      mysql-test/r/sp.result:
        Test case for mode settings.
      mysql-test/t/sp.test:
        Test case for mode settings.
      sql/sp.cc:
        Store the sql_mode with the SP and reset it on retrieval.
        sql_select_limit is always maximum (default) in an SP,
        regardless of the setting at the time of create or call.
      b5627bb0
  5. 10 Dec, 2003 1 commit
    • unknown's avatar
      WL#1363: Update the mysql.proc table and add new fields. · 3702a1db
      unknown authored
      Also made the parsing and handling of SP characteristics
      more general and extendable, and added a few ch:istics.
      
      
      Docs/sp-imp-spec.txt:
        Updated spec with new schema.
      Docs/sp-implemented.txt:
        Added info about ALTER and SHOW.
      mysql-test/r/sp.result:
        Minor change in SHOW FUNCTION|PROCEDURE STATUS output.
      scripts/mysql_create_system_tables.sh:
        New mysql.proc schema.
      scripts/mysql_fix_privilege_tables.sql:
        New mysql.proc schema.
      sql/lex.h:
        New lex words for SP characteristics.
      sql/sp.cc:
        New mysql.proc schema.
        Also made the characteristics handling slightly more extendable.
      sql/sp.h:
        Made the characteristics handling slightly more extendable.
      sql/sp_head.cc:
        Made the characteristics handling slightly more extendable.
      sql/sp_head.h:
        Made the characteristics handling slightly more extendable.
      sql/sql_lex.h:
        Made the characteristics handling slightly more extendable.
      sql/sql_parse.cc:
        Made the characteristics handling slightly more extendable.
      sql/sql_yacc.yy:
        Made the characteristics handling slightly more extendable
        and made the parsing of characteristics more general, and
        added a few new dito. (LANGUAGE SQL, and [NOT] DETERMINISTIC
        for starters).
      3702a1db
  6. 09 Dec, 2003 7 commits
  7. 08 Dec, 2003 11 commits
    • unknown's avatar
      post-merge fixes · 8b915a43
      unknown authored
      8b915a43
    • unknown's avatar
      Fixed two packaging bugs: · adc470c2
      unknown authored
       - postinstall of the Mac OS X PKG failed as a parameter for 
         mysql_install_db was changed for MySQL 4.1
       - postinstall of the Server RPM failed as mysql_create_system_tables was
         missing from the file list
      
      
      support-files/MacOSX/postinstall.sh:
         - Fix parameter for mysql_install_db (it was changed from -IN-RPM to --rpm
           in the 4.1 tree)
      support-files/mysql.spec.sh:
         - Added missing file mysql_create_system_tables to the server subpackage
      adc470c2
    • unknown's avatar
      post-merge fixes · 4429ed7e
      unknown authored
      
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      sql/item_create.cc:
        Auto merged
      sql/item_create.h:
        Auto merged
      sql/lex.h:
        Auto merged
      4429ed7e
    • unknown's avatar
      WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions · 417354ea
      unknown authored
      Syntax for TIMESTAMPADD:
      
      TIMESTAMPADD(interval, integer_expression, datetime_expression)
      
      interval:= FRAC_SECOND | SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | 
      QUARTER | YEAR
      
      Supported SQL_TSI_  prefix  (like SQL_TSI_SECOND)
      
      Syntax for TIMESTAMPDIFF:
      
      TIMESTAMPDIFF(interval, datetime_expression1, datetime_expression2)
      
      interval:= FRAC_SECOND | SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | 
      QUARTER | YEAR
      
      Supported SQL_TSI_  prefix  (like SQL_TSI_SECOND)
      
      
      mysql-test/r/func_sapdb.result:
        Additional tests for timediff
      mysql-test/r/func_time.result:
        Tests for timestampadd, timestampdiff functions
      mysql-test/r/keywords.result:
        Test for new keywords
      mysql-test/t/func_sapdb.test:
        Additional tests for timediff
      mysql-test/t/func_time.test:
        Tests for timestampadd, timestampdiff functions
      mysql-test/t/keywords.test:
        Test for new keywords
      sql/item_create.cc:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      sql/item_create.h:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      sql/item_timefunc.cc:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      sql/item_timefunc.h:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      sql/lex.h:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      sql/sql_yacc.yy:
        WL#530&531: TIMESTAMPADD, TIMESTAMPDIFF functions
      417354ea
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 6c0a2455
      unknown authored
      into mysql.com:/home/kostja/mysql/mysql-4.1-root
      
      
      6c0a2455
    • unknown's avatar
      commented why valgrind barks at the bug #1500 · f6f9b349
      unknown authored
      f6f9b349
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 43b42cee
      unknown authored
      into mysql.com:/my/mysql-4.1
      
      
      sql/mysqld.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      strings/ctype-big5.c:
        Auto merged
      strings/ctype-euc_kr.c:
        Auto merged
      strings/ctype-gb2312.c:
        Auto merged
      strings/ctype-gbk.c:
        Auto merged
      strings/ctype-sjis.c:
        Auto merged
      strings/ctype-ujis.c:
        Auto merged
      43b42cee
    • unknown's avatar
      Portability fixes for Windows · e505696f
      unknown authored
      
      VC++Files/client/mysqlclient.dsp:
        Update for windows
      VC++Files/libmysql/libmysql.dsp:
        Update for windows
      VC++Files/strings/strings.dsp:
        Update for windows
      libmysqld/lib_sql.cc:
        Update for windows
      scripts/make_win_src_distribution.sh:
        Update for windows
      scripts/mysql_install_db.sh:
        Update for windows
      sql/mysqld.cc:
        Remove not used variable
      sql/set_var.cc:
        Indentation cleanups
      sql/share/czech/errmsg.txt:
        Fixed wrong delimiters
      sql/share/danish/errmsg.txt:
        Fixed wrong delimiters
      sql/share/dutch/errmsg.txt:
        Fixed wrong delimiters
      sql/share/english/errmsg.txt:
        Fixed wrong delimiters
      sql/share/estonian/errmsg.txt:
        Fixed wrong delimiters
      sql/share/french/errmsg.txt:
        Fixed wrong delimiters
      sql/share/greek/errmsg.txt:
        Fixed wrong delimiters
      sql/share/hungarian/errmsg.txt:
        Fixed wrong delimiters
      sql/share/italian/errmsg.txt:
        Fixed wrong delimiters
      sql/share/japanese/errmsg.txt:
        Fixed wrong delimiters
      sql/share/korean/errmsg.txt:
        Fixed wrong delimiters
      sql/share/norwegian-ny/errmsg.txt:
        Fixed wrong delimiters
      sql/share/norwegian/errmsg.txt:
        Fixed wrong delimiters
      sql/share/polish/errmsg.txt:
        Fixed wrong delimiters
      sql/share/portuguese/errmsg.txt:
        Fixed wrong delimiters
      sql/share/romanian/errmsg.txt:
        Fixed wrong delimiters
      sql/share/russian/errmsg.txt:
        Fixed wrong delimiters
      sql/share/serbian/errmsg.txt:
        Fixed wrong delimiters
      sql/share/slovak/errmsg.txt:
        Fixed wrong delimiters
      sql/share/spanish/errmsg.txt:
        Fixed wrong delimiters
      sql/share/swedish/errmsg.txt:
        Fixed wrong delimiters
      sql/share/ukrainian/errmsg.txt:
        Fixed wrong delimiters
      sql/sql_acl.cc:
        Removed compiler warnings
      strings/ctype-big5.c:
        Removed compiler warnings (VC++)
      strings/ctype-euc_kr.c:
        Removed compiler warnings (VC++)
      strings/ctype-gb2312.c:
        Removed compiler warnings (VC++)
      strings/ctype-gbk.c:
        Removed compiler warnings (VC++)
      strings/ctype-sjis.c:
        Removed compiler warnings (VC++)
      strings/ctype-ucs2.c:
        Removed compiler warnings (VC++)
      strings/ctype-ujis.c:
        Removed compiler warnings (VC++)
      e505696f
    • unknown's avatar
      Fixed test for 'init_slave' variable · 8bf9ccb6
      unknown authored
      8bf9ccb6
    • unknown's avatar
      post-merge fixes · c3359392
      unknown authored
      
      sql/protocol.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/set_var.h:
        Auto merged
      sql/slave.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      c3359392
    • unknown's avatar
      Task ID 499:Add a new settable string variable(init_connect, init_slave) · a0e4a6de
      unknown authored
      to mysqld that is executed for all new connections.
      (Similar to the client command: mysql_options(... MYSQL_INIT_COMMAND ...).
      
      
      sql/mysql_priv.h:
        Task ID	499:Add a new settable string variable(init_connect, init_slave)
        to mysqld that is executed for all new connections.
      sql/mysqld.cc:
        Task ID	499:Add a new settable string variable(init_connect, init_slave)
        to mysqld that is executed for all new connections.
      sql/protocol.cc:
        Task ID	499:Add a new settable string variable(init_connect, init_slave)
        to mysqld that is executed for all new connections.
      sql/set_var.cc:
        Task ID	499:Add a new settable string variable(init_connect, init_slave)
        to mysqld that is executed for all new connections.
      sql/slave.cc:
        Task ID	499:Add a new settable string variable(init_connect, init_slave)
        to mysqld that is executed for all new connections.
      sql/sql_class.cc:
        Task ID	499:Add a new settable string variable(init_connect, init_slave)
        to mysqld that is executed for all new connections.
      sql/sql_class.h:
        Task ID	499:Add a new settable string variable(init_connect, init_slave)
        to mysqld that is executed for all new connections.
      sql/sql_parse.cc:
        Task ID	499:Add a new settable string variable(init_connect, init_slave)
        to mysqld that is executed for all new connections.
      sql/sql_show.cc:
        Task ID	499:Add a new settable string variable(init_connect, init_slave)
        to mysqld that is executed for all new connections.
      a0e4a6de
  8. 07 Dec, 2003 1 commit
  9. 06 Dec, 2003 3 commits
  10. 05 Dec, 2003 3 commits
    • unknown's avatar
      New test cases for BUG#1653 (recalling a procedure after replacing a faulty · 7f9ba01f
      unknown authored
      table definition crashed), and recursive calls.
      
      
      mysql-test/r/sp.result:
        New test cases for BUG#1653 and recursive calls.
      mysql-test/t/sp.test:
        New test cases for BUG#1653 and recursive calls.
      7f9ba01f
    • unknown's avatar
      Post-merge fixes. · b7310403
      unknown authored
      b7310403
    • unknown's avatar
      Merged 4.1 -> 5.0 · 4cc04190
      unknown authored
      
      BitKeeper/etc/ignore:
        auto-union
      BitKeeper/etc/logging_ok:
        auto-union
      myisam/mi_check.c:
        Auto merged
      myisam/myisamchk.c:
        Auto merged
      myisam/sort.c:
        Auto merged
      mysql-test/r/variables.result:
        Auto merged
      mysql-test/t/variables.test:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      4cc04190
  11. 04 Dec, 2003 9 commits