1. 02 Mar, 2006 3 commits
    • unknown's avatar
      Fix for BUG#13198: SP executes if definer does not exist. · a36ac47e
      unknown authored
      Basically, this fix contains a test case and removing of a workaround
      for replication. This fix became possible after pushing WL#2897
      (Complete definer support in stored routines).
      
      
      mysql-test/r/sp-security.result:
        Updated the result file to contain results of test for BUG#13198.
      mysql-test/t/sp-security.test:
        Added a test case for BUG#13198.
      sql/sp_head.cc:
        Removed the workaround for replication, since WL#2897 is pushed and
        now definer attribute/clause is fully supported in stored routines.
      a36ac47e
    • unknown's avatar
      Implementation of WL#2897: Complete definer support in the stored routines. · e159ce93
      unknown authored
      The idea is to add DEFINER-clause in CREATE PROCEDURE and CREATE FUNCTION
      statements. Almost all support of definer in stored routines had been already
      done before this patch.
      
      NOTE: this patch changes behaviour of dumping stored routines in mysqldump.
      Before this patch, mysqldump did not dump DEFINER-clause for stored routines
      and this was documented behaviour. In order to get full information about stored
      routines, one should have dumped mysql.proc table. This patch changes this
      behaviour, so that DEFINER-clause is dumped.
      
      Since DEFINER-clause is not supported in CREATE PROCEDURE | FUNCTION statements
      before this patch, the clause is covered by additional version-specific comments.
      
      
      client/mysqldump.c:
        Updated the code for dumping stored routines: cover DEFINER-clause
        into version-specific comment.
      mysql-test/r/gis.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/information_schema.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/mysqldump.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/rpl_ddl.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/rpl_sp.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/rpl_trigger.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/sp-security.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/sp.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/sql_mode.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/t/sp-security.test:
        Updated result file after adding DEFINER-clause.
      sql/sp.cc:
        Added DEFINER-clause.
      sql/sp_head.cc:
        Added a new convenient variant of set_definer() operation.
      sql/sp_head.h:
        Updated result file after adding DEFINER-clause.
      sql/sql_lex.h:
        Renamed trigger_definition_begin into stmt_definition_begin to be used for
        triggers and stored routines.
      sql/sql_parse.cc:
        Check DEFINER-clause.
      sql/sql_trigger.cc:
        Renamed trigger_definition_begin into stmt_definition_begin to be used for
        triggers and stored routines.
      sql/sql_yacc.yy:
        Added DEFINER-clause.
      e159ce93
    • unknown's avatar
      Fix for BUG#16777: Can not create trigger nor view w/o definer · ed9f699e
      unknown authored
      if --skip-grant-tables specified.
      
      The problem is that there is a check that prevents creating a definer
      with empty host name.
      
      In --skip-grant-tables mode this check prevents the user from creating a
      trigger/view without explicitly specifying its definer. This happens, because
      in --skip-grant-tables mode CURRENT_USER is ''@''. According to Sanja this
      check was implemented intentionally.
      
      However, according to the MySQL manual it is possible to specify empty host
      name (as well as empty user name). Moreover, the behaviour for stored routines
      is different in this aspect -- we allow them to be created with implicit
      definer.
      
      Based on this, we believe it is OK to change the behaviour for views to be
      similar with the behaviour for stored routines.
      
      
      mysql-test/r/skip_grants.result:
        Added a test case for BUG#16777.
      mysql-test/t/skip_grants.test:
        Added a test case for BUG#16777.
      sql/mysql_priv.h:
        Do not check that strlen(host) > 0 in get_default_definer().
      sql/sql_parse.cc:
        Do not check that strlen(host) > 0 in get_default_definer().
      sql/sql_view.cc:
        Do not check that strlen(host) > 0 in get_default_definer().
      ed9f699e
  2. 01 Mar, 2006 1 commit
    • unknown's avatar
      Fix for BUG#16266: Definer is not fully qualified error during replication. · 98026cb2
      unknown authored
      The idea of the fix is to extend support of non-SUID triggers for backward
      compatibility. Formerly non-SUID triggers were appeared when "new" server
      is being started against "old" database. Now, they are also created when
      "new" slave receives updates from "old" master.
      
      
      mysql-test/r/rpl_trigger.result:
        Updated the result file with the results of the test for BUG#16266.
      mysql-test/t/rpl_trigger.test:
        Added the test case for BUG#16266.
      sql/mysql_priv.h:
        Added an utility operation to be used from sql_yacc.yy.
      sql/sql_parse.cc:
        Add a utility operation to be used from sql_yacc.yy.
      sql/sql_trigger.cc:
        Extend support of non-SUID triggers.
      sql/sql_view.cc:
        Initialize LEX::definer if DEFINER-clause is missing.
      sql/sql_yacc.yy:
        Extended support of non-SUID triggers.
      mysql-test/std_data/bug16266.000001:
        A new binlog file for testing a patch for BUG#16266.
      98026cb2
  3. 27 Feb, 2006 9 commits
  4. 26 Feb, 2006 6 commits
  5. 25 Feb, 2006 6 commits
    • unknown's avatar
      Merge monty@192.168.0.9:/my/mysql-5.0 · 57955482
      unknown authored
      into  mysql.com:/home/my/mysql-5.0
      
      57955482
    • unknown's avatar
      Fixed compiler warnings from gcc 4.0.2: · 59ebf42d
      unknown authored
      - Added empty constructors and virtual destructors to many classes and structs
      - Removed some usage of the offsetof() macro to instead use C++ class pointers
      
      
      configure.in:
        Added comment
      ndb/include/ndbapi/NdbDictionary.hpp:
        Fixed compiler warnings from gcc 4.0.2
      sql/field.cc:
        Fixed compiler warnings from gcc 4.0.2
      sql/handler.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/item.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/item_cmpfunc.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/log_event.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/mysql_priv.h:
        Fixed compiler warnings from gcc 4.0.2
        For find_table_in_list I fixed it to use proper C++ class pointers instead of C style pointers
      sql/opt_range.cc:
        Fixed compiler warnings from gcc 4.0.2
      sql/parse_file.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/sp_rcontext.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/spatial.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/sql_base.cc:
        Fixed compiler warnings from gcc 4.0.2
      sql/sql_cache.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/sql_class.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/sql_parse.cc:
        Fixed compiler warnings from gcc 4.0.2
        (Not pretty, but seams to work...)
      sql/sql_select.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/sql_update.cc:
        Fixed compiler warnings from gcc 4.0.2
      sql/table.h:
        Fixed compiler warnings from gcc 4.0.2
      sql/tztime.cc:
        Fixed compiler warnings from gcc 4.0.2
      sql/tztime.h:
        Fixed compiler warnings from gcc 4.0.2
      59ebf42d
    • unknown's avatar
      6939297c
    • unknown's avatar
      Fixed typo · 4d8c3113
      unknown authored
      
      sql/sql_db.cc:
        Move LINT_INIT() to correct place
      4d8c3113
    • unknown's avatar
      Merge monty@192.168.0.9:/my/mysql-5.0 · f3b2392b
      unknown authored
      into  mysql.com:/home/my/mysql-5.0
      
      f3b2392b
    • unknown's avatar
      Fixed new introduced bug in binlog.test with --ps-protocol · cf982376
      unknown authored
      
      mysql-test/t/binlog.test:
        Fixed --ps-protocol (Side effect from last patch)
      sql/sql_db.cc:
        Removed compiler warning
        Fixed memory loss on slave
      tests/mysql_client_test.c:
        Removed compiler warnings
      cf982376
  6. 24 Feb, 2006 6 commits
    • unknown's avatar
      Fix for bug #13525 "Rename table does not keep info of triggers". · 925d168a
      unknown authored
      Let us transfer triggers associated with table when we rename it (but only if
      we are not changing database to which table belongs, in the latter case we will
      emit error).
      
      
      mysql-test/r/trigger.result:
        Added test for bug #13525 "Rename table does not keep info of triggers".
      mysql-test/t/trigger.test:
        Added test for bug #13525 "Rename table does not keep info of triggers".
      sql/sql_rename.cc:
        rename_tables():
          Now after renaming table's .FRM file and updating handler data we call
          Table_triggers_list::change_table_name() which is reponsible for
          updating .TRG and .TRN files.
      sql/sql_table.cc:
        mysql_alter_table():
          Now in case when ALTER should rename table we call
          Table_triggers_list::change_table_name() which is responsible
          for updating .TRG and .TRN files after renaming table.
      sql/sql_trigger.cc:
        Added Table_triggers_list::change_table_name() method and
        change_table_name_in_triggers()/trignames() methods responsible for updating
        .TRG and .TRN files for table during its renaming.
        
        Two small cleanups - removed versioning for .TRG files (since it was not working
        before anyway) and emphasized that type of lock specified in tables list is
        unimportant for DROP TABLE (since this statement uses name-locking).
      sql/sql_trigger.h:
        Table_triggers_list:
          Added on_table_names_list member to store pointers and lenghts of
          "ON table_name" parts in triggers' definitions to be able easily
          change them during RENAME TABLE.
          Added change_table_name() method and change_table_name_in_trignames/triggers()
          helper methods responsible for updating .TRG and .TRN files.
      sql/sql_yacc.yy:
        trigger_tail:
          To be able properly update triggers' definitions with new table names
          when renaming tables we need to know where in CREATE TRIGGER statement
          "ON db_name.table_name" part resides.
          Small cleanup - let us emphasize that for CREATE TRIGGER statement 
          lock type which is specified in table list is unimportant since
          name-locking is used.
      925d168a
    • unknown's avatar
      Merge monty@192.168.0.9:/my/mysql-5.0 · d1760918
      unknown authored
      into  mysql.com:/home/my/mysql-5.0
      
      d1760918
    • unknown's avatar
      Fixes to embedded server to be able to run tests with it · 988f0be6
      unknown authored
      (Needed for "list of pushes" web page and autopush)
      
      
      include/mysql.h:
        Fix to embedded server to be able to run tests on it
      libmysql/libmysql.c:
        Fix to embedded server to be able to run tests on it
      libmysqld/emb_qcache.cc:
        Fix to embedded server to be able to run tests on it
      libmysqld/embedded_priv.h:
        Fix to embedded server to be able to run tests on it
      libmysqld/lib_sql.cc:
        Fix to embedded server to be able to run tests on it
      libmysqld/libmysqld.c:
        Fix to embedded server to be able to run tests on it
      mysql-test/mysql-test-run.sh:
        Fix to embedded server to be able to run tests on it
      mysql-test/r/binlog.result:
        Updated test for embedded server
      mysql-test/r/ctype_cp932.result:
        Updated test for embedded server
      mysql-test/r/innodb.result:
        Updated test for embedded server
      mysql-test/r/mysqltest.result:
        Updated test for embedded server
      mysql-test/r/query_cache.result:
        Updated test for embedded server
      mysql-test/r/query_cache_notembedded.result:
        Updated test for embedded server
      mysql-test/r/sp-error.result:
        Updated test for embedded server
      mysql-test/r/sp.result:
        Updated test for embedded server
      mysql-test/r/subselect.result:
        Updated test for embedded server
      mysql-test/r/view.result:
        Updated test for embedded server
      mysql-test/r/view_grant.result:
        Updated test for embedded server
      mysql-test/t/backup.test:
        Updated test for embedded server
      mysql-test/t/binlog.test:
        Updated test for embedded server
      mysql-test/t/blackhole.test:
        Updated test for embedded server
      mysql-test/t/compress.test:
        Updated test for embedded server
      mysql-test/t/ctype_cp932.test:
        Updated test for embedded server
      mysql-test/t/delayed.test:
        Updated test for embedded server
      mysql-test/t/handler.test:
        Updated test for embedded server
      mysql-test/t/innodb.test:
        Updated test for embedded server
      mysql-test/t/mysql.test:
        Updated test for embedded server
      mysql-test/t/mysql_client_test.test:
        Updated test for embedded server
      mysql-test/t/mysqltest.test:
        Updated test for embedded server
      mysql-test/t/query_cache.test:
        Updated test for embedded server
      mysql-test/t/query_cache_notembedded.test:
        Updated test for embedded server
      mysql-test/t/read_only.test:
        Updated test for embedded server
      mysql-test/t/skip_grants.test:
        Updated test for embedded server
      mysql-test/t/sp-destruct.test:
        Updated test for embedded server
      mysql-test/t/sp-error.test:
        Updated test for embedded server
      mysql-test/t/sp-threads.test:
        Updated test for embedded server
      mysql-test/t/sp.test:
        Updated test for embedded server
      mysql-test/t/subselect.test:
        Updated test for embedded server
      mysql-test/t/temp_table.test:
        Updated test for embedded server
      mysql-test/t/view.test:
        Updated test for embedded server
      mysql-test/t/view_grant.test:
        Updated test for embedded server
      mysql-test/t/wait_timeout.test:
        Updated test for embedded server
      mysys/mf_dirname.c:
        Review fix: Don't access data outside of array
      mysys/my_bitmap.c:
        Remove compiler warnings
      scripts/mysql_fix_privilege_tables.sql:
        Add flush privileges to .sql script so that one doesn't have to reboot mysqld when one runs the mysql_fix_privilege_script
      sql-common/client.c:
        Updated test for embedded server
      sql/item.cc:
        Remove DBUG_PRINT statement that can cause crashes when running with --debug
      sql/mysqld.cc:
        Fix to embedded server to be able to run tests on it
      sql/protocol.cc:
        Fix to embedded server to be able to run tests on it
        (Trivial reconstruction of code)
      sql/protocol.h:
        Fix to embedded server to be able to run tests on it
      sql/sql_base.cc:
        Better comment
      sql/sql_class.cc:
        Fix to embedded server to be able to run tests on it
      sql/sql_class.h:
        Fix to embedded server to be able to run tests on it
      sql/sql_cursor.cc:
        Fix to embedded server to be able to run tests on it
      sql/sql_parse.cc:
        Fix to embedded server to be able to run tests on it
        Don't crash for disabled commands when using embedded server
      sql/sql_prepare.cc:
        Fix to embedded server to be able to run tests on it
      mysql-test/r/ctype_cp932_notembedded.result:
        New BitKeeper file ``mysql-test/r/ctype_cp932_notembedded.result''
      mysql-test/r/innodb_notembedded.result:
        New BitKeeper file ``mysql-test/r/innodb_notembedded.result''
      mysql-test/r/sp.result.orig:
        New BitKeeper file ``mysql-test/r/sp.result.orig''
      mysql-test/r/sp_notembedded.result:
        New BitKeeper file ``mysql-test/r/sp_notembedded.result''
      mysql-test/r/subselect_notembedded.result:
        New BitKeeper file ``mysql-test/r/subselect_notembedded.result''
      mysql-test/t/ctype_cp932_notembedded.test:
        New BitKeeper file ``mysql-test/t/ctype_cp932_notembedded.test''
      mysql-test/t/innodb_notembedded.test:
        New BitKeeper file ``mysql-test/t/innodb_notembedded.test''
      mysql-test/t/sp.test.orig:
        New BitKeeper file ``mysql-test/t/sp.test.orig''
      mysql-test/t/sp_notembedded.test:
        New BitKeeper file ``mysql-test/t/sp_notembedded.test''
      mysql-test/t/subselect_notembedded.test:
        New BitKeeper file ``mysql-test/t/subselect_notembedded.test''
      988f0be6
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 9c602570
      unknown authored
      into moonbone.local:/work/17530-bug-5.0-mysql
      
      9c602570
    • unknown's avatar
      Fix mysqldump.test to work with non-standard --vardir. · b50e1505
      unknown authored
      (Backported from mysql-5.1-new)
      
      
      mysql-test/t/mysqldump.test:
        Fix mysqldump.test to work with non-standard --vardir.
      b50e1505
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 23ef92c8
      unknown authored
      into moonbone.local:/work/17530-bug-5.0-mysql
      
      23ef92c8
  7. 23 Feb, 2006 9 commits
    • unknown's avatar
      After-merge fixes (Bug#13134) · 9843f192
      unknown authored
      9843f192
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 340632ab
      unknown authored
      into  mysql.com:/opt/local/work/mysql-5.0-runtime
      
      340632ab
    • unknown's avatar
      Merge mysql.com:/opt/local/work/mysql-4.1-13134 · c5b1fab8
      unknown authored
      into  mysql.com:/opt/local/work/mysql-5.0-runtime
      
      
      mysql-test/t/heap.test:
        Auto merged
      mysql-test/r/heap.result:
        Manual merge (use local)
      mysql-test/r/ps.result:
        Manual merge (use local)
      mysql-test/t/ps.test:
        Manual merge.
      sql/field.cc:
        Manual merge.
      sql/field.h:
        Manual merge.
      sql/sql_parse.cc:
        Manual merge.
      sql/sql_table.cc:
        Manual merge.
      c5b1fab8
    • unknown's avatar
      Remove 'delayed' to make the test deterministic (already · ac90a3e3
      unknown authored
      fixed in 5.0).
      A post-review fix (Bug#13134)
      
      
      mysql-test/r/heap.result:
        Remove 'delayed' to make the test deterministic.
      mysql-test/r/ps.result:
        Remove an unneeded drop table (test case for Bug#13134)
      mysql-test/t/heap.test:
        Remove 'delayed' to make the test deterministic.
      mysql-test/t/ps.test:
        A post-review fix (Bug#13134)
      ac90a3e3
    • unknown's avatar
      mysqltest.c: · d1e33323
      unknown authored
        Rearrange out of order options in option struct.
      
      
      client/mysqltest.c:
        Rearrange out of order options in option struct.
      d1e33323
    • unknown's avatar
      Merge paul@bk-internal.mysql.com:/home/bk/mysql-5.0 · f7e2d6a4
      unknown authored
      into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-5.0
      
      f7e2d6a4
    • unknown's avatar
      mysqld.cc: · fded06a0
      unknown authored
        Fix out of order entries in option struct.
      
      
      sql/mysqld.cc:
        Fix out of order entries in option struct.
      fded06a0
    • unknown's avatar
      Change snprintf to my_snprintf · b9feb8c6
      unknown authored
      
      client/mysqldump.c:
        snprintf =>  my_snprintf
      b9feb8c6
    • unknown's avatar
      Cleanup. · 86f1f1bc
      unknown authored
      
      sql/sql_base.cc:
        Cleanup, remove a warning.
      sql/sql_select.h:
        Cleanup: remove a warning.
      86f1f1bc