Commit 194d6875 authored by Joerg Bruehe's avatar Joerg Bruehe
Browse files

Merge from main 5.0 branch -> 5.0-build

Merge conflicts in test "create:
- for "create.result", handled correctly by "bzr extmerge" (using "kdiff3"),
- for "create.test", not reported as a conflict, but merged wrong
  (new block at the test end got duplicated), fixed manually.

Test on Linux (Debian, PowerPC) was ok.
parents 55abed4a 0b38c93d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1836,7 +1836,13 @@ static uint get_table_structure(char *table, char *db, char *table_type,
              fprintf(sql_file, ",\n  %s %s",
                      quote_name(row[0], name_buff, 0), row[1]);
            }
            fprintf(sql_file, "\n) */;\n");
            /*
              Stand-in tables are always MyISAM tables as the default
              engine might have a column-limit that's lower than the
              number of columns in the view, and MyISAM support is
              guaranteed to be in the server anyway.
            */
            fprintf(sql_file, "\n) ENGINE=MyISAM */;\n");
            check_io(sql_file);
          }
        }
+19 −15
Original line number Diff line number Diff line
@@ -504,46 +504,50 @@ then
fi
AC_SUBST(ICHECK)

# Lock for PS
# Look for PS usage.  We use double dollar-signs in FIND_PROC because this
# value is written to a makefile, which interprets away one level of
# dollar-signs.  So, interpretation stages are  m4 and then shell in autoconf,
# then Make, then shell.  The autoconf substitution uses single quotes, so 
# no unprotected single quotes should appear in the expression.
AC_PATH_PROG(PS, ps, ps)
AC_MSG_CHECKING("how to check if pid exists")
PS=$ac_cv_path_PS
# Linux style
if $PS p $$ 2> /dev/null | grep `echo $0 | sed s/\-//` > /dev/null
if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null
then
  FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
  FIND_PROC="$PS wwwp \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
# Solaris
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
elif $PS -fp $$ 2> /dev/null | grep -- $0 > /dev/null
then
  FIND_PROC="$PS -p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
  FIND_PROC="$PS -p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
# BSD style
elif $PS -uaxww 2> /dev/null | grep $0 > /dev/null
elif $PS -uaxww 2> /dev/null | grep -- $0 > /dev/null
then
  FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
  FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
# SysV style
elif $PS -ef 2> /dev/null | grep $0 > /dev/null
elif $PS -ef 2> /dev/null | grep -- $0 > /dev/null
then
  FIND_PROC="$PS -ef | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
  FIND_PROC="$PS -ef | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
# Do anybody use this?
elif $PS $$ 2> /dev/null | grep $0 > /dev/null
elif $PS $$ 2> /dev/null | grep -- $0 > /dev/null
then
  FIND_PROC="$PS \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
  FIND_PROC="$PS \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
else
  case $SYSTEM_TYPE in
    *freebsd*|*dragonfly*)
      FIND_PROC="$PS p \$\$PID | grep -v grep | grep \$\$MYSQLD > /dev/null"
      FIND_PROC="$PS p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
      ;;
    *darwin*)
      FIND_PROC="$PS -uaxww | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
      FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
      ;;
    *cygwin*)
      FIND_PROC="$PS -e | grep -v grep | grep \$\$MYSQLD | grep \" \$\$PID \" > /dev/null"
      FIND_PROC="$PS -e | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
      ;;
    *netware*)
      FIND_PROC=
      ;;
    *)
      AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.])
      AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this?  See the Installation chapter in the Reference Manual.])
  esac
fi
AC_SUBST(FIND_PROC)
+2 −1
Original line number Diff line number Diff line
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults $ndb_restore_opts -b $the_backup_id -n 1 $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id $ndb_restore_filter > $MYSQLTEST_VARDIR/tmp/tmp.dat
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults $ndb_restore_opts -b $the_backup_id -n 2 $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id $ndb_restore_filter >> $MYSQLTEST_VARDIR/tmp/tmp.dat
--exec sort $MYSQLTEST_VARDIR/tmp/tmp.dat
--exec rm -f $MYSQLTEST_VARDIR/tmp/tmp.dat
--error 0,1
--remove_file $MYSQLTEST_VARDIR/tmp/tmp.dat
--let ndb_restore_opts=
--let ndb_restore_filter=
+10 −1
Original line number Diff line number Diff line
@@ -3505,8 +3505,17 @@ sub run_testcase ($) {
  {
    mtr_timer_stop_all($glob_timers);
    mtr_report("\nServers started, exiting");
    if ($glob_win32_perl)
    {
      #ActiveState perl hangs  when using normal exit, use  POSIX::_exit instead
      use POSIX qw[ _exit ]; 
      POSIX::_exit(0);
    }
    else
    {
      exit(0);
    }
  }

  {
    do_before_run_mysqltest($tinfo);
+31 −0
Original line number Diff line number Diff line
@@ -582,4 +582,35 @@ master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4
master-bin.000001	98	Query	1	219	use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
master-bin.000001	219	Query	1	343	use `test`; insert into t1 values (9999999999999999,14632475938453979136)
master-bin.000001	343	Query	1	419	use `test`; drop table t1
CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE bug39182;
CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE PROCEDURE p1()
BEGIN
DECLARE s1 VARCHAR(255);
SET s1= "test";
CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
SELECT 
COLLATION(NAME_CONST('s1', _utf8'test')) c1,
COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
COLLATION(s1) c3,
COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
COERCIBILITY(s1) d3;
DROP TEMPORARY TABLE tmp1;
END//
CALL p1();
c1	c2	c3	d1	d2	d3
utf8_general_ci	utf8_unicode_ci	utf8_unicode_ci	2	2	2
SHOW BINLOG EVENTS FROM 1285;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	1285	Query	1	1483	use `bug39182`; CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%",  NAME_CONST('s1',_utf8'test' COLLATE 'utf8_unicode_ci'), "%")
master-bin.000001	1483	Query	1	1575	use `bug39182`; DROP TEMPORARY TABLE tmp1
DROP PROCEDURE p1;
DROP TABLE t1;
DROP DATABASE bug39182;
USE test;
End of 5.0 tests
Loading