1. 03 Apr, 2007 1 commit
    • unknown's avatar
      Fix for BUG#27337: Privileges are not properly restored. · 7e08016a
      unknown authored
      The problem was that THD::db_access variable was not restored after
      database switch in stored-routine-execution code.
      
      The fix is to restore THD::db_access in this case.
      
      Unfortunately, this fix requires additional changes,
      because in prepare_schema_table(), called on the parsing stage, we checked
      privileges. That was wrong according to our design, but this flaw haven't
      struck so far, because it was masked. All privilege checkings must be
      done on the execution stage in order to be compatible with prepared statements
      and stored routines. So, this patch also contains patch for
      prepare_schema_table(), which moves the checkings to the execution phase.
      
      
      mysql-test/r/grant.result:
        Updated result file.
      mysql-test/t/grant.test:
        Added test case for BUG#27337.
      sql/mysql_priv.h:
        Added function declaration.
      sql/sql_db.cc:
        Fix for BUG#27337 -- set THD::db_access even if we're called
        from stored-routine-execution code.
      sql/sql_parse.cc:
        Split prepare_schema_table() into two functions:
          - prepare_schema_table(), which is called from the parser (parsing stage);
          - check_show_access(), which is called on the execution stage.
      sql/sql_show.cc:
        Ignore schema_select_lex member if its table is NULL.
      7e08016a
  2. 29 Mar, 2007 4 commits
  3. 28 Mar, 2007 2 commits
    • unknown's avatar
      configure.in: · 406fd12a
      unknown authored
        Don't install ndb man pages if no ndb configured
      config-win.h, CMakeLists.txt, README, configure.js:
        Removed Cybozu patches
      
      
      configure.in:
        Don't install ndb man pages if no ndb configured
      CMakeLists.txt:
        Removed Cybozu patches
      include/config-win.h:
        Removed Cybozu patches
      win/README:
        Removed Cybozu patches
      win/configure.js:
        Removed Cybozu patches
      406fd12a
    • unknown's avatar
      Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1-main · 00aaa9a3
      unknown authored
      into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
      
      
      BitKeeper/deleted/.del-_dynrec.c~48dd758f5a5450df:
        Auto merged
      BitKeeper/deleted/.del-_page.c~148b1a613d052ee8:
        Auto merged
      BitKeeper/deleted/.del-_search.c~f509292aa1ff18ff:
        Auto merged
      BitKeeper/deleted/.del-close.c~fd62629496ee5bcc:
        Auto merged
      BitKeeper/deleted/.del-delete.c~65ee8daaa75a14b6:
        Auto merged
      BitKeeper/deleted/.del-my_tempnam.c~a8562f15dad3012f:
        Auto merged
      BitKeeper/deleted/.del-open.c~95b3b75042fae00a:
        Auto merged
      BitKeeper/deleted/.del-rkey.c~cc54c6498352f999:
        Auto merged
      client/mysql.cc:
        Auto merged
      client/mysqldump.c:
        Auto merged
      include/my_sys.h:
        Auto merged
      include/raid.h:
        Auto merged
      myisam/mi_close.c:
        Auto merged
      BitKeeper/deleted/.del-sort.c~e2e56b5a37ce86f4:
        Auto merged
      BitKeeper/deleted/.del-write.c~8f1918b1f6770e54:
        Auto merged
      myisam/mi_page.c:
        Auto merged
      myisam/myisamchk.c:
        Auto merged
      mysys/default.c:
        Auto merged
      mysys/mf_keycaches.c:
        Auto merged
      mysys/my_dup.c:
        Auto merged
      mysys/my_fopen.c:
        Auto merged
      mysys/my_handler.c:
        Auto merged
      mysys/my_malloc.c:
        Auto merged
      mysys/my_static.c:
        Auto merged
      mysys/my_write.c:
        Auto merged
      mysys/safemalloc.c:
        Auto merged
      mysys/tree.c:
        Auto merged
      mysys/typelib.c:
        Auto merged
      regex/regexec.c:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/sql_repl.cc:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      BitKeeper/deleted/.del-compiler_warnings.supp:
        Delete: support-files/compiler_warnings.supp
      client/mysqlbinlog.cc:
        Manual merge from 4.1.
      client/sql_string.cc:
        Manual merge from 4.1.
      extra/perror.c:
        Manual merge from 4.1.
      heap/_check.c:
        Manual merge from 4.1.
      heap/hp_delete.c:
        Manual merge from 4.1.
      heap/hp_hash.c:
        Manual merge from 4.1.
      heap/hp_open.c:
        Manual merge from 4.1.
      heap/hp_rkey.c:
        Manual merge from 4.1.
      heap/hp_rrnd.c:
        Manual merge from 4.1.
      heap/hp_write.c:
        Manual merge from 4.1.
      libmysql/libmysql.c:
        Manual merge from 4.1.
      libmysqld/libmysqld.c:
        Manual merge from 4.1.
      myisam/mi_delete.c:
        Manual merge from 4.1.
      myisam/mi_dynrec.c:
        Manual merge from 4.1.
      myisam/mi_keycache.c:
        Manual merge from 4.1.
      myisam/mi_statrec.c:
        Manual merge from 4.1.
      myisammrg/myrg_extra.c:
        Manual merge from 4.1.
      mysys/hash.c:
        Manual merge from 4.1.
      mysys/list.c:
        Manual merge from 4.1.
      mysys/mf_iocache.c:
        Manual merge from 4.1.
      mysys/mf_keycache.c:
        Manual merge from 4.1.
      mysys/my_alloc.c:
        Manual merge from 4.1.
      mysys/my_fstream.c:
        Manual merge from 4.1.
      mysys/my_getwd.c:
        Manual merge from 4.1.
      mysys/my_lib.c:
        Manual merge from 4.1.
      mysys/my_lread.c:
        Manual merge from 4.1.
      mysys/my_lwrite.c:
        Manual merge from 4.1.
      mysys/my_pread.c:
        Manual merge from 4.1.
      mysys/my_read.c:
        Manual merge from 4.1.
      mysys/my_realloc.c:
        Manual merge from 4.1.
      mysys/my_seek.c:
        Manual merge from 4.1.
      mysys/raid.cc:
        Manual merge from 4.1.
      mysys/thr_lock.c:
        Manual merge from 4.1.
      ndb/src/mgmclient/CommandInterpreter.cpp:
        Manual merge from 4.1.
      sql/ha_archive.cc:
        Manual merge from 4.1.
      sql/ha_innodb.cc:
        Manual merge from 4.1.
      sql/ha_ndbcluster.cc:
        Manual merge from 4.1.
      sql/item_subselect.cc:
        Manual merge from 4.1.
      sql/log.cc:
        Manual merge from 4.1.
      sql/log_event.cc:
        Manual merge from 4.1.
      sql/mysqld.cc:
        Manual merge from 4.1.
      sql/net_serv.cc:
        Manual merge from 4.1.
      sql/slave.cc:
        Manual merge from 4.1.
      sql/sql_cache.cc:
        Manual merge from 4.1.
      sql/sql_class.cc:
        Manual merge from 4.1.
      sql/sql_delete.cc:
        Manual merge from 4.1.
      sql/sql_parse.cc:
        Manual merge from 4.1.
      sql/sql_prepare.cc:
        Manual merge from 4.1.
      sql-common/client.c:
        Manual merge from 4.1.
      sql/sql_select.cc:
        Manual merge from 4.1.
      sql/sql_table.cc:
        Manual merge from 4.1.
      sql/sql_update.cc:
        Manual merge from 4.1.
      sql/strfunc.cc:
        Manual merge from 4.1.
      sql/table.cc:
        Manual merge from 4.1.
      sql/tztime.cc:
        Manual merge from 4.1.
      sql/unireg.cc:
        Manual merge from 4.1.
      tests/mysql_client_test.c:
        Manual merge from 4.1.
      00aaa9a3
  4. 27 Mar, 2007 4 commits
    • unknown's avatar
      Fix for BUG#25082: default database change on trigger · 6a594ffd
      unknown authored
      execution breaks replication.
      
      When a stored routine is executed, we switch current
      database to the database, in which the routine
      has been created. When the stored routine finishes,
      we switch back to the original database.
      
      The problem was that if the original database does not
      exist (anymore) after routine execution, we raised an error.
      
      The fix is to report a warning, and switch to the NULL database.
      
      
      mysql-test/r/sp.result:
        Updated result file.
      mysql-test/t/sp.test:
        Added test case for BUG#25082.
      sql/mysql_priv.h:
        1. Change mysql_change_db() prototype;
        2. Polishing.
      sql/sp.cc:
        Polishing.
      sql/sp_head.cc:
        Polishing.
      sql/sql_db.cc:
        1. Polishing.
        2. Fix mysql_change_db().
      sql/sql_parse.cc:
        Polishing.
      sql/sql_show.cc:
        Polishing.
      6a594ffd
    • unknown's avatar
      Merge mysql.com:/home/kent/bk/tmp/mysql-4.1-build · ffa3c301
      unknown authored
      into  mysql.com:/home/kent/bk/tmp/mysql-5.0-build
      
      
      Makefile.am:
        Added target for RPM debug mysql-test-run
      ffa3c301
    • unknown's avatar
      Fixes for 4.1 to be as in 5.0 and above. · 454e889f
      unknown authored
      
      client/mysql.cc:
        Fixed to be as in 5.0 and above.
      client/mysqldump.c:
        Fixed to be as in 5.0 and above.
      include/my_sys.h:
        Fixed to be as in 5.0 and above.
      mysys/my_static.c:
        Fixed to be as in 5.0 and above.
      454e889f
    • unknown's avatar
      mysql.spec.sh, Makefile.am: · 0d5a969a
      unknown authored
        Don't use explicit calls to mysql-test-run in spec
      
      
      Makefile.am:
        Don't use explicit calls to mysql-test-run in spec
      support-files/mysql.spec.sh:
        Don't use explicit calls to mysql-test-run in spec
      0d5a969a
  5. 26 Mar, 2007 1 commit
  6. 24 Mar, 2007 9 commits
  7. 23 Mar, 2007 19 commits
    • unknown's avatar
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel · d9a56f91
      unknown authored
      into  sin.intern.azundris.com:/home/tnurnberg/26817/50-26817
      
      
      sql/sql_view.cc:
        Auto merged
      d9a56f91
    • unknown's avatar
      Merge sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.1 · 1e92dcae
      unknown authored
      into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0-build
      
      
      mysys/thr_alarm.c:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      1e92dcae
    • unknown's avatar
      reverted linuxthreads thr_client_alarm fix (not future-proof) · d89329c6
      unknown authored
      fixed differently: wake up select_thread with THR_SERVER_ALARM instead
      
      
      mysys/thr_alarm.c:
        reverted linuxthreads thr_client_alarm fix (not future-proof)
      d89329c6
    • unknown's avatar
      Bug #26817: mysqldump fails to backup database containing view with invalid definer · b765a8af
      unknown authored
      give some leeway on required permissions for SHOW FIELDS on views so
      an unknonwn DEFINER will no longer break mysqldump
      
      
      client/client_priv.h:
        Bug #26817: mysqldump fails to backup database containing view with invalid definer
        
        New option for mysqldump: redirect stderr to file ("2> for Windows")
      client/mysqldump.c:
        Bug #26817: mysqldump fails to backup database containing view with invalid definer
        
        New option for mysqldump: redirect stderr to file ("2> for Windows")
      mysql-test/r/information_schema_db.result:
        Bug #26817: mysqldump fails to backup database containing view with invalid definer
        
        New option for mysqldump: redirect stderr to file ("2> for Windows")
      mysql-test/t/information_schema_db.test:
        Bug #26817: mysqldump fails to backup database containing view with invalid definer
        
        New option for mysqldump: redirect stderr to file ("2> for Windows")
      sql/sql_base.cc:
        Bug #26817: mysqldump fails to backup database containing view with invalid definer
        
        be a little more lenient for SHOW FIELDS FROM
      sql/sql_parse.cc:
        Bug #26817: mysqldump fails to backup database containing view with invalid definer
        
        be a little more lenient for SHOW FIELDS FROM on views on views
      sql/sql_view.cc:
        Bug #26817: mysqldump fails to backup database containing view with invalid definer
        
        give SHOW FIELDS the same perks as SHOW CREATE
      sql/table.cc:
        Bug #26817: mysqldump fails to backup database containing view with invalid definer
        
        give SHOW FIELDS the same perks as SHOW CREATE
      b765a8af
    • unknown's avatar
      Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel · 119087fb
      unknown authored
      into  andrepl.(none):/home/elkin/MySQL/MAIN/5.0-marvel-bug23333_sf_side_eff_binlog
      
      
      119087fb
    • unknown's avatar
      Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel · 10d2528a
      unknown authored
      into  andrepl.(none):/home/elkin/MySQL/MAIN/mysql-5.0-marvel
      
      
      10d2528a
    • unknown's avatar
      Merge sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0-build · 48d4d50c
      unknown authored
      into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0
      
      
      client/mysqlbinlog.cc:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      mysql-test/r/view_grant.result:
        merged
      mysql-test/t/view_grant.test:
        merged
      48d4d50c
    • unknown's avatar
      Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF() · 4a76ac5f
      unknown authored
      thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit was not restored at the end of SF() invocation, where
      SF() modified non-ta table.
      As the result of this artifact it was not possible to detect whether there were any side-effects when
      top-level query ends. 
      If the top level query table was not modified and the bit is lost there would be no binlogging.
      
      Fixed with preserving the bit inside of thd->no_trans_update struct. The struct agregates two bool flags
      telling whether the current query and the current transaction modified any non-ta table.
      The flags stmt, all are dropped at the end of the query and the transaction.
      
      
      mysql-test/r/sp_trans.result:
        results will be changed once again after bug#23333 will be fixed.
      mysql-test/t/sp_trans.test:
        regression test added
      sql/ha_ndbcluster.cc:
        replacing thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit and bool thd->no_trans_update
        with thd->no_trans_update as struct
      sql/handler.cc:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      sql/log.cc:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      sql/set_var.cc:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      sql/sp_head.cc:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      sql/sql_class.h:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      sql/sql_delete.cc:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      sql/sql_insert.cc:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      sql/sql_load.cc:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      sql/sql_parse.cc:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      sql/sql_table.cc:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      sql/sql_update.cc:
        replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
        with the member thd->no_trans_update.all;
        converting thd->no_trans_update into struct of bools.
      4a76ac5f
    • unknown's avatar
      Merge sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.1 · c62c0d9d
      unknown authored
      into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0-build
      
      
      mysys/thr_alarm.c:
        Auto merged
      sql/mysqld.cc:
        SCCS merged
      c62c0d9d
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0 · 29bf3ad4
      unknown authored
      into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0-build
      
      
      29bf3ad4
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-marvel · ddb23beb
      unknown authored
      into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0
      
      
      client/mysqlbinlog.cc:
        Auto merged
      ddb23beb
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-4.1-build · cc72a835
      unknown authored
      into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.1
      
      
      cc72a835
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · 9a4b2e90
      unknown authored
      into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.1
      
      
      mysys/thr_alarm.c:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      9a4b2e90
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · c80ac29e
      unknown authored
      into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.1
      
      
      sql/mysqld.cc:
        merged
      c80ac29e
    • unknown's avatar
      move thr_client_alarm initialization to mysqld.cc · 6e1f446a
      unknown authored
      (in thr_alarm.cc it happened too late).
      
      
      mysys/thr_alarm.c:
        move thr_client_alarm initialization to mysqld.cc
        (here it happened too late)
      sql/mysqld.cc:
        move thr_client_alarm initialization to mysqld.cc
        (in thr_alarm.cc it happened too late).
        moved thr_kill_signal initialization to init_signals()
      6e1f446a
    • unknown's avatar
      Fix for BUG#9504: Stored procedures: execute privilege doesn't · bd49d8de
      unknown authored
      make 'use database' okay.
      
      The problem was that we didn't check stored-routine privileges
      in check_grant_db().
      
      The patch adds this check.
      
      
      mysql-test/r/grant.result:
        Update result file.
      mysql-test/r/sp-security.result:
        Update result fil.
      mysql-test/t/grant.test:
        Added test case for BUG#9504.
      mysql-test/t/sp-security.test:
        Update test.
      sql/sql_acl.cc:
        Check stored routines privileges.
      bd49d8de
    • unknown's avatar
      Merge trift2.:/MySQL/M50/clone-5.0 · 8e1d4f72
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      
      sql/sql_class.cc:
        Auto merged
      8e1d4f72
    • unknown's avatar
      Merge trift2.:/MySQL/M50/mysql-5.0 · b2bbfcee
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      b2bbfcee