Commit 328bc657 authored by unknown's avatar unknown
Browse files

Merge bk@192.168.21.1:mysql-4.1

into mysql.com:/home/hf/work/mysql-4.1.clean

parents d7d88e59 ddd9fbac
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -310,10 +310,11 @@ case $SYSTEM_TYPE in
        fi
        ;;
      *)
        # Just to be safe, we test for ".so" anyway
	eval shrexts=\"$shrext_cmds\"
        if test \( -f "$mysql_zlib_dir/lib/libz.a"  -o -f "$mysql_zlib_dir/lib/libz.so" -o \
                   -f "$mysql_zlib_dir/lib/libz$shrexts" \) \
        # Test for libz using all known library file endings
        if test \( -f "$mysql_zlib_dir/lib/libz.a"  -o \
                   -f "$mysql_zlib_dir/lib/libz.so" -o \
                   -f "$mysql_zlib_dir/lib/libz.sl" -o \
                   -f "$mysql_zlib_dir/lib/libz.dylib" \) \
                -a -f "$mysql_zlib_dir/include/zlib.h"; then
          ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
          ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
@@ -968,7 +969,6 @@ AC_DEFUN([MYSQL_CHECK_VIO], [
AC_DEFUN([MYSQL_FIND_OPENSSL], [
  incs="$1"
  libs="$2"
  eval shrexts=\"$shrext_cmds\"
  case "$incs---$libs" in
    ---)
      for d in /usr/ssl/include /usr/local/ssl/include /usr/include \
@@ -982,8 +982,9 @@ AC_DEFUN([MYSQL_FIND_OPENSSL], [
      for d in /usr/ssl/lib /usr/local/ssl/lib /usr/lib/openssl \
/usr/lib /usr/lib64 /opt/ssl/lib /opt/openssl/lib \
/usr/freeware/lib32 /usr/local/lib/ ; do
      # Just to be safe, we test for ".so" anyway
      if test -f $d/libssl.a || test -f $d/libssl.so || test -f $d/libssl$shrexts ; then
      # Test for libssl using all known library file endings
      if test -f $d/libssl.a || test -f $d/libssl.so || \
         test -f $d/libssl.sl || test -f $d/libssl.dylib ; then
        OPENSSL_LIB=$d
      fi
      done
@@ -995,8 +996,9 @@ AC_DEFUN([MYSQL_FIND_OPENSSL], [
      if test -f $incs/openssl/ssl.h  ; then
        OPENSSL_INCLUDE=-I$incs
      fi
      # Just to be safe, we test for ".so" anyway
      if test -f $libs/libssl.a || test -f $libs/libssl.so || test -f "$libs/libssl$shrexts" ; then
      # Test for libssl using all known library file endings
      if test -f $libs/libssl.a || test -f $libs/libssl.so || \
         test -f $libs/libssl.sl || test -f $d/libssl.dylib ; then
        OPENSSL_LIB=$libs
      fi
      ;;
+4 −2
Original line number Diff line number Diff line
@@ -329,12 +329,14 @@ int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
  we want to make sure that no such flags are set.
*/
#if defined(HAVE_SIGACTION) && !defined(my_sigset)
#define my_sigset(A,B) do { struct sigaction s; sigset_t set;              \
#define my_sigset(A,B) do { struct sigaction s; sigset_t set; int rc;      \
                            DBUG_ASSERT((A) != 0);                         \
                            sigemptyset(&set);                             \
                            s.sa_handler = (B);                            \
                            s.sa_mask    = set;                            \
                            s.sa_flags   = 0;                              \
                            sigaction((A), &s, (struct sigaction *) NULL); \
                            rc= sigaction((A), &s, (struct sigaction *) NULL);\
                            DBUG_ASSERT(rc == 0);                          \
                          } while (0)
#elif defined(HAVE_SIGSET) && !defined(my_sigset)
#define my_sigset(A,B) sigset((A),(B))
+38 −25
Original line number Diff line number Diff line
@@ -3613,6 +3613,37 @@ os_aio_posix_handle(
}
#endif

/**************************************************************************
Do a 'last millisecond' check that the page end is sensible;
reported page checksum errors from Linux seem to wipe over the page end. */
static
void
os_file_check_page_trailers(
/*========================*/
	byte*	combined_buf,	/* in: combined write buffer */
	ulint	total_len)	/* in: size of combined_buf, in bytes
				(a multiple of UNIV_PAGE_SIZE) */
{
	ulint	len;

	for (len = 0; len + UNIV_PAGE_SIZE <= total_len;
			len += UNIV_PAGE_SIZE) {
		byte*	buf = combined_buf + len;

		if (memcmp(buf + (FIL_PAGE_LSN + 4), buf + (UNIV_PAGE_SIZE
				- FIL_PAGE_END_LSN_OLD_CHKSUM + 4), 4)) {
		    	ut_print_timestamp(stderr);
		    	fprintf(stderr,
"  InnoDB: ERROR: The page to be written seems corrupt!\n"
"InnoDB: Writing a block of %lu bytes, currently at offset %lu\n",
			(ulong)total_len, (ulong)len);
			buf_page_print(buf);
		    	fprintf(stderr,
"InnoDB: ERROR: The page to be written seems corrupt!\n");
		}
	}
}

/**************************************************************************
Does simulated aio. This function should be called by an i/o-handler
thread. */
@@ -3650,7 +3681,6 @@ os_aio_simulated_handle(
	ibool		ret;
	ulint		n;
	ulint		i;
	ulint		len2;
	
	segment = os_aio_get_array_and_local_segment(&array, global_segment);
	
@@ -3858,32 +3888,15 @@ os_aio_simulated_handle(
				ut_error;
			}

			/* Do a 'last millisecond' check that the page end
			is sensible; reported page checksum errors from
			Linux seem to wipe over the page end */

			for (len2 = 0; len2 + UNIV_PAGE_SIZE <= total_len;
						len2 += UNIV_PAGE_SIZE) {
				if (mach_read_from_4(combined_buf + len2
						+ FIL_PAGE_LSN + 4)
				    != mach_read_from_4(combined_buf + len2
				    		+ UNIV_PAGE_SIZE
				    	- FIL_PAGE_END_LSN_OLD_CHKSUM + 4)) {
				    	ut_print_timestamp(stderr);
				    	fprintf(stderr,
"  InnoDB: ERROR: The page to be written seems corrupt!\n");
				    	fprintf(stderr,
"InnoDB: Writing a block of %lu bytes, currently writing at offset %lu\n",
					(ulong)total_len, (ulong)len2);
					buf_page_print(combined_buf + len2);
				    	fprintf(stderr,
"InnoDB: ERROR: The page to be written seems corrupt!\n");
				}
			}
			os_file_check_page_trailers(combined_buf, total_len);
		}

		ret = os_file_write(slot->name, slot->file, combined_buf,
				slot->offset, slot->offset_high, total_len);

		if (array == os_aio_write_array) {
			os_file_check_page_trailers(combined_buf, total_len);
		}
	} else {
		ret = os_file_read(slot->file, combined_buf,
				slot->offset, slot->offset_high, total_len);
+45 −0
Original line number Diff line number Diff line
drop table if exists t1, t2;
create table t1 (a int key) engine=ndbcluster;
begin;
insert into t1 values (1);
insert into t1 values (2);
ERROR HY000: Got temporary error 4025 'Node failure caused abort of transaction' from ndbcluster
commit;
ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
drop table t1;
create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster;
insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1);
select * from t2 order by a limit 3;
a	b
1	1
2	1
3	1
create table t2 (a int key) engine=ndbcluster;
insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
select * from t2 order by a limit 3;
a
1
2
3
select * from t2 order by a limit 3;
ERROR HY000: Can't lock file (errno: 241)
select * from t2 order by a limit 3;
a
1
2
3
show tables;
Tables_in_test
create table t2 (a int key) engine=ndbcluster;
insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
select * from t2 order by a limit 3;
a
1
2
3
select * from t2 order by a limit 3;
a
1
2
3
drop table t2;
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ select HEX(f) from t4;
#14157: utf8 encoding in binlog without set character_set_client
#
flush logs;
--exec $MYSQL --character-sets-dir=../sql/share/charsets/ --default-character-set=koi8r test -e 'create table if not exists t5 (a int); set names koi8r; create temporary table `    ` (a int); insert into `    ` values (1); insert into t5 select * from `    `'
--exec $MYSQL --character-sets-dir=../sql/share/charsets/ --default-character-set=koi8r test -e 'create table if not exists t5 (a int); set names koi8r; create temporary table `` (a int); insert into `` values (1); insert into t5 select * from ``'

# resulted log is client charset insensitive (latin1 not koi8r) as it must be
--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000006 | $MYSQL --default-character-set=latin1
Loading