Commit bf6b46bb authored by unknown's avatar unknown
Browse files

Merge mysql.com:/home/mydev/mysql-5.0

into mysql.com:/home/mydev/mysql-5.0-5000


sql/set_var.cc:
  Auto merged
parents 01e84598 147640b8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -259,6 +259,8 @@ extern char wild_many,wild_one,wild_prefix;
extern const char *charsets_dir;
extern char *defaults_extra_file;

extern my_bool timed_mutexes;

typedef struct wild_file_pack	/* Struct to hold info when selecting files */
{
  uint		wilds;		/* How many wildcards */
+30 −0
Original line number Diff line number Diff line
#################### include/testdb_only.inc ######################
#                                                                 #
# We must prevent to work on databases created by customers,      #
# because we DROP/CREATE/MODIFY objects with sometimes common     #
# names like STAFF, EMPLOYEE etc.                                 #
#                                                                 #
# Therefore we check the environment variable USE_RUNNING_SERVER. #
# USE_RUNNING_SERVER is exported by "mysql-test-run" and could    #
# contain the following values:                                   #
# 0  -- mysql-test-run was started without the --extern option    #
#       That means the test will be performed within the test     #
#       area 'mysql-test/var/...' .                               #
# 1  -- mysql-test-run was started with the --extern option       #
#       That means the test will be performed by an already       #
#       running server and data modifications will most probably  #
#       outside of the common test area 'mysql-test/var/...' .    #
#                                                                 #
# If USE_RUNNING_SERVER is not 0 the test will be skipped.        #
#                                                                 #
###################################################################

--disable_query_log
eval set @USE_RUNNING_SERVER= '$USE_RUNNING_SERVER';
--require r/testdb_only.require
SELECT 'use extern server'
         AS "Variable_name    ",
         IF(@USE_RUNNING_SERVER= '1','YES',
            IF(@USE_RUNNING_SERVER= '0','NO','UNEXPECTED'))
         AS "Value" ;
--enable_query_log
+20 −17
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ EXTRA_MASTER_OPT=""
EXTRA_MYSQL_TEST_OPT=""
EXTRA_MYSQLDUMP_OPT=""
EXTRA_MYSQLBINLOG_OPT=""
USE_RUNNING_SERVER=""
USE_RUNNING_SERVER=0
USE_NDBCLUSTER=""
USE_RUNNING_NDBCLUSTER=""
DO_GCOV=""
@@ -255,7 +255,7 @@ NDBD_EXTRA_OPTS=
while test $# -gt 0; do
  case "$1" in
    --embedded-server) USE_EMBEDDED_SERVER=1 USE_MANAGER=0 NO_SLAVE=1 ; \
      USE_RUNNING_SERVER="" RESULT_EXT=".es" TEST_MODE="embedded" ;;
      USE_RUNNING_SERVER=0 RESULT_EXT=".es" TEST_MODE="embedded" ;;
    --user=*) DBUSER=`$ECHO "$1" | $SED -e "s;--user=;;"` ;;
    --force)  FORCE=1 ;;
    --timer)  USE_TIMER=1 ;;
@@ -265,8 +265,8 @@ while test $# -gt 0; do
      MASTER_MYSQLD=`$ECHO "$1" | $SED -e "s;--master-binary=;;"` ;;
    --slave-binary=*)
      SLAVE_MYSQLD=`$ECHO "$1" | $SED -e "s;--slave-binary=;;"` ;;
    --local)   USE_RUNNING_SERVER="" ;;
    --extern)  USE_RUNNING_SERVER="1" ;;
    --local)   USE_RUNNING_SERVER=0 ;;
    --extern)  USE_RUNNING_SERVER=1 ;;
    --with-ndbcluster)
      USE_NDBCLUSTER="--ndbcluster" ;;
    --ndb-connectstring=*)
@@ -303,7 +303,7 @@ while test $# -gt 0; do
    --no-manager | --skip-manager) USE_MANAGER=0 ;;
    --manager)
     USE_MANAGER=1
     USE_RUNNING_SERVER=
     USE_RUNNING_SERVER=0
     ;;
    --start-and-exit)
     START_AND_EXIT=1
@@ -372,7 +372,7 @@ while test $# -gt 0; do
      EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb"
      # This needs to be checked properly
      # USE_MANAGER=1
      USE_RUNNING_SERVER=""
      USE_RUNNING_SERVER=0
      ;;
    --client-gdb )
      if [ x$BINARY_DIST = x1 ] ; then
@@ -385,7 +385,7 @@ while test $# -gt 0; do
    --manual-gdb )
      DO_GDB=1
      MANUAL_GDB=1
      USE_RUNNING_SERVER=""
      USE_RUNNING_SERVER=0
      EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --gdb"
      EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb"
      ;;
@@ -394,7 +394,7 @@ while test $# -gt 0; do
	$ECHO "Note: you will get more meaningful output on a source distribution compiled with debugging option when running tests with --ddd option"
      fi
      DO_DDD=1
      USE_RUNNING_SERVER=""
      USE_RUNNING_SERVER=0
      EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --gdb"
      EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb"
      ;;
@@ -412,7 +412,7 @@ while test $# -gt 0; do
      EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb"
      SLEEP_TIME_AFTER_RESTART=10
      SLEEP_TIME_FOR_DELETE=60
      USE_RUNNING_SERVER=""
      USE_RUNNING_SERVER=0
      if test "$1" = "--valgrind-all"
      then
        VALGRIND="$VALGRIND -v --show-reachable=yes"
