Commit 08e23eb6 authored by unknown's avatar unknown
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0

into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0


BitKeeper/etc/logging_ok:
  auto-union
sql/item.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
parents 7ec1e170 dd230683
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ Greg@greg-laptop.
Miguel@light.local
Sinisa@sinisa.nasamreza.org
WAX@sergbook.mysql.com
acurtis@ltantony.rdg.cyberkinetica.homeunix.net
acurtis@pcgem.rdg.cyberkinetica.com
administrador@light.hegel.local
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
+25 −24
Original line number Diff line number Diff line
@@ -3047,7 +3047,10 @@ logs_empty_and_mark_files_at_shutdown(void)

	mutex_enter(&kernel_mutex);

	/* Check that there are no longer transactions */
       /* Check that there are no longer transactions. We need this wait even
        for the 'very fast' shutdown, because the InnoDB layer may have
        committed or prepared transactions and we don't want to lose them. */

	if (trx_n_mysql_transactions > 0
			|| UT_LIST_GET_LEN(trx_sys->trx_list) > 0) {
		
@@ -3056,6 +3059,23 @@ logs_empty_and_mark_files_at_shutdown(void)
		goto loop;
	}

        if (srv_very_fast_shutdown) {
               /* In a 'very fast' shutdown we do not flush the buffer pool:
               it is essentially a 'crash' of the InnoDB server.
                Make sure that the log is all flushed to disk, so that
               we can recover all committed transactions in a crash
               recovery.
               In a 'very fast' shutdown we do not flush the buffer pool:
               it is essentially a 'crash' of the InnoDB server. Then we must
               not write the lsn stamps to the data files, since at a
               startup InnoDB deduces from the stamps if the previous
               shutdown was clean. */

               log_buffer_flush_to_disk();
                return; /* We SKIP ALL THE REST !! */
       }


	/* Check that the master thread is suspended */

	if (srv_n_threads_active[SRV_MASTER] != 0) {
@@ -3092,24 +3112,13 @@ logs_empty_and_mark_files_at_shutdown(void)
	log_archive_all();
#endif /* UNIV_LOG_ARCHIVE */

	if (!srv_very_fast_shutdown) {
		/* In a 'very fast' shutdown we do not flush the buffer pool:
		it is essentially a 'crash' of the InnoDB server. */

		log_make_checkpoint_at(ut_dulint_max, TRUE);
	} else {
		/* Make sure that the log is all flushed to disk, so that
		we can recover all committed transactions in a crash
		recovery */
		log_buffer_flush_to_disk();
	}

	mutex_enter(&(log_sys->mutex));

	lsn = log_sys->lsn;

	if ((ut_dulint_cmp(lsn, log_sys->last_checkpoint_lsn) != 0
	    && !srv_very_fast_shutdown)
       if ((ut_dulint_cmp(lsn, log_sys->last_checkpoint_lsn) != 0)
#ifdef UNIV_LOG_ARCHIVE
	   || (srv_log_archive_on
	       && ut_dulint_cmp(lsn,
@@ -3158,7 +3167,7 @@ logs_empty_and_mark_files_at_shutdown(void)
	completely flushed to disk! (We do not call fil_write... if the
	'very fast' shutdown is enabled.) */

	if (!srv_very_fast_shutdown && !buf_all_freed()) {
       if (!buf_all_freed()) {

		goto loop;
	}
@@ -3181,7 +3190,7 @@ logs_empty_and_mark_files_at_shutdown(void)

	/* Make some checks that the server really is quiet */
	ut_a(srv_n_threads_active[SRV_MASTER] == 0);
	ut_a(srv_very_fast_shutdown || buf_all_freed());
       ut_a(buf_all_freed());
	ut_a(0 == ut_dulint_cmp(lsn, log_sys->lsn));

	if (ut_dulint_cmp(lsn, srv_start_lsn) < 0) {
@@ -3196,15 +3205,7 @@ logs_empty_and_mark_files_at_shutdown(void)

	srv_shutdown_lsn = lsn;

	if (!srv_very_fast_shutdown) {
		/* In a 'very fast' shutdown we do not flush the buffer pool:
		it is essentially a 'crash' of the InnoDB server. Then we must
		not write the lsn stamps to the data files, since at a
		startup InnoDB deduces from the stamps if the previous
		shutdown was clean. */

		fil_write_flushed_lsn_to_data_files(lsn, arch_log_no);
	}

	fil_flush_file_spaces(FIL_TABLESPACE);

@@ -3212,7 +3213,7 @@ logs_empty_and_mark_files_at_shutdown(void)

	/* Make some checks that the server really is quiet */
	ut_a(srv_n_threads_active[SRV_MASTER] == 0);
	ut_a(srv_very_fast_shutdown || buf_all_freed());
       ut_a(buf_all_freed());
	ut_a(0 == ut_dulint_cmp(lsn, log_sys->lsn));
}

+7 −0
Original line number Diff line number Diff line
@@ -1740,6 +1740,13 @@ innobase_shutdown_for_mysql(void)

	srv_shutdown_state = SRV_SHUTDOWN_EXIT_THREADS;

        /* In a 'very fast' shutdown, we do not need to wait for these threads
        to die; all which counts is that we flushed the log; a 'very fast'
        shutdown is essentially a crash. */

        if (srv_fast_shutdown)
          return((int) DB_SUCCESS);

	/* All threads end up waiting for certain events. Put those events
	to the signaled state. Then the threads will exit themselves in
	os_thread_event_wait(). */
+2 −2
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ select parameter_style, sql_data_access, dtd_identifier
from information_schema.routines;
parameter_style	sql_data_access	dtd_identifier
SQL	CONTAINS SQL	NULL
SQL	CONTAINS SQL	int
SQL	CONTAINS SQL	int(11)
show procedure status;
Db	Name	Type	Definer	Modified	Created	Security_type	Comment
test	sel2	PROCEDURE	root@localhost	#	#	DEFINER	
@@ -258,7 +258,7 @@ Function sql_mode Create Function
sub1		
show create function sub2;
Function	sql_mode	Create Function
sub2		CREATE FUNCTION `test`.`sub2`(i int) RETURNS int
sub2		CREATE FUNCTION `test`.`sub2`(i int) RETURNS int(11)
return i+1
drop function sub2;
show create procedure sel2;
+26 −4
Original line number Diff line number Diff line
@@ -962,7 +962,7 @@ comment 'Characteristics procedure test'
  return 42|
show create function chistics|
Function	sql_mode	Create Function
chistics		CREATE FUNCTION `test`.`chistics`() RETURNS int
chistics		CREATE FUNCTION `test`.`chistics`() RETURNS int(11)
    DETERMINISTIC
    SQL SECURITY INVOKER
    COMMENT 'Characteristics procedure test'
@@ -975,7 +975,7 @@ no sql
comment 'Characteristics function test'|
show create function chistics|
Function	sql_mode	Create Function
chistics		CREATE FUNCTION `test`.`chistics`() RETURNS int
chistics		CREATE FUNCTION `test`.`chistics`() RETURNS int(11)
    NO SQL
    DETERMINISTIC
    SQL SECURITY INVOKER
@@ -2026,11 +2026,11 @@ bug2564_2 ANSI_QUOTES CREATE PROCEDURE "test"."bug2564_2"()
insert into "t1" values ('foo', 1)
show create function bug2564_3|
Function	sql_mode	Create Function
bug2564_3		CREATE FUNCTION `test`.`bug2564_3`(x int, y int) RETURNS int
bug2564_3		CREATE FUNCTION `test`.`bug2564_3`(x int, y int) RETURNS int(11)
return x || y
show create function bug2564_4|
Function	sql_mode	Create Function
bug2564_4	REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI	CREATE FUNCTION "test"."bug2564_4"(x int, y int) RETURNS int
bug2564_4	REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI	CREATE FUNCTION "test"."bug2564_4"(x int, y int) RETURNS int(11)
return x || y
drop procedure bug2564_1|
drop procedure bug2564_2|
@@ -2095,6 +2095,28 @@ drop procedure bug4579_1|
drop procedure bug4579_2|
drop table t3|
drop table if exists t3|
drop procedure if exists bug2773|
create function bug2773() returns int return null|
create table t3 as select bug2773()|
show create table t3|
Table	Create Table
t3	CREATE TABLE `t3` (
  `bug2773()` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t3|
drop function bug2773|
drop procedure if exists bug3788|
create function bug3788() returns date return cast("2005-03-04" as date)|
select bug3788()|
bug3788()
2005-03-04
drop function bug3788|
create function bug3788() returns binary(5) return 5|
select bug3788()|
bug3788()
5
drop function bug3788|
drop table if exists t3|
create table t3 (f1 int, f2 int, f3 int)|
insert into t3 values (1,1,1)|
drop procedure if exists bug4726|
Loading