@@ -627,9 +627,9 @@ fi

if [ -z "$1" ]
then
   USE_RUNNING_SERVER=""
   USE_RUNNING_SERVER=0
fi
if [ -n "$USE_RUNNING_SERVER" ]
if [ $USE_RUNNING_SERVER -eq 1 ]
then
   MASTER_MYSOCK=$LOCAL_SOCKET;
   DBUSER=${DBUSER:-test}
@@ -801,7 +801,7 @@ report_stats () {
        $ECHO "http://www.mysql.com/doc/en/MySQL_test_suite.html"
    fi

    if test -z "$USE_RUNNING_SERVER"
    if [ $USE_RUNNING_SERVER -eq 0 ]
    then

    # Report if there was any fatal warnings/errors in the log files
@@ -1511,7 +1511,7 @@ run_testcase ()
   done
 fi

 if [ -z "$USE_RUNNING_SERVER" ] ;
 if [ $USE_RUNNING_SERVER -eq 0 ] ;
 then
   if [ -f $master_opt_file ] ;
   then
@@ -1655,7 +1655,7 @@ run_testcase ()
	if [ x$FORCE != x1 ] ; then
	 $ECHO "Aborting: $tname failed in $TEST_MODE mode. To continue, re-run with '--force'."
	 $ECHO
         if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && \
         if [ -z "$DO_GDB" ] && [ $USE_RUNNING_SERVER -eq 0 ] && \
	    [ -z "$DO_DDD" ] && [ -z "$USE_EMBEDDED_SERVER" ]
	 then
	   mysql_stop
@@ -1664,7 +1664,7 @@ run_testcase ()
	 exit 1
	fi
	FAILED_CASES="$FAILED_CASES $tname"
        if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && \
        if [ -z "$DO_GDB" ] && [ $USE_RUNNING_SERVER -eq 0 ] && \
	   [ -z "$DO_DDD" ] && [ -z "$USE_EMBEDDED_SERVER" ]
	then
	  mysql_restart
@@ -1683,7 +1683,7 @@ run_testcase ()
[ "$DO_GCOV" ] && gcov_prepare
[ "$DO_GPROF" ] && gprof_prepare

if [ -z "$USE_RUNNING_SERVER" ]
if [ $USE_RUNNING_SERVER -eq 0 ]
then
  if [ -z "$FAST_START" ]
  then
@@ -1744,6 +1744,9 @@ fi

$ECHO  "Starting Tests"

# Some test cases need USE_RUNNING_SERVER
export USE_RUNNING_SERVER

#
# This can probably be deleted
#
@@ -1816,7 +1819,7 @@ fi
$ECHO $DASH72
$ECHO

if [ -z "$DO_GDB" ] && [ -z "$USE_RUNNING_SERVER" ] && [ -z "$DO_DDD" ]
if [ -z "$DO_GDB" ] && [ $USE_RUNNING_SERVER -eq 0 ] && [ -z "$DO_DDD" ]
then
    mysql_stop
fi
+2 −0
Original line number Diff line number Diff line
Variable_name    	Value
use extern server	NO
+7 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
flush privileges;
grant usage on *.* to mysqltest_1@localhost with max_queries_per_hour 2;
flush user_resources;
select * from t1;
i
select * from t1;
@@ -16,6 +17,7 @@ select * from t1;
ERROR 42000: User 'mysqltest_1' has exceeded the 'max_questions' resource (current value: 2)
drop user mysqltest_1@localhost;
grant usage on *.* to mysqltest_1@localhost with max_updates_per_hour 2;
flush user_resources;
select * from t1;
i
select * from t1;
@@ -34,6 +36,7 @@ select * from t1;
i
drop user mysqltest_1@localhost;
grant usage on *.* to mysqltest_1@localhost with max_connections_per_hour 2;
flush user_resources;
select * from t1;
i
select * from t1;
@@ -47,6 +50,7 @@ ERROR 42000: User 'mysqltest_1' has exceeded the 'max_connections' resource (cur
drop user mysqltest_1@localhost;
flush privileges;
grant usage on *.* to mysqltest_1@localhost with max_user_connections 2;
flush user_resources;
select * from t1;
i
select * from t1;
@@ -56,6 +60,7 @@ ERROR 42000: User 'mysqltest_1' has exceeded the 'max_user_connections' resource
select * from t1;
i
grant usage on *.* to mysqltest_1@localhost with max_user_connections 3;
flush user_resources;
select * from t1;
i
connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK);
@@ -71,6 +76,7 @@ select @@session.max_user_connections, @@global.max_user_connections;
@@session.max_user_connections	@@global.max_user_connections
2	2
grant usage on *.* to mysqltest_1@localhost;
flush user_resources;
select @@session.max_user_connections, @@global.max_user_connections;
@@session.max_user_connections	@@global.max_user_connections
2	2
@@ -79,6 +85,7 @@ i
connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK);
ERROR 42000: User mysqltest_1 already has more than 'max_user_connections' active connections
grant usage on *.* to mysqltest_1@localhost with max_user_connections 3;
flush user_resources;
select @@session.max_user_connections, @@global.max_user_connections;
@@session.max_user_connections	@@global.max_user_connections
3	2
Loading