diff options
Diffstat (limited to 'mysql-test')
162 files changed, 11992 insertions, 621 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index e10c0739cb4..c3f9eea875d 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -62,6 +62,7 @@ install-data-local: $(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r $(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include $(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.*001 $(DESTDIR)$(testdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(DESTDIR)$(testdir)/std_data $(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data diff --git a/mysql-test/include/have_csv.inc b/mysql-test/include/have_csv.inc new file mode 100644 index 00000000000..d28199831b8 --- /dev/null +++ b/mysql-test/include/have_csv.inc @@ -0,0 +1,4 @@ +-- require r/have_csv.require +disable_query_log; +show variables like "have_csv"; +enable_query_log; diff --git a/mysql-test/include/have_exampledb.inc b/mysql-test/include/have_exampledb.inc new file mode 100644 index 00000000000..7ddd15c48b3 --- /dev/null +++ b/mysql-test/include/have_exampledb.inc @@ -0,0 +1,4 @@ +-- require r/have_exampledb.require +disable_query_log; +show variables like "have_example_engine"; +enable_query_log; diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 6684ac6b9ed..955bc12a43a 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -367,10 +367,12 @@ while test $# -gt 0; do VALGRIND=`which valgrind` # this will print an error if not found # Give good warning to the user and stop if [ -z "$VALGRIND" ] ; then - $ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://developer.kde.org/~sewardj ." + $ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://valgrind.kde.org ." exit 1 fi - VALGRIND="$VALGRIND --tool=memcheck --alignment=8 --leak-check=yes --num-callers=16" + # >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr + valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck" + VALGRIND="$VALGRIND --alignment=8 --leak-check=yes --num-callers=16" EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc --skip-bdb" EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb" SLEEP_TIME_AFTER_RESTART=10 @@ -436,7 +438,7 @@ SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/slave.err" CURRENT_TEST="$MYSQL_TEST_DIR/var/log/current_test" SMALL_SERVER="--key_buffer_size=1M --sort_buffer=256K --max_heap_table_size=1M" -export MASTER_MYPORT SLAVE_MYPORT MYSQL_TCP_PORT +export MASTER_MYPORT SLAVE_MYPORT MYSQL_TCP_PORT MASTER_MYSOCK if [ x$SOURCE_DIST = x1 ] ; then MY_BASEDIR=$MYSQL_TEST_DIR @@ -523,11 +525,6 @@ else fi fi -MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT" -MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR $EXTRA_MYSQLBINLOG_OPT" -MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose" -MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD" - if [ -z "$MASTER_MYSQLD" ] then MASTER_MYSQLD=$MYSQLD @@ -560,6 +557,12 @@ then fi +MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT" +MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR $EXTRA_MYSQLBINLOG_OPT" +MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose" +MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD" +export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES CLIENT_BINDIR + MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \ --user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \ --tmpdir=$MYSQL_TMP_DIR --port=$MASTER_MYPORT $MYSQL_TEST_SSL_OPTS" @@ -612,6 +615,7 @@ show_failed_diff () echo "Please follow the instructions outlined at" echo "http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html" echo "to find the reason to this problem and how to report this." + echo "" fi } @@ -1428,7 +1432,7 @@ then if [ -z "$USE_RUNNING_NDBCLUSTER" ] then # Kill any running ndbcluster stuff - ./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT --stop + ./ndb/ndbcluster --data-dir=$MYSQL_TEST_DIR/var --port-base=$NDBCLUSTER_PORT --stop fi fi @@ -1449,11 +1453,11 @@ then if [ -z "$USE_RUNNING_NDBCLUSTER" ] then echo "Starting ndbcluster" - ./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT --small --discless --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1 - export NDB_CONNECTSTRING=`cat Ndb.cfg` + ./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT --small --diskless --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1 + USE_NDBCLUSTER="$USE_NDBCLUSTER --ndb-connectstring=\"host=localhost:$NDBCLUSTER_PORT\"" else - export NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER" - echo "Using ndbcluster at $NDB_CONNECTSTRING" + USE_NDBCLUSTER="$USE_NDBCLUSTER --ndb-connectstring=\"$USE_RUNNING_NDBCLUSTER\"" + echo "Using ndbcluster at $USE_NDBCLUSTER" fi fi @@ -1549,7 +1553,7 @@ then if [ -z "$USE_RUNNING_NDBCLUSTER" ] then # Kill any running ndbcluster stuff - ./ndb/ndbcluster --port-base=$NDBCLUSTER_PORT --stop + ./ndb/ndbcluster --data-dir=$MYSQL_TEST_DIR/var --port-base=$NDBCLUSTER_PORT --stop fi fi diff --git a/mysql-test/ndb/ndb_config_2_node.ini b/mysql-test/ndb/ndb_config_2_node.ini index 82c65c98866..bf5c67cd1d6 100644 --- a/mysql-test/ndb/ndb_config_2_node.ini +++ b/mysql-test/ndb/ndb_config_2_node.ini @@ -3,73 +3,34 @@ NoOfReplicas: 2 MaxNoOfConcurrentOperations: CHOOSE_MaxNoOfConcurrentOperations DataMemory: CHOOSE_DataMemory IndexMemory: CHOOSE_IndexMemory -Discless: CHOOSE_Discless +Diskless: CHOOSE_Diskless +TimeBetweenWatchDogCheck: 30000 +FileSystemPath: CHOOSE_FILESYSTEM [COMPUTER] Id: 1 -ByteOrder: Little HostName: CHOOSE_HOSTNAME_1 [COMPUTER] Id: 2 -ByteOrder: Little HostName: CHOOSE_HOSTNAME_2 -[COMPUTER] -Id: 3 -ByteOrder: Little -HostName: CHOOSE_HOSTNAME_3 - -[COMPUTER] -Id: 4 -ByteOrder: Little -HostName: CHOOSE_HOSTNAME_4 - -[COMPUTER] -Id: 5 -ByteOrder: Little -HostName: CHOOSE_HOSTNAME_5 - -[COMPUTER] -Id: 6 -ByteOrder: Little -HostName: CHOOSE_HOSTNAME_6 - -[COMPUTER] -Id: 7 -ByteOrder: Little -HostName: CHOOSE_HOSTNAME_7 - -[MGM] -Id: 1 +[DB] ExecuteOnComputer: 1 -PortNumber: CHOOSE_PORT_MGM [DB] -Id: 2 ExecuteOnComputer: 2 -FileSystemPath: CHOOSE_FILESYSTEM_NODE_2 -[DB] -Id: 3 -ExecuteOnComputer: 3 -FileSystemPath: CHOOSE_FILESYSTEM_NODE_3 +[MGM] +PortNumber: CHOOSE_PORT_MGM -[API] -Id: 11 -ExecuteOnComputer: 4 +[MYSQLD] -[API] -Id: 12 -ExecuteOnComputer: 5 +[MYSQLD] -[API] -Id: 13 -ExecuteOnComputer: 6 +[MYSQLD] -[API] -Id: 14 -ExecuteOnComputer: 7 +[MYSQLD] [TCP DEFAULT] PortNumber: CHOOSE_PORT_TRANSPORTER diff --git a/mysql-test/ndb/ndbcluster.sh b/mysql-test/ndb/ndbcluster.sh index 4afbe5cf3d7..bbd3fa3257a 100644 --- a/mysql-test/ndb/ndbcluster.sh +++ b/mysql-test/ndb/ndbcluster.sh @@ -42,7 +42,7 @@ cfgfile=Ndb.cfg stop_ndb= initial_ndb= status_ndb= -ndb_discless=0 +ndb_diskless=0 ndb_con_op=100000 ndb_dmem=80M @@ -54,7 +54,7 @@ while test $# -gt 0; do stop_ndb=1 ;; --initial) - flags_ndb=$flags_ndb" -i" + flags_ndb="$flags_ndb -i" initial_ndb=1 ;; --status) @@ -65,8 +65,8 @@ while test $# -gt 0; do ndb_dmem=40M ndb_imem=12M ;; - --discless) - ndb_discless=1 + --diskless) + ndb_diskless=1 ;; --data-dir=*) fsdir=`echo "$1" | sed -e "s;--data-dir=;;"` @@ -81,123 +81,101 @@ while test $# -gt 0; do shift done -fs_ndb=$fsdir/ndbcluster -fs_mgm_1=$fs_ndb/1.ndb_mgm -fs_ndb_2=$fs_ndb/2.ndb_db -fs_ndb_3=$fs_ndb/3.ndb_db -fs_name_2=$fs_ndb/node-2-fs-$port_base -fs_name_3=$fs_ndb/node-3-fs-$port_base +fs_ndb="$fsdir/ndbcluster-$port_base" NDB_HOME= -export NDB_CONNECTSTRING -if [ ! -x $fsdir ]; then +if [ ! -x "$fsdir" ]; then echo "$fsdir missing" exit 1 fi -if [ ! -x $exec_ndb ]; then +if [ ! -x "$exec_ndb" ]; then echo "$exec_ndb missing" exit 1 fi -if [ ! -x $exec_mgmtsrvr ]; then +if [ ! -x "$exec_mgmtsrvr" ]; then echo "$exec_mgmtsrvr missing" exit 1 fi +ndb_host="localhost" +ndb_mgmd_port=$port_base +NDB_CONNECTSTRING="host=$ndb_host:$ndb_mgmd_port" +export NDB_CONNECTSTRING + start_default_ndbcluster() { # do some checks -NDB_CONNECTSTRING= - -if [ $initial_ndb ] ; then - [ -d $fs_ndb ] || mkdir $fs_ndb - [ -d $fs_mgm_1 ] || mkdir $fs_mgm_1 - [ -d $fs_ndb_2 ] || mkdir $fs_ndb_2 - [ -d $fs_ndb_3 ] || mkdir $fs_ndb_3 - [ -d $fs_name_2 ] || mkdir $fs_name_2 - [ -d $fs_name_3 ] || mkdir $fs_name_3 +if [ "$initial_ndb" ] ; then + [ -d "$fs_ndb" ] || mkdir "$fs_ndb" fi -if [ -d "$fs_ndb" -a -d "$fs_mgm_1" -a -d "$fs_ndb_2" -a -d "$fs_ndb_3" -a -d "$fs_name_2" -a -d "$fs_name_3" ]; then :; else +if [ -d "$fs_ndb" ]; then :; else echo "$fs_ndb filesystem directory does not exist" exit 1 fi # set som help variables -ndb_host="localhost" -ndb_mgmd_port=$port_base port_transporter=`expr $ndb_mgmd_port + 2` -NDB_CONNECTSTRING_BASE="host=$ndb_host:$ndb_mgmd_port;nodeid=" - # Start management server as deamon -NDB_ID="1" -NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID - # Edit file system path and ports in config file if [ $initial_ndb ] ; then sed \ - -e s,"CHOOSE_MaxNoOfConcurrentOperations",$ndb_con_op,g \ - -e s,"CHOOSE_DataMemory",$ndb_dmem,g \ - -e s,"CHOOSE_IndexMemory",$ndb_imem,g \ - -e s,"CHOOSE_Discless",$ndb_discless,g \ + -e s,"CHOOSE_MaxNoOfConcurrentOperations","$ndb_con_op",g \ + -e s,"CHOOSE_DataMemory","$ndb_dmem",g \ + -e s,"CHOOSE_IndexMemory","$ndb_imem",g \ + -e s,"CHOOSE_Diskless","$ndb_diskless",g \ -e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \ - -e s,"CHOOSE_FILESYSTEM_NODE_2","$fs_name_2",g \ - -e s,"CHOOSE_FILESYSTEM_NODE_3","$fs_name_3",g \ - -e s,"CHOOSE_PORT_MGM",$ndb_mgmd_port,g \ - -e s,"CHOOSE_PORT_TRANSPORTER",$port_transporter,g \ + -e s,"CHOOSE_FILESYSTEM","$fs_ndb",g \ + -e s,"CHOOSE_PORT_MGM","$ndb_mgmd_port",g \ + -e s,"CHOOSE_PORT_TRANSPORTER","$port_transporter",g \ < ndb/ndb_config_2_node.ini \ - > "$fs_mgm_1/config.ini" + > "$fs_ndb/config.ini" fi -if ( cd $fs_mgm_1 ; echo $NDB_CONNECTSTRING > $cfgfile ; $exec_mgmtsrvr -d -c config.ini ) ; then :; else +rm -f "$cfgfile" 2>&1 | cat > /dev/null +rm -f "$fs_ndb/$cfgfile" 2>&1 | cat > /dev/null + +if ( cd "$fs_ndb" ; $exec_mgmtsrvr -d -c config.ini ) ; then :; else echo "Unable to start $exec_mgmtsrvr from `pwd`" exit 1 fi -cat `find $fs_ndb -name 'node*.pid'` > $pidfile +cat `find "$fs_ndb" -name 'ndb_*.pid'` > "$fs_ndb/$pidfile" # Start database node -NDB_ID="2" -NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID -echo "Starting ndbd connectstring=\""$NDB_CONNECTSTRING\" -( cd $fs_ndb_2 ; echo $NDB_CONNECTSTRING > $cfgfile ; $exec_ndb -d $flags_ndb & ) +echo "Starting ndbd" +( cd "$fs_ndb" ; $exec_ndb -d $flags_ndb & ) -cat `find $fs_ndb -name 'node*.pid'` > $pidfile +cat `find "$fs_ndb" -name 'ndb_*.pid'` > "$fs_ndb/$pidfile" # Start database node -NDB_ID="3" -NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID -echo "Starting ndbd connectstring=\""$NDB_CONNECTSTRING\" -( cd $fs_ndb_3 ; echo $NDB_CONNECTSTRING > $cfgfile ; $exec_ndb -d $flags_ndb & ) +echo "Starting ndbd" +( cd "$fs_ndb" ; $exec_ndb -d $flags_ndb & ) -cat `find $fs_ndb -name 'node*.pid'` > $pidfile +cat `find "$fs_ndb" -name 'ndb_*.pid'` > "$fs_ndb/$pidfile" # test if Ndb Cluster starts properly echo "Waiting for started..." -NDB_ID="11" -NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID if ( $exec_waiter ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else echo "Ndbcluster startup failed" exit 1 fi -echo $NDB_CONNECTSTRING > $cfgfile - -cat `find $fs_ndb -name 'node*.pid'` > $pidfile +cat `find "$fs_ndb" -name 'ndb_*.pid'` > $fs_ndb/$pidfile status_ndbcluster } status_ndbcluster() { -# Start management client - -echo "show" | $exec_mgmtclient $ndb_host $ndb_mgmd_port + # Start management client + echo "show" | $exec_mgmtclient } stop_default_ndbcluster() { @@ -206,26 +184,21 @@ stop_default_ndbcluster() { # exit 0 #fi -if [ ! -f $cfgfile ] ; then - echo "$cfgfile missing" - exit 1 -fi - -ndb_host=`cat $cfgfile | sed -e "s,.*host=\(.*\)\:.*,\1,1"` -ndb_mgmd_port=`cat $cfgfile | sed -e "s,.*host=$ndb_host\:\([0-9]*\).*,\1,1"` +#if [ ! -f $cfgfile ] ; then +# echo "$cfgfile missing" +# exit 1 +#fi # Start management client -exec_mgmtclient="$exec_mgmtclient --try-reconnect=1 $ndb_host $ndb_mgmd_port" - -echo "$exec_mgmtclient" -echo "all stop" | $exec_mgmtclient +exec_mgmtclient="$exec_mgmtclient --try-reconnect=1" -sleep 5 +echo "all stop" | $exec_mgmtclient 2>&1 | cat > /dev/null +echo "3 stop" | $exec_mgmtclient 2>&1 | cat > /dev/null -if [ -f $pidfile ] ; then - kill `cat $pidfile` 2> /dev/null - rm $pidfile +if [ -f "$fs_ndb/$pidfile" ] ; then + kill -9 `cat "$fs_ndb/$pidfile"` 2> /dev/null + rm "$fs_ndb/$pidfile" fi } diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 5d50a3da666..e85ad303564 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -476,3 +476,9 @@ alter table t1 drop key no_such_key; ERROR 42000: Can't DROP 'no_such_key'; check that column/key exists alter table t1 drop key a; drop table t1; +create table t1 (a int); +alter table t1 rename to `t1\\`; +ERROR 42000: Incorrect table name 't1\\' +rename table t1 to `t1\\`; +ERROR 42000: Incorrect table name 't1\\' +drop table t1; diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result index 6bc59d4771f..f5ec5f1f852 100644 --- a/mysql-test/r/auto_increment.result +++ b/mysql-test/r/auto_increment.result @@ -201,6 +201,24 @@ a b 202 5 203 6 204 7 +alter table t1 modify b mediumint; +select * from t1 order by b; +a b +1 1 +200 2 +0 3 +201 4 +202 5 +203 6 +204 7 +create table t2 (a int); +insert t2 values (1),(2); +alter table t2 add b int auto_increment primary key; +select * from t2; +a b +1 1 +2 2 +drop table t2; delete from t1 where a=0; update t1 set a=0 where b=5; select * from t1 order by b; diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result index f6ad190b05a..405de1158d6 100644 --- a/mysql-test/r/binary.result +++ b/mysql-test/r/binary.result @@ -59,9 +59,15 @@ concat("-",a,"-",b,"-") -hello-hello- select concat("-",a,"-",b,"-") from t1 where b="hello "; concat("-",a,"-",b,"-") +-hello-hello- select concat("-",a,"-",b,"-") from t1 ignore index (b) where b="hello "; concat("-",a,"-",b,"-") +-hello-hello- alter table t1 modify b tinytext not null, drop key b, add key (b(100)); +select concat("-",a,"-",b,"-") from t1; +concat("-",a,"-",b,"-") +-hello-hello- +-hello2-hello2- select concat("-",a,"-",b,"-") from t1 where b="hello "; concat("-",a,"-",b,"-") -hello-hello- @@ -105,8 +111,26 @@ a b aaa bbb select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1; charset(a) charset(b) charset(binary 'ccc') -latin1 binary latin1 +latin1 binary binary select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1; collation(a) collation(b) collation(binary 'ccc') -latin1_bin binary latin1_bin +latin1_bin binary binary +drop table t1; +create table t1( firstname char(20), lastname char(20)); +insert into t1 values ("john","doe"),("John","Doe"); +select * from t1 where firstname='john' and firstname like binary 'john'; +firstname lastname +john doe +select * from t1 where firstname='john' and binary 'john' = firstname; +firstname lastname +john doe +select * from t1 where firstname='john' and firstname = binary 'john'; +firstname lastname +john doe +select * from t1 where firstname='John' and firstname like binary 'john'; +firstname lastname +john doe +select * from t1 where firstname='john' and firstname like binary 'John'; +firstname lastname +John Doe drop table t1; diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index b5d0e4d9ae2..0e4583fbc96 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -42,6 +42,9 @@ show tables; Tables_in_test table_type update mysql.user set password=old_password("gambling2") where user=_binary"test"; flush privileges; +set password=""; +set password='gambling3'; +ERROR HY000: Password hash should be a 41-digit hexadecimal number set password=old_password('gambling3'); show tables; Tables_in_mysql table_type diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 699485ff3f7..92c825f547d 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1,5 +1,5 @@ drop table if exists t1,t2,t3; -drop database if exists test_$1; +drop database if exists mysqltest; create table t1 (b char(0)); insert into t1 values (""),(null); select * from t1; @@ -58,18 +58,18 @@ select 1ea10.1a20,1e+ 1e+10 from 1ea10; drop table 1ea10; create table t1 (t1.index int); drop table t1; -drop database if exists test_$1; +drop database if exists mysqltest; Warnings: -Note 1008 Can't drop database 'test_$1'; database doesn't exist -create database test_$1; -create table test_$1.$test1 (a$1 int, $b int, c$ int); -insert into test_$1.$test1 values (1,2,3); -select a$1, $b, c$ from test_$1.$test1; +Note 1008 Can't drop database 'mysqltest'; database doesn't exist +create database mysqltest; +create table mysqltest.$test1 (a$1 int, $b int, c$ int); +insert into mysqltest.$test1 values (1,2,3); +select a$1, $b, c$ from mysqltest.$test1; a$1 $b c$ 1 2 3 -create table test_$1.test2$ (a int); -drop table test_$1.test2$; -drop database test_$1; +create table mysqltest.test2$ (a int); +drop table mysqltest.test2$; +drop database mysqltest; create table `` (a int); ERROR 42000: Incorrect table name '' drop table if exists ``; @@ -320,9 +320,9 @@ t3 CREATE TABLE `t3` ( select * from t3; id name drop table t2, t3; -create database test_$1; -create table test_$1.t3 like t1; -create temporary table t3 like test_$1.t3; +create database mysqltest; +create table mysqltest.t3 like t1; +create temporary table t3 like mysqltest.t3; show create table t3; Table Create Table t3 CREATE TEMPORARY TABLE `t3` ( @@ -339,7 +339,7 @@ t2 CREATE TABLE `t2` ( select * from t2; id name create table t3 like t1; -create table t3 like test_$1.t3; +create table t3 like mysqltest.t3; ERROR 42S01: Table 't3' already exists create table non_existing_database.t1 like t1; Got one of the listed errors @@ -351,7 +351,7 @@ create table t3 like `a/a`; ERROR 42000: Incorrect table name 'a/a' drop table t1, t2, t3; drop table t3; -drop database test_$1; +drop database mysqltest; SET SESSION storage_engine="heap"; SELECT @@storage_engine; @@storage_engine @@ -488,12 +488,12 @@ Note 1291 Column 'cset' has duplicated value 'b' in SET Note 1291 Column 'cset' has duplicated value 'B' in SET Note 1291 Column 'cset' has duplicated value 'd' in SET drop table t1, t2, t3; -create database test_$1; -use test_$1; +create database mysqltest; +use mysqltest; select database(); database() -test_$1 -drop database test_$1; +mysqltest +drop database mysqltest; select database(); database() NULL diff --git a/mysql-test/r/create_select_tmp.result b/mysql-test/r/create_select_tmp.result index 09ffc9013c7..b99bf3e3591 100644 --- a/mysql-test/r/create_select_tmp.result +++ b/mysql-test/r/create_select_tmp.result @@ -1,19 +1,19 @@ drop table if exists t1, t2; CREATE TABLE t1 ( a int ); INSERT INTO t1 VALUES (1),(2),(1); -CREATE TABLE t2 ( PRIMARY KEY (a) ) TYPE=INNODB SELECT a FROM t1; +CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; ERROR 23000: Duplicate entry '1' for key 1 select * from t2; ERROR 42S02: Table 'test.t2' doesn't exist -CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) TYPE=INNODB SELECT a FROM t1; +CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; ERROR 23000: Duplicate entry '1' for key 1 select * from t2; ERROR 42S02: Table 'test.t2' doesn't exist -CREATE TABLE t2 ( PRIMARY KEY (a) ) TYPE=MYISAM SELECT a FROM t1; +CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; ERROR 23000: Duplicate entry '1' for key 1 select * from t2; ERROR 42S02: Table 'test.t2' doesn't exist -CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) TYPE=MYISAM SELECT a FROM t1; +CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; ERROR 23000: Duplicate entry '1' for key 1 select * from t2; ERROR 42S02: Table 'test.t2' doesn't exist diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result new file mode 100644 index 00000000000..ea0d34271b5 --- /dev/null +++ b/mysql-test/r/csv.result @@ -0,0 +1,4931 @@ +drop table if exists t1,t2,t3,t4; +CREATE TABLE t1 ( +Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, +Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL +) ENGINE = CSV; +INSERT INTO t1 VALUES (9410,9412); +select period from t1; +period +9410 +select * from t1; +Period Varor_period +9410 9412 +select t1.* from t1; +Period Varor_period +9410 9412 +CREATE TABLE t2 ( +auto int not null, +fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL, +companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL, +fld3 char(30) DEFAULT '' NOT NULL, +fld4 char(35) DEFAULT '' NOT NULL, +fld5 char(35) DEFAULT '' NOT NULL, +fld6 char(4) DEFAULT '' NOT NULL +) ENGINE = CSV; +select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"; +fld3 +imaginable +select fld3 from t2 where fld3 like "%cultivation" ; +fld3 +cultivation +select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3; +fld3 companynr +concoct 58 +druggists 58 +engrossing 58 +Eurydice 58 +exclaimers 58 +ferociousness 58 +hopelessness 58 +Huey 58 +imaginable 58 +judges 58 +merging 58 +ostrich 58 +peering 58 +Phelps 58 +presumes 58 +Ruth 58 +sentences 58 +Shylock 58 +straggled 58 +synergy 58 +thanking 58 +tying 58 +unlocks 58 +select fld3,companynr from t2 where companynr = 58 order by fld3; +fld3 companynr +concoct 58 +druggists 58 +engrossing 58 +Eurydice 58 +exclaimers 58 +ferociousness 58 +hopelessness 58 +Huey 58 +imaginable 58 +judges 58 +merging 58 +ostrich 58 +peering 58 +Phelps 58 +presumes 58 +Ruth 58 +sentences 58 +Shylock 58 +straggled 58 +synergy 58 +thanking 58 +tying 58 +unlocks 58 +select fld3 from t2 order by fld3 desc limit 10; +fld3 +youthfulness +yelped +Wotan +workers +Witt +witchcraft +Winsett +Willy +willed +wildcats +select fld3 from t2 order by fld3 desc limit 5; +fld3 +youthfulness +yelped +Wotan +workers +Witt +select fld3 from t2 order by fld3 desc limit 5,5; +fld3 +witchcraft +Winsett +Willy +willed +wildcats +UPDATE t2 SET fld3="foo" WHERE fld3="b%"; +select fld3 from t2; +fld3 +Omaha +breaking +Romans +intercepted +bewilderingly +astound +admonishing +sumac +flanking +combed +subjective +scatterbrain +Eulerian +dubbed +Kane +overlay +perturb +goblins +annihilates +Wotan +snatching +concludes +laterally +yelped +grazing +Baird +celery +misunderstander +handgun +foldout +mystic +succumbed +Nabisco +fingerings +aging +afield +ammonium +boat +intelligibility +Augustine +teethe +dreaded +scholastics +audiology +wallet +parters +eschew +quitter +neat +Steinberg +jarring +tinily +balled +persist +attainments +fanatic +measures +rightfulness +capably +impulsive +starlet +terminators +untying +announces +featherweight +pessimist +daughter +decliner +lawgiver +stated +readable +attrition +cascade +motors +interrogate +pests +stairway +dopers +testicle +Parsifal +leavings +postulation +squeaking +contrasted +leftover +whiteners +erases +Punjab +Merritt +Quixotism +sweetish +dogging +scornfully +bellow +bills +cupboard +sureties +puddings +tapestry +fetters +bivalves +incurring +Adolph +pithed +emergency +Miles +trimmings +tragedies +skulking +flint +flopping +relaxing +offload +suites +lists +animized +multilayer +standardizes +Judas +vacuuming +dentally +humanness +inch +Weissmuller +irresponsibly +luckily +culled +medical +bloodbath +subschema +animals +Micronesia +repetitions +Antares +ventilate +pityingly +interdependent +Graves +neonatal +scribbled +chafe +honoring +realtor +elite +funereal +abrogating +sorters +Conley +lectured +Abraham +Hawaii +cage +hushes +Simla +reporters +Dutchman +descendants +groupings +dissociate +coexist +Beebe +Taoism +Connally +fetched +checkpoints +rusting +galling +obliterates +traitor +resumes +analyzable +terminator +gritty +firearm +minima +Selfridge +disable +witchcraft +betroth +Manhattanize +imprint +peeked +swelling +interrelationships +riser +Gandhian +peacock +bee +kanji +dental +scarf +chasm +insolence +syndicate +alike +imperial +convulsion +railway +validate +normalizes +comprehensive +chewing +denizen +schemer +chronicle +Kline +Anatole +partridges +brunch +recruited +dimensions +Chicana +announced +praised +employing +linear +quagmire +western +relishing +serving +scheduling +lore +eventful +arteriole +disentangle +cured +Fenton +avoidable +drains +detectably +husky +impelling +undoes +evened +squeezes +destroyer +rudeness +beaner +boorish +Everhart +encompass +mushrooms +Alison +externally +pellagra +cult +creek +Huffman +Majorca +governing +gadfly +reassigned +intentness +craziness +psychic +squabbled +burlesque +capped +extracted +DiMaggio +exclamation +subdirectory +fangs +buyer +pithing +transistorizing +nonbiodegradable +dislocate +monochromatic +batting +postcondition +catalog +Remus +devices +bike +qualify +detained +commended +civilize +Elmhurst +anesthetizing +deaf +Brigham +title +coarse +combinations +grayness +innumerable +Caroline +fatty +eastbound +inexperienced +hoarder +scotch +passport +strategic +gated +flog +Pipestone +Dar +Corcoran +flyers +competitions +suppliers +skips +institutes +troop +connective +denies +polka +observations +askers +homeless +Anna +subdirectories +decaying +outwitting +Harpy +crazed +suffocate +provers +technically +Franklinizations +considered +tinnily +uninterruptedly +whistled +automate +gutting +surreptitious +Choctaw +cooks +millivolt +counterpoise +Gothicism +feminine +metaphysically +sanding +contributorily +receivers +adjourn +straggled +druggists +thanking +ostrich +hopelessness +Eurydice +excitation +presumes +imaginable +concoct +peering +Phelps +ferociousness +sentences +unlocks +engrossing +Ruth +tying +exclaimers +synergy +Huey +merging +judges +Shylock +Miltonism +hen +honeybee +towers +dilutes +numerals +democracy +Ibero- +invalids +behavior +accruing +relics +rackets +Fischbein +phony +cross +cleanup +conspirator +label +university +cleansed +ballgown +starlet +aqueous +portrayal +despising +distort +palmed +faced +silverware +assessor +spiders +artificially +reminiscence +Mexican +obnoxious +fragile +apprehensible +births +garages +panty +anteater +displacement +drovers +patenting +far +shrieks +aligning +pragmatism +fevers +reexamines +occupancies +sweats +modulators +demand +Madeira +Viennese +chillier +wildcats +gentle +Angles +accuracies +toggle +Mendelssohn +behaviorally +Rochford +mirror +Modula +clobbering +chronography +Eskimoizeds +British +pitfalls +verify +scatter +Aztecan +acuity +sinking +beasts +Witt +physicists +folksong +strokes +crowder +merry +cadenced +alimony +principled +golfing +undiscovered +irritates +patriots +rooms +towering +displease +photosensitive +inking +gainers +leaning +hydrant +preserve +blinded +interactions +Barry +whiteness +pastimes +Edenization +Muscat +assassinated +labeled +glacial +implied +bibliographies +Buchanan +forgivably +innuendo +den +submarines +mouthful +expiring +unfulfilled +precession +nullified +affects +Cynthia +Chablis +betterments +advertising +rubies +southwest +superstitious +tabernacle +silk +handsomest +Persian +analog +complex +Taoist +suspend +relegated +awesome +Bruxelles +imprecisely +televise +braking +true +disappointing +navally +circus +beetles +trumps +fourscore +Blackfoots +Grady +quiets +floundered +profundity +Garrisonian +Strauss +cemented +contrition +mutations +exhibits +tits +mate +arches +Moll +ropers +bombast +difficultly +adsorption +definiteness +cultivation +heals +Heusen +target +cited +congresswoman +Katherine +titter +aspire +Mardis +Nadia +estimating +stuck +fifteenth +Colombo +survey +staffing +obtain +loaded +slaughtered +lights +circumference +dull +weekly +wetness +visualized +Tannenbaum +moribund +demultiplex +lockings +thugs +unnerves +abut +Chippewa +stratifications +signaled +Italianizes +algorithmic +paranoid +camping +signifying +Patrice +search +Angeles +semblance +taxed +Beatrice +retrace +lockout +grammatic +helmsman +uniform +hamming +disobedience +captivated +transferals +cartographer +aims +Pakistani +burglarized +saucepans +lacerating +corny +megabytes +chancellor +bulk +commits +meson +deputies +northeaster +dipole +machining +therefore +Telefunken +salvaging +Corinthianizes +restlessly +bromides +generalized +mishaps +quelling +spiritual +beguiles +Trobriand +fleeing +Armour +chin +provers +aeronautic +voltage +sash +anaerobic +simultaneous +accumulating +Medusan +shouted +freakish +index +commercially +mistiness +endpoint +straight +flurried +denotative +coming +commencements +gentleman +gifted +Shanghais +sportswriting +sloping +navies +leaflet +shooter +Joplin +babies +subdivision +burstiness +belted +assails +admiring +swaying +Goldstine +fitting +Norwalk +weakening +analogy +deludes +cokes +Clayton +exhausts +causality +sating +icon +throttles +communicants +dehydrate +priceless +publicly +incidentals +commonplace +mumbles +furthermore +cautioned +parametrized +registration +sadly +positioning +babysitting +eternal +hoarder +congregates +rains +workers +sags +unplug +garage +boulder +hollowly +specifics +Teresa +Winsett +convenient +buckboards +amenities +resplendent +priding +configurations +untidiness +Brice +sews +participated +Simon +certificates +Fitzpatrick +Evanston +misted +textures +save +count +rightful +chaperone +Lizzy +clenched +effortlessly +accessed +beaters +Hornblower +vests +indulgences +infallibly +unwilling +excrete +spools +crunches +overestimating +ineffective +humiliation +sophomore +star +rifles +dialysis +arriving +indulge +clockers +languages +Antarctica +percentage +ceiling +specification +regimented +ciphers +pictures +serpents +allot +realized +mayoral +opaquely +hostess +fiftieth +incorrectly +decomposition +stranglings +mixture +electroencephalography +similarities +charges +freest +Greenberg +tinting +expelled +warm +smoothed +deductions +Romano +bitterroot +corset +securing +environing +cute +Crays +heiress +inform +avenge +universals +Kinsey +ravines +bestseller +equilibrium +extents +relatively +pressure +critiques +befouled +rightfully +mechanizing +Latinizes +timesharing +Aden +embassies +males +shapelessly +genres +mastering +Newtonian +finishers +abates +teem +kiting +stodgy +scalps +feed +guitars +airships +store +denounces +Pyle +Saxony +serializations +Peruvian +taxonomically +kingdom +stint +Sault +faithful +Ganymede +tidiness +gainful +contrary +Tipperary +tropics +theorizers +renew +already +terminal +Hegelian +hypothesizer +warningly +journalizing +nested +Lars +saplings +foothill +labeled +imperiously +reporters +furnishings +precipitable +discounts +excises +Stalin +despot +ripeness +Arabia +unruly +mournfulness +boom +slaughter +Sabine +handy +rural +organizer +shipyard +civics +inaccuracy +rules +juveniles +comprised +investigations +stabilizes +seminaries +Hunter +sporty +test +weasels +CERN +tempering +afore +Galatean +techniques +error +veranda +severely +Cassites +forthcoming +guides +vanish +lied +sawtooth +fated +gradually +widens +preclude +Jobrel +hooker +rainstorm +disconnects +cruelty +exponentials +affective +arteries +Crosby +acquaint +evenhandedly +percentage +disobedience +humility +gleaning +petted +bloater +minion +marginal +apiary +measures +precaution +repelled +primary +coverings +Artemia +navigate +spatial +Gurkha +meanwhile +Melinda +Butterfield +Aldrich +previewing +glut +unaffected +inmate +mineral +impending +meditation +ideas +miniaturizes +lewdly +title +youthfulness +creak +Chippewa +clamored +freezes +forgivably +reduce +McGovern +Nazis +epistle +socializes +conceptions +Kevin +uncovering +chews +appendixes +appendixes +appendixes +appendixes +appendixes +appendixes +raining +infest +compartment +minting +ducks +roped +waltz +Lillian +repressions +chillingly +noncritical +lithograph +spongers +parenthood +posed +instruments +filial +fixedly +relives +Pandora +watering +ungrateful +secures +chastisers +icon +reuniting +imagining +abiding +omnisciently +Britannic +scholastics +mechanics +humidly +masterpiece +however +Mendelian +jarred +scolds +infatuate +willed +joyfully +Microsoft +fibrosities +Baltimorean +equestrian +Goodrich +apish +Adlerian +Tropez +nouns +distracting +mutton +bridgeable +stickers +transcontinental +amateurish +Gandhian +stratified +chamberlains +creditably +philosophic +ores +Carleton +tape +afloat +goodness +welcoming +Pinsky +halting +bibliography +decoding +variance +allowed +dire +dub +poisoning +Iraqis +heaving +population +bomb +Majorca +Gershwins +explorers +libretto +occurred +Lagos +rats +bankruptcies +crying +unexpected +accessed +colorful +versatility +cosy +Darius +mastering +Asiaticizations +offerers +uncles +sleepwalk +Ernestine +checksumming +stopped +sicker +Italianization +alphabetic +pharmaceutic +creator +chess +charcoal +Epiphany +bulldozes +Pygmalion +caressing +Palestine +regimented +scars +realest +diffusing +clubroom +Blythe +ahead +reviver +retransmitting +landslide +Eiffel +absentee +aye +forked +Peruvianizes +clerked +tutor +boulevard +shuttered +quotes +Caltech +Mossberg +kept +roundly +features +imaginable +controller +racial +uprisings +narrowed +cannot +vest +famine +sugars +exterminated +belays +Hodges +translatable +duality +recording +rouses +poison +attitude +dusted +encompasses +presentation +Kantian +imprecision +saving +maternal +hewed +kerosene +Cubans +photographers +nymph +bedlam +north +Schoenberg +botany +curs +solidification +inheritresses +stiller +t1 +suite +ransomer +Willy +Rena +Seattle +relaxes +exclaim +exclaim +implicated +distinguish +assayed +homeowner +and +stealth +coinciding +founder +environing +jewelry +lemons +brokenness +bedpost +assurers +annoyers +affixed +warbling +seriously +boasted +Chantilly +Iranizes +violinist +extramarital +spates +cloakroom +gazer +hand +tucked +gems +clinker +refiner +callus +leopards +comfortingly +generically +getters +sexually +spear +serums +Italianization +attendants +spies +Anthony +planar +cupped +cleanser +commuters +honeysuckle +orphanage +skies +crushers +Puritan +squeezer +bruises +bonfire +Colombo +nondecreasing +UPDATE t2 SET fld3="bar" WHERE fld3="s%"; +select fld3 from t2; +fld3 +Omaha +breaking +Romans +intercepted +bewilderingly +astound +admonishing +sumac +flanking +combed +subjective +scatterbrain +Eulerian +dubbed +Kane +overlay +perturb +goblins +annihilates +Wotan +snatching +concludes +laterally +yelped +grazing +Baird +celery +misunderstander +handgun +foldout +mystic +succumbed +Nabisco +fingerings +aging +afield +ammonium +boat +intelligibility +Augustine +teethe +dreaded +scholastics +audiology +wallet +parters +eschew +quitter +neat +Steinberg +jarring +tinily +balled +persist +attainments +fanatic +measures +rightfulness +capably +impulsive +starlet +terminators +untying +announces +featherweight +pessimist +daughter +decliner +lawgiver +stated +readable +attrition +cascade +motors +interrogate +pests +stairway +dopers +testicle +Parsifal +leavings +postulation +squeaking +contrasted +leftover +whiteners +erases +Punjab +Merritt +Quixotism +sweetish +dogging +scornfully +bellow +bills +cupboard +sureties +puddings +tapestry +fetters +bivalves +incurring +Adolph +pithed +emergency +Miles +trimmings +tragedies +skulking +flint +flopping +relaxing +offload +suites +lists +animized +multilayer +standardizes +Judas +vacuuming +dentally +humanness +inch +Weissmuller +irresponsibly +luckily +culled +medical +bloodbath +subschema +animals +Micronesia +repetitions +Antares +ventilate +pityingly +interdependent +Graves +neonatal +scribbled +chafe +honoring +realtor +elite +funereal +abrogating +sorters +Conley +lectured +Abraham +Hawaii +cage +hushes +Simla +reporters +Dutchman +descendants +groupings +dissociate +coexist +Beebe +Taoism +Connally +fetched +checkpoints +rusting +galling +obliterates +traitor +resumes +analyzable +terminator +gritty +firearm +minima +Selfridge +disable +witchcraft +betroth +Manhattanize +imprint +peeked +swelling +interrelationships +riser +Gandhian +peacock +bee +kanji +dental +scarf +chasm +insolence +syndicate +alike +imperial +convulsion +railway +validate +normalizes +comprehensive +chewing +denizen +schemer +chronicle +Kline +Anatole +partridges +brunch +recruited +dimensions +Chicana +announced +praised +employing +linear +quagmire +western +relishing +serving +scheduling +lore +eventful +arteriole +disentangle +cured +Fenton +avoidable +drains +detectably +husky +impelling +undoes +evened +squeezes +destroyer +rudeness +beaner +boorish +Everhart +encompass +mushrooms +Alison +externally +pellagra +cult +creek +Huffman +Majorca +governing +gadfly +reassigned +intentness +craziness +psychic +squabbled +burlesque +capped +extracted +DiMaggio +exclamation +subdirectory +fangs +buyer +pithing +transistorizing +nonbiodegradable +dislocate +monochromatic +batting +postcondition +catalog +Remus +devices +bike +qualify +detained +commended +civilize +Elmhurst +anesthetizing +deaf +Brigham +title +coarse +combinations +grayness +innumerable +Caroline +fatty +eastbound +inexperienced +hoarder +scotch +passport +strategic +gated +flog +Pipestone +Dar +Corcoran +flyers +competitions +suppliers +skips +institutes +troop +connective +denies +polka +observations +askers +homeless +Anna +subdirectories +decaying +outwitting +Harpy +crazed +suffocate +provers +technically +Franklinizations +considered +tinnily +uninterruptedly +whistled +automate +gutting +surreptitious +Choctaw +cooks +millivolt +counterpoise +Gothicism +feminine +metaphysically +sanding +contributorily +receivers +adjourn +straggled +druggists +thanking +ostrich +hopelessness +Eurydice +excitation +presumes +imaginable +concoct +peering +Phelps +ferociousness +sentences +unlocks +engrossing +Ruth +tying +exclaimers +synergy +Huey +merging +judges +Shylock +Miltonism +hen +honeybee +towers +dilutes +numerals +democracy +Ibero- +invalids +behavior +accruing +relics +rackets +Fischbein +phony +cross +cleanup +conspirator +label +university +cleansed +ballgown +starlet +aqueous +portrayal +despising +distort +palmed +faced +silverware +assessor +spiders +artificially +reminiscence +Mexican +obnoxious +fragile +apprehensible +births +garages +panty +anteater +displacement +drovers +patenting +far +shrieks +aligning +pragmatism +fevers +reexamines +occupancies +sweats +modulators +demand +Madeira +Viennese +chillier +wildcats +gentle +Angles +accuracies +toggle +Mendelssohn +behaviorally +Rochford +mirror +Modula +clobbering +chronography +Eskimoizeds +British +pitfalls +verify +scatter +Aztecan +acuity +sinking +beasts +Witt +physicists +folksong +strokes +crowder +merry +cadenced +alimony +principled +golfing +undiscovered +irritates +patriots +rooms +towering +displease +photosensitive +inking +gainers +leaning +hydrant +preserve +blinded +interactions +Barry +whiteness +pastimes +Edenization +Muscat +assassinated +labeled +glacial +implied +bibliographies +Buchanan +forgivably +innuendo +den +submarines +mouthful +expiring +unfulfilled +precession +nullified +affects +Cynthia +Chablis +betterments +advertising +rubies +southwest +superstitious +tabernacle +silk +handsomest +Persian +analog +complex +Taoist +suspend +relegated +awesome +Bruxelles +imprecisely +televise +braking +true +disappointing +navally +circus +beetles +trumps +fourscore +Blackfoots +Grady +quiets +floundered +profundity +Garrisonian +Strauss +cemented +contrition +mutations +exhibits +tits +mate +arches +Moll +ropers +bombast +difficultly +adsorption +definiteness +cultivation +heals +Heusen +target +cited +congresswoman +Katherine +titter +aspire +Mardis +Nadia +estimating +stuck +fifteenth +Colombo +survey +staffing +obtain +loaded +slaughtered +lights +circumference +dull +weekly +wetness +visualized +Tannenbaum +moribund +demultiplex +lockings +thugs +unnerves +abut +Chippewa +stratifications +signaled +Italianizes +algorithmic +paranoid +camping +signifying +Patrice +search +Angeles +semblance +taxed +Beatrice +retrace +lockout +grammatic +helmsman +uniform +hamming +disobedience +captivated +transferals +cartographer +aims +Pakistani +burglarized +saucepans +lacerating +corny +megabytes +chancellor +bulk +commits +meson +deputies +northeaster +dipole +machining +therefore +Telefunken +salvaging +Corinthianizes +restlessly +bromides +generalized +mishaps +quelling +spiritual +beguiles +Trobriand +fleeing +Armour +chin +provers +aeronautic +voltage +sash +anaerobic +simultaneous +accumulating +Medusan +shouted +freakish +index +commercially +mistiness +endpoint +straight +flurried +denotative +coming +commencements +gentleman +gifted +Shanghais +sportswriting +sloping +navies +leaflet +shooter +Joplin +babies +subdivision +burstiness +belted +assails +admiring +swaying +Goldstine +fitting +Norwalk +weakening +analogy +deludes +cokes +Clayton +exhausts +causality +sating +icon +throttles +communicants +dehydrate +priceless +publicly +incidentals +commonplace +mumbles +furthermore +cautioned +parametrized +registration +sadly +positioning +babysitting +eternal +hoarder +congregates +rains +workers +sags +unplug +garage +boulder +hollowly +specifics +Teresa +Winsett +convenient +buckboards +amenities +resplendent +priding +configurations +untidiness +Brice +sews +participated +Simon +certificates +Fitzpatrick +Evanston +misted +textures +save +count +rightful +chaperone +Lizzy +clenched +effortlessly +accessed +beaters +Hornblower +vests +indulgences +infallibly +unwilling +excrete +spools +crunches +overestimating +ineffective +humiliation +sophomore +star +rifles +dialysis +arriving +indulge +clockers +languages +Antarctica +percentage +ceiling +specification +regimented +ciphers +pictures +serpents +allot +realized +mayoral +opaquely +hostess +fiftieth +incorrectly +decomposition +stranglings +mixture +electroencephalography +similarities +charges +freest +Greenberg +tinting +expelled +warm +smoothed +deductions +Romano +bitterroot +corset +securing +environing +cute +Crays +heiress +inform +avenge +universals +Kinsey +ravines +bestseller +equilibrium +extents +relatively +pressure +critiques +befouled +rightfully +mechanizing +Latinizes +timesharing +Aden +embassies +males +shapelessly +genres +mastering +Newtonian +finishers +abates +teem +kiting +stodgy +scalps +feed +guitars +airships +store +denounces +Pyle +Saxony +serializations +Peruvian +taxonomically +kingdom +stint +Sault +faithful +Ganymede +tidiness +gainful +contrary +Tipperary +tropics +theorizers +renew +already +terminal +Hegelian +hypothesizer +warningly +journalizing +nested +Lars +saplings +foothill +labeled +imperiously +reporters +furnishings +precipitable +discounts +excises +Stalin +despot +ripeness +Arabia +unruly +mournfulness +boom +slaughter +Sabine +handy +rural +organizer +shipyard +civics +inaccuracy +rules +juveniles +comprised +investigations +stabilizes +seminaries +Hunter +sporty +test +weasels +CERN +tempering +afore +Galatean +techniques +error +veranda +severely +Cassites +forthcoming +guides +vanish +lied +sawtooth +fated +gradually +widens +preclude +Jobrel +hooker +rainstorm +disconnects +cruelty +exponentials +affective +arteries +Crosby +acquaint +evenhandedly +percentage +disobedience +humility +gleaning +petted +bloater +minion +marginal +apiary +measures +precaution +repelled +primary +coverings +Artemia +navigate +spatial +Gurkha +meanwhile +Melinda +Butterfield +Aldrich +previewing +glut +unaffected +inmate +mineral +impending +meditation +ideas +miniaturizes +lewdly +title +youthfulness +creak +Chippewa +clamored +freezes +forgivably +reduce +McGovern +Nazis +epistle +socializes +conceptions +Kevin +uncovering +chews +appendixes +appendixes +appendixes +appendixes +appendixes +appendixes +raining +infest +compartment +minting +ducks +roped +waltz +Lillian +repressions +chillingly +noncritical +lithograph +spongers +parenthood +posed +instruments +filial +fixedly +relives +Pandora +watering +ungrateful +secures +chastisers +icon +reuniting +imagining +abiding +omnisciently +Britannic +scholastics +mechanics +humidly +masterpiece +however +Mendelian +jarred +scolds +infatuate +willed +joyfully +Microsoft +fibrosities +Baltimorean +equestrian +Goodrich +apish +Adlerian +Tropez +nouns +distracting +mutton +bridgeable +stickers +transcontinental +amateurish +Gandhian +stratified +chamberlains +creditably +philosophic +ores +Carleton +tape +afloat +goodness +welcoming +Pinsky +halting +bibliography +decoding +variance +allowed +dire +dub +poisoning +Iraqis +heaving +population +bomb +Majorca +Gershwins +explorers +libretto +occurred +Lagos +rats +bankruptcies +crying +unexpected +accessed +colorful +versatility +cosy +Darius +mastering +Asiaticizations +offerers +uncles +sleepwalk +Ernestine +checksumming +stopped +sicker +Italianization +alphabetic +pharmaceutic +creator +chess +charcoal +Epiphany +bulldozes +Pygmalion +caressing +Palestine +regimented +scars +realest +diffusing +clubroom +Blythe +ahead +reviver +retransmitting +landslide +Eiffel +absentee +aye +forked +Peruvianizes +clerked +tutor +boulevard +shuttered +quotes +Caltech +Mossberg +kept +roundly +features +imaginable +controller +racial +uprisings +narrowed +cannot +vest +famine +sugars +exterminated +belays +Hodges +translatable +duality +recording +rouses +poison +attitude +dusted +encompasses +presentation +Kantian +imprecision +saving +maternal +hewed +kerosene +Cubans +photographers +nymph +bedlam +north +Schoenberg +botany +curs +solidification +inheritresses +stiller +t1 +suite +ransomer +Willy +Rena +Seattle +relaxes +exclaim +exclaim +implicated +distinguish +assayed +homeowner +and +stealth +coinciding +founder +environing +jewelry +lemons +brokenness +bedpost +assurers +annoyers +affixed +warbling +seriously +boasted +Chantilly +Iranizes +violinist +extramarital +spates +cloakroom +gazer +hand +tucked +gems +clinker +refiner +callus +leopards +comfortingly +generically +getters +sexually +spear +serums +Italianization +attendants +spies +Anthony +planar +cupped +cleanser +commuters +honeysuckle +orphanage +skies +crushers +Puritan +squeezer +bruises +bonfire +Colombo +nondecreasing +DELETE FROM t2 WHERE fld3="r%"; +SELECT fld3 FROM t2; +fld3 +Omaha +breaking +Romans +intercepted +bewilderingly +astound +admonishing +sumac +flanking +combed +subjective +scatterbrain +Eulerian +dubbed +Kane +overlay +perturb +goblins +annihilates +Wotan +snatching +concludes +laterally +yelped +grazing +Baird +celery +misunderstander +handgun +foldout +mystic +succumbed +Nabisco +fingerings +aging +afield +ammonium +boat +intelligibility +Augustine +teethe +dreaded +scholastics +audiology +wallet +parters +eschew +quitter +neat +Steinberg +jarring +tinily +balled +persist +attainments +fanatic +measures +rightfulness +capably +impulsive +starlet +terminators +untying +announces +featherweight +pessimist +daughter +decliner +lawgiver +stated +readable +attrition +cascade +motors +interrogate +pests +stairway +dopers +testicle +Parsifal +leavings +postulation +squeaking +contrasted +leftover +whiteners +erases +Punjab +Merritt +Quixotism +sweetish +dogging +scornfully +bellow +bills +cupboard +sureties +puddings +tapestry +fetters +bivalves +incurring +Adolph +pithed +emergency +Miles +trimmings +tragedies +skulking +flint +flopping +relaxing +offload +suites +lists +animized +multilayer +standardizes +Judas +vacuuming +dentally +humanness +inch +Weissmuller +irresponsibly +luckily +culled +medical +bloodbath +subschema +animals +Micronesia +repetitions +Antares +ventilate +pityingly +interdependent +Graves +neonatal +scribbled +chafe +honoring +realtor +elite +funereal +abrogating +sorters +Conley +lectured +Abraham +Hawaii +cage +hushes +Simla +reporters +Dutchman +descendants +groupings +dissociate +coexist +Beebe +Taoism +Connally +fetched +checkpoints +rusting +galling +obliterates +traitor +resumes +analyzable +terminator +gritty +firearm +minima +Selfridge +disable +witchcraft +betroth +Manhattanize +imprint +peeked +swelling +interrelationships +riser +Gandhian +peacock +bee +kanji +dental +scarf +chasm +insolence +syndicate +alike +imperial +convulsion +railway +validate +normalizes +comprehensive +chewing +denizen +schemer +chronicle +Kline +Anatole +partridges +brunch +recruited +dimensions +Chicana +announced +praised +employing +linear +quagmire +western +relishing +serving +scheduling +lore +eventful +arteriole +disentangle +cured +Fenton +avoidable +drains +detectably +husky +impelling +undoes +evened +squeezes +destroyer +rudeness +beaner +boorish +Everhart +encompass +mushrooms +Alison +externally +pellagra +cult +creek +Huffman +Majorca +governing +gadfly +reassigned +intentness +craziness +psychic +squabbled +burlesque +capped +extracted +DiMaggio +exclamation +subdirectory +fangs +buyer +pithing +transistorizing +nonbiodegradable +dislocate +monochromatic +batting +postcondition +catalog +Remus +devices +bike +qualify +detained +commended +civilize +Elmhurst +anesthetizing +deaf +Brigham +title +coarse +combinations +grayness +innumerable +Caroline +fatty +eastbound +inexperienced +hoarder +scotch +passport +strategic +gated +flog +Pipestone +Dar +Corcoran +flyers +competitions +suppliers +skips +institutes +troop +connective +denies +polka +observations +askers +homeless +Anna +subdirectories +decaying +outwitting +Harpy +crazed +suffocate +provers +technically +Franklinizations +considered +tinnily +uninterruptedly +whistled +automate +gutting +surreptitious +Choctaw +cooks +millivolt +counterpoise +Gothicism +feminine +metaphysically +sanding +contributorily +receivers +adjourn +straggled +druggists +thanking +ostrich +hopelessness +Eurydice +excitation +presumes +imaginable +concoct +peering +Phelps +ferociousness +sentences +unlocks +engrossing +Ruth +tying +exclaimers +synergy +Huey +merging +judges +Shylock +Miltonism +hen +honeybee +towers +dilutes +numerals +democracy +Ibero- +invalids +behavior +accruing +relics +rackets +Fischbein +phony +cross +cleanup +conspirator +label +university +cleansed +ballgown +starlet +aqueous +portrayal +despising +distort +palmed +faced +silverware +assessor +spiders +artificially +reminiscence +Mexican +obnoxious +fragile +apprehensible +births +garages +panty +anteater +displacement +drovers +patenting +far +shrieks +aligning +pragmatism +fevers +reexamines +occupancies +sweats +modulators +demand +Madeira +Viennese +chillier +wildcats +gentle +Angles +accuracies +toggle +Mendelssohn +behaviorally +Rochford +mirror +Modula +clobbering +chronography +Eskimoizeds +British +pitfalls +verify +scatter +Aztecan +acuity +sinking +beasts +Witt +physicists +folksong +strokes +crowder +merry +cadenced +alimony +principled +golfing +undiscovered +irritates +patriots +rooms +towering +displease +photosensitive +inking +gainers +leaning +hydrant +preserve +blinded +interactions +Barry +whiteness +pastimes +Edenization +Muscat +assassinated +labeled +glacial +implied +bibliographies +Buchanan +forgivably +innuendo +den +submarines +mouthful +expiring +unfulfilled +precession +nullified +affects +Cynthia +Chablis +betterments +advertising +rubies +southwest +superstitious +tabernacle +silk +handsomest +Persian +analog +complex +Taoist +suspend +relegated +awesome +Bruxelles +imprecisely +televise +braking +true +disappointing +navally +circus +beetles +trumps +fourscore +Blackfoots +Grady +quiets +floundered +profundity +Garrisonian +Strauss +cemented +contrition +mutations +exhibits +tits +mate +arches +Moll +ropers +bombast +difficultly +adsorption +definiteness +cultivation +heals +Heusen +target +cited +congresswoman +Katherine +titter +aspire +Mardis +Nadia +estimating +stuck +fifteenth +Colombo +survey +staffing +obtain +loaded +slaughtered +lights +circumference +dull +weekly +wetness +visualized +Tannenbaum +moribund +demultiplex +lockings +thugs +unnerves +abut +Chippewa +stratifications +signaled +Italianizes +algorithmic +paranoid +camping +signifying +Patrice +search +Angeles +semblance +taxed +Beatrice +retrace +lockout +grammatic +helmsman +uniform +hamming +disobedience +captivated +transferals +cartographer +aims +Pakistani +burglarized +saucepans +lacerating +corny +megabytes +chancellor +bulk +commits +meson +deputies +northeaster +dipole +machining +therefore +Telefunken +salvaging +Corinthianizes +restlessly +bromides +generalized +mishaps +quelling +spiritual +beguiles +Trobriand +fleeing +Armour +chin +provers +aeronautic +voltage +sash +anaerobic +simultaneous +accumulating +Medusan +shouted +freakish +index +commercially +mistiness +endpoint +straight +flurried +denotative +coming +commencements +gentleman +gifted +Shanghais +sportswriting +sloping +navies +leaflet +shooter +Joplin +babies +subdivision +burstiness +belted +assails +admiring +swaying +Goldstine +fitting +Norwalk +weakening +analogy +deludes +cokes +Clayton +exhausts +causality +sating +icon +throttles +communicants +dehydrate +priceless +publicly +incidentals +commonplace +mumbles +furthermore +cautioned +parametrized +registration +sadly +positioning +babysitting +eternal +hoarder +congregates +rains +workers +sags +unplug +garage +boulder +hollowly +specifics +Teresa +Winsett +convenient +buckboards +amenities +resplendent +priding +configurations +untidiness +Brice +sews +participated +Simon +certificates +Fitzpatrick +Evanston +misted +textures +save +count +rightful +chaperone +Lizzy +clenched +effortlessly +accessed +beaters +Hornblower +vests +indulgences +infallibly +unwilling +excrete +spools +crunches +overestimating +ineffective +humiliation +sophomore +star +rifles +dialysis +arriving +indulge +clockers +languages +Antarctica +percentage +ceiling +specification +regimented +ciphers +pictures +serpents +allot +realized +mayoral +opaquely +hostess +fiftieth +incorrectly +decomposition +stranglings +mixture +electroencephalography +similarities +charges +freest +Greenberg +tinting +expelled +warm +smoothed +deductions +Romano +bitterroot +corset +securing +environing +cute +Crays +heiress +inform +avenge +universals +Kinsey +ravines +bestseller +equilibrium +extents +relatively +pressure +critiques +befouled +rightfully +mechanizing +Latinizes +timesharing +Aden +embassies +males +shapelessly +genres +mastering +Newtonian +finishers +abates +teem +kiting +stodgy +scalps +feed +guitars +airships +store +denounces +Pyle +Saxony +serializations +Peruvian +taxonomically +kingdom +stint +Sault +faithful +Ganymede +tidiness +gainful +contrary +Tipperary +tropics +theorizers +renew +already +terminal +Hegelian +hypothesizer +warningly +journalizing +nested +Lars +saplings +foothill +labeled +imperiously +reporters +furnishings +precipitable +discounts +excises +Stalin +despot +ripeness +Arabia +unruly +mournfulness +boom +slaughter +Sabine +handy +rural +organizer +shipyard +civics +inaccuracy +rules +juveniles +comprised +investigations +stabilizes +seminaries +Hunter +sporty +test +weasels +CERN +tempering +afore +Galatean +techniques +error +veranda +severely +Cassites +forthcoming +guides +vanish +lied +sawtooth +fated +gradually +widens +preclude +Jobrel +hooker +rainstorm +disconnects +cruelty +exponentials +affective +arteries +Crosby +acquaint +evenhandedly +percentage +disobedience +humility +gleaning +petted +bloater +minion +marginal +apiary +measures +precaution +repelled +primary +coverings +Artemia +navigate +spatial +Gurkha +meanwhile +Melinda +Butterfield +Aldrich +previewing +glut +unaffected +inmate +mineral +impending +meditation +ideas +miniaturizes +lewdly +title +youthfulness +creak +Chippewa +clamored +freezes +forgivably +reduce +McGovern +Nazis +epistle +socializes +conceptions +Kevin +uncovering +chews +appendixes +appendixes +appendixes +appendixes +appendixes +appendixes +raining +infest +compartment +minting +ducks +roped +waltz +Lillian +repressions +chillingly +noncritical +lithograph +spongers +parenthood +posed +instruments +filial +fixedly +relives +Pandora +watering +ungrateful +secures +chastisers +icon +reuniting +imagining +abiding +omnisciently +Britannic +scholastics +mechanics +humidly +masterpiece +however +Mendelian +jarred +scolds +infatuate +willed +joyfully +Microsoft +fibrosities +Baltimorean +equestrian +Goodrich +apish +Adlerian +Tropez +nouns +distracting +mutton +bridgeable +stickers +transcontinental +amateurish +Gandhian +stratified +chamberlains +creditably +philosophic +ores +Carleton +tape +afloat +goodness +welcoming +Pinsky +halting +bibliography +decoding +variance +allowed +dire +dub +poisoning +Iraqis +heaving +population +bomb +Majorca +Gershwins +explorers +libretto +occurred +Lagos +rats +bankruptcies +crying +unexpected +accessed +colorful +versatility +cosy +Darius +mastering +Asiaticizations +offerers +uncles +sleepwalk +Ernestine +checksumming +stopped +sicker +Italianization +alphabetic +pharmaceutic +creator +chess +charcoal +Epiphany +bulldozes +Pygmalion +caressing +Palestine +regimented +scars +realest +diffusing +clubroom +Blythe +ahead +reviver +retransmitting +landslide +Eiffel +absentee +aye +forked +Peruvianizes +clerked +tutor +boulevard +shuttered +quotes +Caltech +Mossberg +kept +roundly +features +imaginable +controller +racial +uprisings +narrowed +cannot +vest +famine +sugars +exterminated +belays +Hodges +translatable +duality +recording +rouses +poison +attitude +dusted +encompasses +presentation +Kantian +imprecision +saving +maternal +hewed +kerosene +Cubans +photographers +nymph +bedlam +north +Schoenberg +botany +curs +solidification +inheritresses +stiller +t1 +suite +ransomer +Willy +Rena +Seattle +relaxes +exclaim +exclaim +implicated +distinguish +assayed +homeowner +and +stealth +coinciding +founder +environing +jewelry +lemons +brokenness +bedpost +assurers +annoyers +affixed +warbling +seriously +boasted +Chantilly +Iranizes +violinist +extramarital +spates +cloakroom +gazer +hand +tucked +gems +clinker +refiner +callus +leopards +comfortingly +generically +getters +sexually +spear +serums +Italianization +attendants +spies +Anthony +planar +cupped +cleanser +commuters +honeysuckle +orphanage +skies +crushers +Puritan +squeezer +bruises +bonfire +Colombo +nondecreasing +DELETE FROM t2 WHERE fld3="d%" ORDER BY RAND(); +SELECT fld3 FROM t2; +fld3 +Omaha +breaking +Romans +intercepted +bewilderingly +astound +admonishing +sumac +flanking +combed +subjective +scatterbrain +Eulerian +dubbed +Kane +overlay +perturb +goblins +annihilates +Wotan +snatching +concludes +laterally +yelped +grazing +Baird +celery +misunderstander +handgun +foldout +mystic +succumbed +Nabisco +fingerings +aging +afield +ammonium +boat +intelligibility +Augustine +teethe +dreaded +scholastics +audiology +wallet +parters +eschew +quitter +neat +Steinberg +jarring +tinily +balled +persist +attainments +fanatic +measures +rightfulness +capably +impulsive +starlet +terminators +untying +announces +featherweight +pessimist +daughter +decliner +lawgiver +stated +readable +attrition +cascade +motors +interrogate +pests +stairway +dopers +testicle +Parsifal +leavings +postulation +squeaking +contrasted +leftover +whiteners +erases +Punjab +Merritt +Quixotism +sweetish +dogging +scornfully +bellow +bills +cupboard +sureties +puddings +tapestry +fetters +bivalves +incurring +Adolph +pithed +emergency +Miles +trimmings +tragedies +skulking +flint +flopping +relaxing +offload +suites +lists +animized +multilayer +standardizes +Judas +vacuuming +dentally +humanness +inch +Weissmuller +irresponsibly +luckily +culled +medical +bloodbath +subschema +animals +Micronesia +repetitions +Antares +ventilate +pityingly +interdependent +Graves +neonatal +scribbled +chafe +honoring +realtor +elite +funereal +abrogating +sorters +Conley +lectured +Abraham +Hawaii +cage +hushes +Simla +reporters +Dutchman +descendants +groupings +dissociate +coexist +Beebe +Taoism +Connally +fetched +checkpoints +rusting +galling +obliterates +traitor +resumes +analyzable +terminator +gritty +firearm +minima +Selfridge +disable +witchcraft +betroth +Manhattanize +imprint +peeked +swelling +interrelationships +riser +Gandhian +peacock +bee +kanji +dental +scarf +chasm +insolence +syndicate +alike +imperial +convulsion +railway +validate +normalizes +comprehensive +chewing +denizen +schemer +chronicle +Kline +Anatole +partridges +brunch +recruited +dimensions +Chicana +announced +praised +employing +linear +quagmire +western +relishing +serving +scheduling +lore +eventful +arteriole +disentangle +cured +Fenton +avoidable +drains +detectably +husky +impelling +undoes +evened +squeezes +destroyer +rudeness +beaner +boorish +Everhart +encompass +mushrooms +Alison +externally +pellagra +cult +creek +Huffman +Majorca +governing +gadfly +reassigned +intentness +craziness +psychic +squabbled +burlesque +capped +extracted +DiMaggio +exclamation +subdirectory +fangs +buyer +pithing +transistorizing +nonbiodegradable +dislocate +monochromatic +batting +postcondition +catalog +Remus +devices +bike +qualify +detained +commended +civilize +Elmhurst +anesthetizing +deaf +Brigham +title +coarse +combinations +grayness +innumerable +Caroline +fatty +eastbound +inexperienced +hoarder +scotch +passport +strategic +gated +flog +Pipestone +Dar +Corcoran +flyers +competitions +suppliers +skips +institutes +troop +connective +denies +polka +observations +askers +homeless +Anna +subdirectories +decaying +outwitting +Harpy +crazed +suffocate +provers +technically +Franklinizations +considered +tinnily +uninterruptedly +whistled +automate +gutting +surreptitious +Choctaw +cooks +millivolt +counterpoise +Gothicism +feminine +metaphysically +sanding +contributorily +receivers +adjourn +straggled +druggists +thanking +ostrich +hopelessness +Eurydice +excitation +presumes +imaginable +concoct +peering +Phelps +ferociousness +sentences +unlocks +engrossing +Ruth +tying +exclaimers +synergy +Huey +merging +judges +Shylock +Miltonism +hen +honeybee +towers +dilutes +numerals +democracy +Ibero- +invalids +behavior +accruing +relics +rackets +Fischbein +phony +cross +cleanup +conspirator +label +university +cleansed +ballgown +starlet +aqueous +portrayal +despising +distort +palmed +faced +silverware +assessor +spiders +artificially +reminiscence +Mexican +obnoxious +fragile +apprehensible +births +garages +panty +anteater +displacement +drovers +patenting +far +shrieks +aligning +pragmatism +fevers +reexamines +occupancies +sweats +modulators +demand +Madeira +Viennese +chillier +wildcats +gentle +Angles +accuracies +toggle +Mendelssohn +behaviorally +Rochford +mirror +Modula +clobbering +chronography +Eskimoizeds +British +pitfalls +verify +scatter +Aztecan +acuity +sinking +beasts +Witt +physicists +folksong +strokes +crowder +merry +cadenced +alimony +principled +golfing +undiscovered +irritates +patriots +rooms +towering +displease +photosensitive +inking +gainers +leaning +hydrant +preserve +blinded +interactions +Barry +whiteness +pastimes +Edenization +Muscat +assassinated +labeled +glacial +implied +bibliographies +Buchanan +forgivably +innuendo +den +submarines +mouthful +expiring +unfulfilled +precession +nullified +affects +Cynthia +Chablis +betterments +advertising +rubies +southwest +superstitious +tabernacle +silk +handsomest +Persian +analog +complex +Taoist +suspend +relegated +awesome +Bruxelles +imprecisely +televise +braking +true +disappointing +navally +circus +beetles +trumps +fourscore +Blackfoots +Grady +quiets +floundered +profundity +Garrisonian +Strauss +cemented +contrition +mutations +exhibits +tits +mate +arches +Moll +ropers +bombast +difficultly +adsorption +definiteness +cultivation +heals +Heusen +target +cited +congresswoman +Katherine +titter +aspire +Mardis +Nadia +estimating +stuck +fifteenth +Colombo +survey +staffing +obtain +loaded +slaughtered +lights +circumference +dull +weekly +wetness +visualized +Tannenbaum +moribund +demultiplex +lockings +thugs +unnerves +abut +Chippewa +stratifications +signaled +Italianizes +algorithmic +paranoid +camping +signifying +Patrice +search +Angeles +semblance +taxed +Beatrice +retrace +lockout +grammatic +helmsman +uniform +hamming +disobedience +captivated +transferals +cartographer +aims +Pakistani +burglarized +saucepans +lacerating +corny +megabytes +chancellor +bulk +commits +meson +deputies +northeaster +dipole +machining +therefore +Telefunken +salvaging +Corinthianizes +restlessly +bromides +generalized +mishaps +quelling +spiritual +beguiles +Trobriand +fleeing +Armour +chin +provers +aeronautic +voltage +sash +anaerobic +simultaneous +accumulating +Medusan +shouted +freakish +index +commercially +mistiness +endpoint +straight +flurried +denotative +coming +commencements +gentleman +gifted +Shanghais +sportswriting +sloping +navies +leaflet +shooter +Joplin +babies +subdivision +burstiness +belted +assails +admiring +swaying +Goldstine +fitting +Norwalk +weakening +analogy +deludes +cokes +Clayton +exhausts +causality +sating +icon +throttles +communicants +dehydrate +priceless +publicly +incidentals +commonplace +mumbles +furthermore +cautioned +parametrized +registration +sadly +positioning +babysitting +eternal +hoarder +congregates +rains +workers +sags +unplug +garage +boulder +hollowly +specifics +Teresa +Winsett +convenient +buckboards +amenities +resplendent +priding +configurations +untidiness +Brice +sews +participated +Simon +certificates +Fitzpatrick +Evanston +misted +textures +save +count +rightful +chaperone +Lizzy +clenched +effortlessly +accessed +beaters +Hornblower +vests +indulgences +infallibly +unwilling +excrete +spools +crunches +overestimating +ineffective +humiliation +sophomore +star +rifles +dialysis +arriving +indulge +clockers +languages +Antarctica +percentage +ceiling +specification +regimented +ciphers +pictures +serpents +allot +realized +mayoral +opaquely +hostess +fiftieth +incorrectly +decomposition +stranglings +mixture +electroencephalography +similarities +charges +freest +Greenberg +tinting +expelled +warm +smoothed +deductions +Romano +bitterroot +corset +securing +environing +cute +Crays +heiress +inform +avenge +universals +Kinsey +ravines +bestseller +equilibrium +extents +relatively +pressure +critiques +befouled +rightfully +mechanizing +Latinizes +timesharing +Aden +embassies +males +shapelessly +genres +mastering +Newtonian +finishers +abates +teem +kiting +stodgy +scalps +feed +guitars +airships +store +denounces +Pyle +Saxony +serializations +Peruvian +taxonomically +kingdom +stint +Sault +faithful +Ganymede +tidiness +gainful +contrary +Tipperary +tropics +theorizers +renew +already +terminal +Hegelian +hypothesizer +warningly +journalizing +nested +Lars +saplings +foothill +labeled +imperiously +reporters +furnishings +precipitable +discounts +excises +Stalin +despot +ripeness +Arabia +unruly +mournfulness +boom +slaughter +Sabine +handy +rural +organizer +shipyard +civics +inaccuracy +rules +juveniles +comprised +investigations +stabilizes +seminaries +Hunter +sporty +test +weasels +CERN +tempering +afore +Galatean +techniques +error +veranda +severely +Cassites +forthcoming +guides +vanish +lied +sawtooth +fated +gradually +widens +preclude +Jobrel +hooker +rainstorm +disconnects +cruelty +exponentials +affective +arteries +Crosby +acquaint +evenhandedly +percentage +disobedience +humility +gleaning +petted +bloater +minion +marginal +apiary +measures +precaution +repelled +primary +coverings +Artemia +navigate +spatial +Gurkha +meanwhile +Melinda +Butterfield +Aldrich +previewing +glut +unaffected +inmate +mineral +impending +meditation +ideas +miniaturizes +lewdly +title +youthfulness +creak +Chippewa +clamored +freezes +forgivably +reduce +McGovern +Nazis +epistle +socializes +conceptions +Kevin +uncovering +chews +appendixes +appendixes +appendixes +appendixes +appendixes +appendixes +raining +infest +compartment +minting +ducks +roped +waltz +Lillian +repressions +chillingly +noncritical +lithograph +spongers +parenthood +posed +instruments +filial +fixedly +relives +Pandora +watering +ungrateful +secures +chastisers +icon +reuniting +imagining +abiding +omnisciently +Britannic +scholastics +mechanics +humidly +masterpiece +however +Mendelian +jarred +scolds +infatuate +willed +joyfully +Microsoft +fibrosities +Baltimorean +equestrian +Goodrich +apish +Adlerian +Tropez +nouns +distracting +mutton +bridgeable +stickers +transcontinental +amateurish +Gandhian +stratified +chamberlains +creditably +philosophic +ores +Carleton +tape +afloat +goodness +welcoming +Pinsky +halting +bibliography +decoding +variance +allowed +dire +dub +poisoning +Iraqis +heaving +population +bomb +Majorca +Gershwins +explorers +libretto +occurred +Lagos +rats +bankruptcies +crying +unexpected +accessed +colorful +versatility +cosy +Darius +mastering +Asiaticizations +offerers +uncles +sleepwalk +Ernestine +checksumming +stopped +sicker +Italianization +alphabetic +pharmaceutic +creator +chess +charcoal +Epiphany +bulldozes +Pygmalion +caressing +Palestine +regimented +scars +realest +diffusing +clubroom +Blythe +ahead +reviver +retransmitting +landslide +Eiffel +absentee +aye +forked +Peruvianizes +clerked +tutor +boulevard +shuttered +quotes +Caltech +Mossberg +kept +roundly +features +imaginable +controller +racial +uprisings +narrowed +cannot +vest +famine +sugars +exterminated +belays +Hodges +translatable +duality +recording +rouses +poison +attitude +dusted +encompasses +presentation +Kantian +imprecision +saving +maternal +hewed +kerosene +Cubans +photographers +nymph +bedlam +north +Schoenberg +botany +curs +solidification +inheritresses +stiller +t1 +suite +ransomer +Willy +Rena +Seattle +relaxes +exclaim +exclaim +implicated +distinguish +assayed +homeowner +and +stealth +coinciding +founder +environing +jewelry +lemons +brokenness +bedpost +assurers +annoyers +affixed +warbling +seriously +boasted +Chantilly +Iranizes +violinist +extramarital +spates +cloakroom +gazer +hand +tucked +gems +clinker +refiner +callus +leopards +comfortingly +generically +getters +sexually +spear +serums +Italianization +attendants +spies +Anthony +planar +cupped +cleanser +commuters +honeysuckle +orphanage +skies +crushers +Puritan +squeezer +bruises +bonfire +Colombo +nondecreasing +DROP TABLE t1; +ALTER TABLE t2 RENAME t1 +#; +DROP TABLE t1; +CREATE TABLE t1 ( +Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, +Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL +) ENGINE = CSV; +INSERT INTO t1 VALUES (9410,9412); +select period from t1; +period +9410 +drop table if exists t1,t2,t3,t4; +Warnings: +Note 1051 Unknown table 't2' +Note 1051 Unknown table 't3' +Note 1051 Unknown table 't4' diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result index 2a59f976156..3793e962d40 100644 --- a/mysql-test/r/ctype_cp1251.result +++ b/mysql-test/r/ctype_cp1251.result @@ -49,8 +49,8 @@ a b aaa bbb select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1; charset(a) charset(b) charset(binary 'ccc') -cp1251 binary cp1251 +cp1251 binary binary select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1; collation(a) collation(b) collation(binary 'ccc') -cp1251_bin binary cp1251_bin +cp1251_bin binary binary drop table t1; diff --git a/mysql-test/r/ctype_create.result b/mysql-test/r/ctype_create.result index 0da76c556e2..b35131f62a4 100644 --- a/mysql-test/r/ctype_create.result +++ b/mysql-test/r/ctype_create.result @@ -54,4 +54,12 @@ t1 CREATE TABLE `t1` ( `a` char(10) collate latin1_german1_ci default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci DROP TABLE t1; +create table t1 (a char) character set latin1 character set latin2; +ERROR HY000: Conflicting declarations: 'CHARACTER SET latin1' and 'CHARACTER SET latin2' +create table t1 (a char) character set latin1 collate latin2_bin; +ERROR 42000: COLLATION 'latin2_bin' is not valid for CHARACTER SET 'latin1' +create database d1 default character set latin1 character set latin2; +ERROR HY000: Conflicting declarations: 'CHARACTER SET latin1' and 'CHARACTER SET latin2' +create database d1 default character set latin1 collate latin2_bin; +ERROR 42000: COLLATION 'latin2_bin' is not valid for CHARACTER SET 'latin1' DROP DATABASE mysqltest1; diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result index 69cf1d722ff..1ef185388a8 100644 --- a/mysql-test/r/ctype_recoding.result +++ b/mysql-test/r/ctype_recoding.result @@ -136,6 +136,30 @@ SET character_set_connection=binary; SELECT 'тест' as s; s тест +SET NAMES latin1; +CREATE TABLE t1 (`` CHAR(128) DEFAULT '', `1` ENUM('1','2') DEFAULT '2'); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `` char(128) default '', + `1` enum('1','2') default '2' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra + char(128) YES +1 enum('1','2') YES 2 +SET NAMES binary; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `ä` char(128) default 'ä', + `ä1` enum('ä1','ä2') default 'ä2' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +ä char(128) YES ä +ä1 enum('ä1','ä2') YES ä2 +DROP TABLE t1; SET NAMES binary; CREATE TABLE `good` (a int); ERROR HY000: Invalid utf8 character string: '' diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result index 2fd654da434..94fe15fed26 100644 --- a/mysql-test/r/ctype_uca.result +++ b/mysql-test/r/ctype_uca.result @@ -1548,6 +1548,116 @@ Z,z,Ź,ź,Ż,ż ǁ ǂ ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovak_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Á,Â,Ã,Å,à,á,â,ã,å,Ā,ā,Ă,ă,Ą,ą,Ǎ,ǎ,Ǟ,ǟ,Ǡ,ǡ,Ǻ,ǻ +AA,Aa,aA,aa +Ä,ä +Æ,æ,Ǣ,ǣ,Ǽ,ǽ +B,b +ƀ +Ɓ +Ƃ,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,Ċ,ċ +cH +Č,č +Ƈ,ƈ +D,d,Ď,ď +DZ,Dz,dZ,dz,DŽ,Dž,dž,DZ,Dz,dz +Đ,đ +Ɖ +Ɗ +Ƌ,ƌ +Ð,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ē,ē,Ĕ,ĕ,Ė,ė,Ę,ę,Ě,ě +Ǝ,ǝ +Ə +Ɛ +F,f +Ƒ,ƒ +G,g,Ĝ,ĝ,Ğ,ğ,Ġ,ġ,Ģ,ģ,Ǧ,ǧ,Ǵ,ǵ +Ǥ,ǥ +Ɠ +Ɣ +Ƣ,ƣ +H,h,Ĥ,ĥ +CH,Ch,ch +ƕ,Ƕ +Ħ,ħ +I,i,Ì,Í,Î,Ï,ì,í,î,ï,Ĩ,ĩ,Ī,ī,Ĭ,ĭ,Į,į,İ,Ǐ,ǐ +IJ,Ij,iJ,ij,IJ,ij +ı +Ɨ +Ɩ +J,j,Ĵ,ĵ,ǰ +K,k,Ķ,ķ,Ǩ,ǩ +Ƙ,ƙ +L,l,Ĺ,ĺ,Ļ,ļ,Ľ,ľ +Ŀ,ŀ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Ł,ł +ƚ +ƛ +M,m +N,n,Ñ,ñ,Ń,ń,Ņ,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,NJ,Nj,nj +Ɲ +ƞ +Ŋ,ŋ +O,o,Ò,Ó,Õ,Ö,ò,ó,õ,ö,Ō,ō,Ŏ,ŏ,Ő,ő,Ơ,ơ,Ǒ,ǒ,Ǫ,ǫ,Ǭ,ǭ +OE,Oe,oE,oe,Œ,œ +Ô,ô +Ø,ø,Ǿ,ǿ +Ɔ +Ɵ +P,p +Ƥ,ƥ +Q,q +ĸ +R,r,Ŕ,ŕ,Ŗ,ŗ,Ř,ř +RR,Rr,rR,rr +Ʀ +S,s,Ś,ś,Ŝ,ŝ,Ş,ş,ſ +SS,Ss,sS,ss,ß +Š,š +Ʃ +ƪ +T,t,Ţ,ţ,Ť,ť +ƾ +Ŧ,ŧ +ƫ +Ƭ,ƭ +Ʈ +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,ũ,Ū,ū,Ŭ,ŭ,Ů,ů,Ű,ű,Ų,ų,Ư,ư,Ǔ,ǔ,Ǖ,ǖ,Ǘ,ǘ,Ǚ,ǚ,Ǜ,ǜ +Ɯ +Ʊ +V,v +Ʋ +W,w,Ŵ,ŵ +X,x +Y,y,Ý,ý,ÿ,Ŷ,ŷ,Ÿ +Ƴ,ƴ +Z,z,Ź,ź,Ż,ż +ƍ +Ž,ž +Ƶ,ƶ +Ʒ,Ǯ,ǯ +Ƹ,ƹ +ƺ +Þ,þ +ƿ,Ƿ +ƻ +Ƨ,ƨ +Ƽ,ƽ +Ƅ,ƅ +ʼn +ǀ +ǁ +ǂ +ǃ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish2_ci; group_concat(c1 order by c1) ÷ diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 4ab8cc83d0c..a0ac29b7989 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -464,3 +464,19 @@ HEX(a) AAAA 000AAAAA DROP TABLE t1; +create table t1 (s1 char character set `ucs2` collate `ucs2_czech_ci`); +insert into t1 values ('0'),('1'),('2'),('a'),('b'),('c'); +select s1 from t1 where s1 > 'a' order by s1; +s1 +b +c +drop table t1; +create table t1(a char(1)) default charset = ucs2; +insert into t1 values ('a'),('b'),('c'); +alter table t1 modify a char(5); +select a, hex(a) from t1; +a hex(a) +a 0061 +b 0062 +c 0063 +drop table t1; diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index b8ca99fe8f1..f3be539251a 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1,4 +1,4 @@ -drop table if exists t1; +drop table if exists t1,t2; set names utf8; select left(_utf8 0xD0B0D0B1D0B2,1); left(_utf8 0xD0B0D0B1D0B2,1) @@ -78,6 +78,21 @@ SELECT 'a\t' < 'a'; SELECT 'a\t' < 'a '; 'a\t' < 'a ' 1 +SELECT 'a' = 'a ' collate utf8_bin; +'a' = 'a ' collate utf8_bin +1 +SELECT 'a\0' < 'a' collate utf8_bin; +'a\0' < 'a' collate utf8_bin +1 +SELECT 'a\0' < 'a ' collate utf8_bin; +'a\0' < 'a ' collate utf8_bin +1 +SELECT 'a\t' < 'a' collate utf8_bin; +'a\t' < 'a' collate utf8_bin +1 +SELECT 'a\t' < 'a ' collate utf8_bin; +'a\t' < 'a ' collate utf8_bin +1 CREATE TABLE t1 (a char(10) character set utf8 not null); INSERT INTO t1 VALUES ('a'),('a\0'),('a\t'),('a '); SELECT hex(a),STRCMP(a,'a'), STRCMP(a,'a ') FROM t1; @@ -93,6 +108,9 @@ this is a test select insert("aa",100,1,"b"),insert("aa",1,3,"b"); insert("aa",100,1,"b") insert("aa",1,3,"b") aa b +select char_length(left(@a:='тест',5)), length(@a), @a; +char_length(left(@a:='тест',5)) length(@a) @a +4 8 тест create table t1 select date_format("2004-01-19 10:10:10", "%Y-%m-%d"); show create table t1; Table Create Table @@ -243,3 +261,381 @@ select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8_unicode_ci); ALTER TABLE t1 ADD COLUMN b CHAR(20); DROP TABLE t1; +set names utf8; +create table t1 (a enum('aaaa','проба') character set utf8); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` enum('aaaa','проба') character set utf8 default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 values ('проба'); +select * from t1; +a +проба +create table t2 select ifnull(a,a) from t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ifnull(a,a)` char(5) character set utf8 default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from t2; +ifnull(a,a) +проба +drop table t1; +drop table t2; +create table t1 (c varchar(30) character set utf8, unique(c(10))); +insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z'); +insert into t1 values ('aaaaaaaaaa'); +insert into t1 values ('aaaaaaaaaaa'); +ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 1 +insert into t1 values ('aaaaaaaaaaaa'); +ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 1 +insert into t1 values (repeat('b',20)); +select c c1 from t1 where c='1'; +c1 +1 +select c c2 from t1 where c='2'; +c2 +2 +select c c3 from t1 where c='3'; +c3 +3 +select c cx from t1 where c='x'; +cx +x +select c cy from t1 where c='y'; +cy +y +select c cz from t1 where c='z'; +cz +z +select c ca10 from t1 where c='aaaaaaaaaa'; +ca10 +aaaaaaaaaa +select c cb20 from t1 where c=repeat('b',20); +cb20 +bbbbbbbbbbbbbbbbbbbb +drop table t1; +create table t1 (c char(3) character set utf8, unique (c(2))); +insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z'); +insert into t1 values ('a'); +insert into t1 values ('aa'); +insert into t1 values ('aaa'); +ERROR 23000: Duplicate entry 'aaa' for key 1 +insert into t1 values ('b'); +insert into t1 values ('bb'); +insert into t1 values ('bbb'); +ERROR 23000: Duplicate entry 'bbb' for key 1 +insert into t1 values ('а'); +insert into t1 values ('аа'); +insert into t1 values ('ааа'); +ERROR 23000: Duplicate entry 'ааа' for key 1 +insert into t1 values ('б'); +insert into t1 values ('бб'); +insert into t1 values ('ббб'); +ERROR 23000: Duplicate entry 'ббб' for key 1 +insert into t1 values ('ꪪ'); +insert into t1 values ('ꪪꪪ'); +insert into t1 values ('ꪪꪪꪪ'); +ERROR 23000: Duplicate entry 'ꪪꪪ' for key 1 +drop table t1; +create table t1 ( +c char(10) character set utf8, +unique key a using hash (c(1)) +) engine=heap; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(10) character set utf8 default NULL, + UNIQUE KEY `a` (`c`(1)) +) ENGINE=HEAP DEFAULT CHARSET=latin1 +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +insert into t1 values ('aa'); +ERROR 23000: Duplicate entry 'aa' for key 1 +insert into t1 values ('aaa'); +ERROR 23000: Duplicate entry 'aaa' for key 1 +insert into t1 values ('б'); +insert into t1 values ('бб'); +ERROR 23000: Duplicate entry 'б' for key 1 +insert into t1 values ('ббб'); +ERROR 23000: Duplicate entry 'б' for key 1 +select c as c_all from t1 order by c; +c_all +a +b +c +d +e +f +б +select c as c_a from t1 where c='a'; +c_a +a +select c as c_a from t1 where c='б'; +c_a +б +drop table t1; +create table t1 ( +c char(10) character set utf8, +unique key a using btree (c(1)) +) engine=heap; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(10) character set utf8 default NULL, + UNIQUE KEY `a` TYPE BTREE (`c`(1)) +) ENGINE=HEAP DEFAULT CHARSET=latin1 +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +insert into t1 values ('aa'); +ERROR 23000: Duplicate entry 'aa' for key 1 +insert into t1 values ('aaa'); +ERROR 23000: Duplicate entry 'aaa' for key 1 +insert into t1 values ('б'); +insert into t1 values ('бб'); +ERROR 23000: Duplicate entry 'б' for key 1 +insert into t1 values ('ббб'); +ERROR 23000: Duplicate entry 'б' for key 1 +select c as c_all from t1 order by c; +c_all +a +b +c +d +e +f +б +select c as c_a from t1 where c='a'; +c_a +a +select c as c_a from t1 where c='б'; +c_a +б +drop table t1; +create table t1 ( +c char(10) character set utf8, +unique key a (c(1)) +) engine=bdb; +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +insert into t1 values ('aa'); +ERROR 23000: Duplicate entry 'aa' for key 1 +insert into t1 values ('aaa'); +ERROR 23000: Duplicate entry 'aaa' for key 1 +insert into t1 values ('б'); +insert into t1 values ('бб'); +ERROR 23000: Duplicate entry 'б' for key 1 +insert into t1 values ('ббб'); +ERROR 23000: Duplicate entry 'б' for key 1 +select c as c_all from t1 order by c; +c_all +a +b +c +d +e +f +б +select c as c_a from t1 where c='a'; +c_a +a +select c as c_a from t1 where c='б'; +c_a +б +drop table t1; +create table t1 (c varchar(30) character set utf8 collate utf8_bin, unique(c(10))); +insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z'); +insert into t1 values ('aaaaaaaaaa'); +insert into t1 values ('aaaaaaaaaaa'); +ERROR 23000: Duplicate entry 'aaaaaaaaaaa' for key 1 +insert into t1 values ('aaaaaaaaaaaa'); +ERROR 23000: Duplicate entry 'aaaaaaaaaaaa' for key 1 +insert into t1 values (repeat('b',20)); +select c c1 from t1 where c='1'; +c1 +1 +select c c2 from t1 where c='2'; +c2 +2 +select c c3 from t1 where c='3'; +c3 +3 +select c cx from t1 where c='x'; +cx +x +select c cy from t1 where c='y'; +cy +y +select c cz from t1 where c='z'; +cz +z +select c ca10 from t1 where c='aaaaaaaaaa'; +ca10 +aaaaaaaaaa +select c cb20 from t1 where c=repeat('b',20); +cb20 +bbbbbbbbbbbbbbbbbbbb +drop table t1; +create table t1 (c char(3) character set utf8 collate utf8_bin, unique (c(2))); +insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z'); +insert into t1 values ('a'); +insert into t1 values ('aa'); +insert into t1 values ('aaa'); +ERROR 23000: Duplicate entry 'aaa' for key 1 +insert into t1 values ('b'); +insert into t1 values ('bb'); +insert into t1 values ('bbb'); +ERROR 23000: Duplicate entry 'bbb' for key 1 +insert into t1 values ('а'); +insert into t1 values ('аа'); +insert into t1 values ('ааа'); +ERROR 23000: Duplicate entry 'ааа' for key 1 +insert into t1 values ('б'); +insert into t1 values ('бб'); +insert into t1 values ('ббб'); +ERROR 23000: Duplicate entry 'ббб' for key 1 +insert into t1 values ('ꪪ'); +insert into t1 values ('ꪪꪪ'); +insert into t1 values ('ꪪꪪꪪ'); +ERROR 23000: Duplicate entry 'ꪪꪪ' for key 1 +drop table t1; +create table t1 ( +c char(10) character set utf8 collate utf8_bin, +unique key a using hash (c(1)) +) engine=heap; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(10) character set utf8 collate utf8_bin default NULL, + UNIQUE KEY `a` (`c`(1)) +) ENGINE=HEAP DEFAULT CHARSET=latin1 +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +insert into t1 values ('aa'); +ERROR 23000: Duplicate entry 'aa' for key 1 +insert into t1 values ('aaa'); +ERROR 23000: Duplicate entry 'aaa' for key 1 +insert into t1 values ('б'); +insert into t1 values ('бб'); +ERROR 23000: Duplicate entry 'б' for key 1 +insert into t1 values ('ббб'); +ERROR 23000: Duplicate entry 'б' for key 1 +select c as c_all from t1 order by c; +c_all +a +b +c +d +e +f +б +select c as c_a from t1 where c='a'; +c_a +a +select c as c_a from t1 where c='б'; +c_a +б +drop table t1; +create table t1 ( +c char(10) character set utf8 collate utf8_bin, +unique key a using btree (c(1)) +) engine=heap; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(10) character set utf8 collate utf8_bin default NULL, + UNIQUE KEY `a` TYPE BTREE (`c`(1)) +) ENGINE=HEAP DEFAULT CHARSET=latin1 +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +insert into t1 values ('aa'); +ERROR 23000: Duplicate entry 'aa' for key 1 +insert into t1 values ('aaa'); +ERROR 23000: Duplicate entry 'aaa' for key 1 +insert into t1 values ('б'); +insert into t1 values ('бб'); +ERROR 23000: Duplicate entry 'б' for key 1 +insert into t1 values ('ббб'); +ERROR 23000: Duplicate entry 'б' for key 1 +select c as c_all from t1 order by c; +c_all +a +b +c +d +e +f +б +select c as c_a from t1 where c='a'; +c_a +a +select c as c_a from t1 where c='б'; +c_a +б +drop table t1; +create table t1 ( +c char(10) character set utf8 collate utf8_bin, +unique key a (c(1)) +) engine=bdb; +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +insert into t1 values ('aa'); +ERROR 23000: Duplicate entry 'aa' for key 1 +insert into t1 values ('aaa'); +ERROR 23000: Duplicate entry 'aaa' for key 1 +insert into t1 values ('б'); +insert into t1 values ('бб'); +ERROR 23000: Duplicate entry 'б' for key 1 +insert into t1 values ('ббб'); +ERROR 23000: Duplicate entry 'б' for key 1 +select c as c_all from t1 order by c; +c_all +a +b +c +d +e +f +б +select c as c_a from t1 where c='a'; +c_a +a +select c as c_a from t1 where c='б'; +c_a +б +drop table t1; +create table t1 ( +str varchar(255) character set utf8 not null, +key str (str(2)) +) engine=myisam; +INSERT INTO t1 VALUES ('str'); +INSERT INTO t1 VALUES ('str2'); +select * from t1 where str='str'; +str +str +drop table t1; +create table t1 ( +str varchar(255) character set utf8 not null, +key str using btree (str(2)) +) engine=heap; +INSERT INTO t1 VALUES ('str'); +INSERT INTO t1 VALUES ('str2'); +select * from t1 where str='str'; +str +str +drop table t1; +create table t1 ( +str varchar(255) character set utf8 not null, +key str using hash (str(2)) +) engine=heap; +INSERT INTO t1 VALUES ('str'); +INSERT INTO t1 VALUES ('str2'); +select * from t1 where str='str'; +str +str +drop table t1; +create table t1 ( +str varchar(255) character set utf8 not null, +key str (str(2)) +) engine=bdb; +INSERT INTO t1 VALUES ('str'); +INSERT INTO t1 VALUES ('str2'); +select * from t1 where str='str'; +str +str +drop table t1; diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 6a4935ef3f8..758a83defed 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -90,16 +90,23 @@ insert into t1 values ('2003-01-02 11:11:12Pm', '%Y-%m-%d %h:%i:%S%p'), ('10:20:10', '%H:%i:%s'), ('10:20:10', '%h:%i:%s.%f'), +('10:20:10', '%T'), ('10:20:10AM', '%h:%i:%s%p'), +('10:20:10AM', '%r'), ('10:20:10.44AM', '%h:%i:%s.%f%p'), ('15-01-2001 12:59:58', '%d-%m-%Y %H:%i:%S'), ('15 September 2001', '%d %M %Y'), ('15 SEPTEMB 2001', '%d %M %Y'), ('15 MAY 2001', '%d %b %Y'), +('15th May 2001', '%D %b %Y'), ('Sunday 15 MAY 2001', '%W %d %b %Y'), ('Sund 15 MAY 2001', '%W %d %b %Y'), ('Tuesday 00 2002', '%W %U %Y'), ('Thursday 53 1998', '%W %u %Y'), +('Sunday 01 2001', '%W %v %x'), +('Tuesday 52 2001', '%W %V %X'), +('060 2004', '%j %Y'), +('4 53 1998', '%w %u %Y'), ('15-01-2001', '%d-%m-%Y %H:%i:%S'), ('15-01-20', '%d-%m-%y'), ('15-2001-1', '%d-%Y-%c'); @@ -114,16 +121,23 @@ date format str_to_date 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12 10:20:10 %H:%i:%s 0000-00-00 10:20:10 10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10 +10:20:10 %T 0000-00-00 10:20:10 10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10 +10:20:10AM %r 0000-00-00 10:20:10 10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58 15 September 2001 %d %M %Y 2001-09-15 00:00:00 15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00 15 MAY 2001 %d %b %Y 2001-05-15 00:00:00 +15th May 2001 %D %b %Y 2001-05-15 00:00:00 Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 Tuesday 00 2002 %W %U %Y 2002-01-01 00:00:00 Thursday 53 1998 %W %u %Y 1998-12-31 00:00:00 +Sunday 01 2001 %W %v %x 2001-01-07 00:00:00 +Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00 +060 2004 %j %Y 2004-02-29 00:00:00 +4 53 1998 %w %u %Y 1998-12-31 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00 15-01-20 %d-%m-%y 2020-01-15 00:00:00 15-2001-1 %d-%Y-%c 2001-01-15 00:00:00 @@ -138,16 +152,23 @@ date format con 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12 10:20:10 %H:%i:%s 0000-00-00 10:20:10 10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10 +10:20:10 %T 0000-00-00 10:20:10 10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10 +10:20:10AM %r 0000-00-00 10:20:10 10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58 15 September 2001 %d %M %Y 2001-09-15 00:00:00 15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00 15 MAY 2001 %d %b %Y 2001-05-15 00:00:00 +15th May 2001 %D %b %Y 2001-05-15 00:00:00 Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 Tuesday 00 2002 %W %U %Y 2002-01-01 00:00:00 Thursday 53 1998 %W %u %Y 1998-12-31 00:00:00 +Sunday 01 2001 %W %v %x 2001-01-07 00:00:00 +Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00 +060 2004 %j %Y 2004-02-29 00:00:00 +4 53 1998 %w %u %Y 1998-12-31 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00 15-01-20 %d-%m-%y 2020-01-15 00:00:00 15-2001-1 %d-%Y-%c 2001-01-15 00:00:00 @@ -162,16 +183,23 @@ date format datetime 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12 10:20:10 %H:%i:%s 0000-00-00 10:20:10 10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10 +10:20:10 %T 0000-00-00 10:20:10 10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10 +10:20:10AM %r 0000-00-00 10:20:10 10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58 15 September 2001 %d %M %Y 2001-09-15 00:00:00 15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00 15 MAY 2001 %d %b %Y 2001-05-15 00:00:00 +15th May 2001 %D %b %Y 2001-05-15 00:00:00 Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 00:00:00 Tuesday 00 2002 %W %U %Y 2002-01-01 00:00:00 Thursday 53 1998 %W %u %Y 1998-12-31 00:00:00 +Sunday 01 2001 %W %v %x 2001-01-07 00:00:00 +Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00 +060 2004 %j %Y 2004-02-29 00:00:00 +4 53 1998 %w %u %Y 1998-12-31 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00 15-01-20 %d-%m-%y 2020-01-15 00:00:00 15-2001-1 %d-%Y-%c 2001-01-15 00:00:00 @@ -186,16 +214,23 @@ date format date2 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 10:20:10 %H:%i:%s 0000-00-00 10:20:10 %h:%i:%s.%f 0000-00-00 +10:20:10 %T 0000-00-00 10:20:10AM %h:%i:%s%p 0000-00-00 +10:20:10AM %r 0000-00-00 10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 15 September 2001 %d %M %Y 2001-09-15 15 SEPTEMB 2001 %d %M %Y 2001-09-15 15 MAY 2001 %d %b %Y 2001-05-15 +15th May 2001 %D %b %Y 2001-05-15 Sunday 15 MAY 2001 %W %d %b %Y 2001-05-15 Sund 15 MAY 2001 %W %d %b %Y 2001-05-15 Tuesday 00 2002 %W %U %Y 2002-01-01 Thursday 53 1998 %W %u %Y 1998-12-31 +Sunday 01 2001 %W %v %x 2001-01-07 +Tuesday 52 2001 %W %V %X 2002-01-01 +060 2004 %j %Y 2004-02-29 +4 53 1998 %w %u %Y 1998-12-31 15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 15-01-20 %d-%m-%y 2020-01-15 15-2001-1 %d-%Y-%c 2001-01-15 @@ -210,16 +245,23 @@ date format time 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12 10:20:10 %H:%i:%s 10:20:10 10:20:10 %h:%i:%s.%f 10:20:10 +10:20:10 %T 10:20:10 10:20:10AM %h:%i:%s%p 10:20:10 +10:20:10AM %r 10:20:10 10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58 15 September 2001 %d %M %Y 00:00:00 15 SEPTEMB 2001 %d %M %Y 00:00:00 15 MAY 2001 %d %b %Y 00:00:00 +15th May 2001 %D %b %Y 00:00:00 Sunday 15 MAY 2001 %W %d %b %Y 00:00:00 Sund 15 MAY 2001 %W %d %b %Y 00:00:00 Tuesday 00 2002 %W %U %Y 00:00:00 Thursday 53 1998 %W %u %Y 00:00:00 +Sunday 01 2001 %W %v %x 00:00:00 +Tuesday 52 2001 %W %V %X 00:00:00 +060 2004 %j %Y 00:00:00 +4 53 1998 %w %u %Y 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00 15-01-20 %d-%m-%y 00:00:00 15-2001-1 %d-%Y-%c 00:00:00 @@ -234,16 +276,23 @@ date format time2 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12 10:20:10 %H:%i:%s 10:20:10 10:20:10 %h:%i:%s.%f 10:20:10 +10:20:10 %T 10:20:10 10:20:10AM %h:%i:%s%p 10:20:10 +10:20:10AM %r 10:20:10 10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58 15 September 2001 %d %M %Y 00:00:00 15 SEPTEMB 2001 %d %M %Y 00:00:00 15 MAY 2001 %d %b %Y 00:00:00 +15th May 2001 %D %b %Y 00:00:00 Sunday 15 MAY 2001 %W %d %b %Y 00:00:00 Sund 15 MAY 2001 %W %d %b %Y 00:00:00 Tuesday 00 2002 %W %U %Y 00:00:00 Thursday 53 1998 %W %u %Y 00:00:00 +Sunday 01 2001 %W %v %x 00:00:00 +Tuesday 52 2001 %W %V %X 00:00:00 +060 2004 %j %Y 00:00:00 +4 53 1998 %w %u %Y 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00 15-01-20 %d-%m-%y 00:00:00 15-2001-1 %d-%Y-%c 00:00:00 @@ -258,10 +307,13 @@ insert into t1 values ('15 Septembei 2001', '%d %M %Y'), ('15 Ju 2001', '%d %M %Y'), ('Sund 15 MA', '%W %d %b %Y'), -('Sunday 01 2001', '%W %V %X'), ('Thursdai 12 1998', '%W %u %Y'), -(NULL, get_format(DATE,'USA')), -('Tuesday 52 2001', '%W %V %X'); +('Sunday 01 2001', '%W %v %X'), +('Tuesday 52 2001', '%W %V %x'), +('Tuesday 52 2001', '%W %V %Y'), +('Tuesday 52 2001', '%W %u %x'), +('7 53 1998', '%w %u %Y'), +(NULL, get_format(DATE,'USA')); select date,format,str_to_date(date, format) as str_to_date from t1; date format str_to_date 2003-01-02 10:11:12 PM %Y-%m-%d %H:%i:%S %p NULL @@ -273,10 +325,13 @@ date format str_to_date 15 Septembei 2001 %d %M %Y NULL 15 Ju 2001 %d %M %Y NULL Sund 15 MA %W %d %b %Y NULL -Sunday 01 2001 %W %V %X NULL Thursdai 12 1998 %W %u %Y NULL +Sunday 01 2001 %W %v %X NULL +Tuesday 52 2001 %W %V %x NULL +Tuesday 52 2001 %W %V %Y NULL +Tuesday 52 2001 %W %u %x NULL +7 53 1998 %w %u %Y NULL NULL %m.%d.%Y NULL -Tuesday 52 2001 %W %V %X NULL select date,format,concat(str_to_date(date, format),'') as con from t1; date format con 2003-01-02 10:11:12 PM %Y-%m-%d %H:%i:%S %p NULL @@ -288,10 +343,13 @@ date format con 15 Septembei 2001 %d %M %Y NULL 15 Ju 2001 %d %M %Y NULL Sund 15 MA %W %d %b %Y NULL -Sunday 01 2001 %W %V %X NULL Thursdai 12 1998 %W %u %Y NULL +Sunday 01 2001 %W %v %X NULL +Tuesday 52 2001 %W %V %x NULL +Tuesday 52 2001 %W %V %Y NULL +Tuesday 52 2001 %W %u %x NULL +7 53 1998 %w %u %Y NULL NULL %m.%d.%Y NULL -Tuesday 52 2001 %W %V %X NULL truncate table t1; insert into t1 values ('10:20:10AM', '%h:%i:%s'), @@ -321,6 +379,9 @@ a select get_format(DATETIME, 'eur') as a; a %Y-%m-%d %H.%i.%s +select get_format(TIMESTAMP, 'eur') as a; +a +%Y-%m-%d %H.%i.%s select get_format(DATE, 'TEST') as a; a NULL diff --git a/mysql-test/r/endspace.result b/mysql-test/r/endspace.result index 4800bbf4ecb..96210a0e16d 100644 --- a/mysql-test/r/endspace.result +++ b/mysql-test/r/endspace.result @@ -52,13 +52,13 @@ select * from t1 ignore key (key1) where text1='teststring' or text1 like 'tests text1 teststring teststring -select * from t1 where text1='teststring' or text1 like 'teststring_%'; -text1 -teststring -teststring -select * from t1 where text1='teststring' or text1 > 'teststring\t'; -text1 -teststring +select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%'; +concat('|', text1, '|') +|teststring | +|teststring| +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; +concat('|', text1, '|') +|teststring| select text1, length(text1) from t1 order by text1; text1 length(text1) nothing 7 @@ -77,7 +77,28 @@ concat('|', text1, '|') |teststring| |teststring | |teststring | +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; +concat('|', text1, '|') +|teststring| +|teststring | +select concat('|', text1, '|') from t1 where text1='teststring'; +concat('|', text1, '|') +|teststring| +select concat('|', text1, '|') from t1 where text1='teststring '; +concat('|', text1, '|') +|teststring | alter table t1 modify text1 text not null, pack_keys=1; +select concat('|', text1, '|') from t1 where text1='teststring'; +concat('|', text1, '|') +|teststring| +|teststring | +select concat('|', text1, '|') from t1 where text1='teststring '; +concat('|', text1, '|') +|teststring| +|teststring | +explain select concat('|', text1, '|') from t1 where text1='teststring '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range key1 key1 22 NULL 2 Using where select * from t1 where text1 like 'teststring_%'; text1 teststring @@ -87,10 +108,10 @@ text1 teststring teststring teststring -select * from t1 where text1='teststring' or text1 > 'teststring\t'; -text1 -teststring -teststring +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; +concat('|', text1, '|') +|teststring| +|teststring | select concat('|', text1, '|') from t1 order by text1; concat('|', text1, '|') |nothing| diff --git a/mysql-test/r/exampledb.result b/mysql-test/r/exampledb.result new file mode 100644 index 00000000000..9bfb77c1c0b --- /dev/null +++ b/mysql-test/r/exampledb.result @@ -0,0 +1,6 @@ +drop table if exists t1; +CREATE TABLE t1 ( +Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, +Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL +) ENGINE=example; +drop table t1; diff --git a/mysql-test/r/flush_block_commit.result b/mysql-test/r/flush_block_commit.result new file mode 100644 index 00000000000..17991f15382 --- /dev/null +++ b/mysql-test/r/flush_block_commit.result @@ -0,0 +1,23 @@ +drop table if exists t1; +create table t1 (a int) engine=innodb; +begin; +insert into t1 values(1); +flush tables with read lock; +select * from t1; +a + commit; +select * from t1; +a +unlock tables; +begin; +select * from t1 for update; +a +1 +begin; + select * from t1 for update; + flush tables with read lock; +commit; +a +1 +unlock tables; +drop table t1; diff --git a/mysql-test/r/fulltext2.result b/mysql-test/r/fulltext2.result index 0fdb7d4dbd1..0b1d8eb9a15 100644 --- a/mysql-test/r/fulltext2.result +++ b/mysql-test/r/fulltext2.result @@ -7,6 +7,15 @@ FULLTEXT KEY (a) repair table t1 quick; Table Op Msg_type Msg_text test.t1 repair status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK select count(*) from t1 where match a against ('aaaxxx'); count(*) 260 diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index b64f0ca57dd..665f9262dea 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -18,7 +18,7 @@ explain extended select grp,group_concat(c) from t1 group by grp; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using filesort Warnings: -Note 1003 select `test`.`t1`.`grp` AS `grp`,group_concat(`test`.`t1`.`c` seperator ',') AS `group_concat(c)` from `test`.`t1` group by `test`.`t1`.`grp` +Note 1003 select `test`.`t1`.`grp` AS `grp`,group_concat(`test`.`t1`.`c` separator ',') AS `group_concat(c)` from `test`.`t1` group by `test`.`t1`.`grp` select grp,group_concat(a,c) from t1 group by grp; grp group_concat(a,c) 1 1a @@ -93,7 +93,7 @@ explain extended select grp,group_concat(distinct c order by c desc) from t1 gro id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using filesort Warnings: -Note 1003 select `test`.`t1`.`grp` AS `grp`,group_concat(distinct `test`.`t1`.`c` order by `test`.`t1`.`c` seperator ',') AS `group_concat(distinct c order by c desc)` from `test`.`t1` group by `test`.`t1`.`grp` +Note 1003 select `test`.`t1`.`grp` AS `grp`,group_concat(distinct `test`.`t1`.`c` order by `test`.`t1`.`c` separator ',') AS `group_concat(distinct c order by c desc)` from `test`.`t1` group by `test`.`t1`.`grp` select grp,group_concat(c order by c separator ",") from t1 group by grp; grp group_concat(c order by c separator ",") 1 a @@ -113,7 +113,7 @@ explain extended select grp,group_concat(distinct c order by c separator ",") fr id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using filesort Warnings: -Note 1003 select `test`.`t1`.`grp` AS `grp`,group_concat(distinct `test`.`t1`.`c` order by `test`.`t1`.`c` seperator ',') AS `group_concat(distinct c order by c separator ",")` from `test`.`t1` group by `test`.`t1`.`grp` +Note 1003 select `test`.`t1`.`grp` AS `grp`,group_concat(distinct `test`.`t1`.`c` order by `test`.`t1`.`c` separator ',') AS `group_concat(distinct c order by c separator ",")` from `test`.`t1` group by `test`.`t1`.`grp` select grp,group_concat(distinct c order by c desc separator ",") from t1 group by grp; grp group_concat(distinct c order by c desc separator ",") 1 a @@ -294,6 +294,21 @@ grp select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a) desc) as grp from t1; grp 2,4,3,5 +select t1.a, group_concat(c order by (select c from t2 where t2.a=t1.a limit 1)) as grp from t1 group by 1; +a grp +1 2 +2 4,3 +3 5 +select t1.a, group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a)) as grp from t1 group by 1; +a grp +1 2 +2 4,3 +3 5 +select t1.a, group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a) desc) as grp from t1 group by 1; +a grp +1 2 +2 4,3 +3 5 select a,c,(select group_concat(c order by a) from t2 where a=t1.a) as grp from t1 order by grp; a c grp 3 5 3,3 @@ -321,3 +336,33 @@ HAVING LEFT(names, 1) ='J'; names John###Anna###Bill DROP TABLE t1; +CREATE TABLE t1 ( a int, b TEXT ); +INSERT INTO t1 VALUES (1,'First Row'), (2,'Second Row'); +SELECT GROUP_CONCAT(b ORDER BY b) FROM t1 GROUP BY a; +GROUP_CONCAT(b ORDER BY b) +First Row +Second Row +DROP TABLE t1; +CREATE TABLE t1 (a_id tinyint(4) NOT NULL default '0', PRIMARY KEY (a_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES (1),(2),(3); +CREATE TABLE t2 (b_id tinyint(4) NOT NULL default '0',b_a tinyint(4) NOT NULL default '0', PRIMARY KEY (b_id), KEY (b_a), +CONSTRAINT fk_b_a FOREIGN KEY (b_a) REFERENCES t1 (a_id) ON DELETE CASCADE ON UPDATE NO ACTION) ENGINE=InnoDB DEFAULT CHARSET=latin1; +INSERT INTO t2 VALUES (1,1),(2,1),(3,1),(4,2),(5,2); +SELECT * FROM (SELECT t1.*,GROUP_CONCAT(t2.b_id SEPARATOR ',') as b_list FROM (t1 LEFT JOIN (t2) on t1.a_id = t2.b_a) GROUP BY t1.a_id ) AS xyz; +a_id b_list +1 1,2,3 +2 4,5 +3 NULL +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 (A_ID INT NOT NULL,A_DESC CHAR(3) NOT NULL,PRIMARY KEY (A_ID)); +INSERT INTO t1 VALUES (1,'ABC'), (2,'EFG'), (3,'HIJ'); +CREATE TABLE t2 (A_ID INT NOT NULL,B_DESC CHAR(3) NOT NULL,PRIMARY KEY (A_ID,B_DESC)); +INSERT INTO t2 VALUES (1,'A'),(1,'B'),(3,'F'); +SELECT t1.A_ID, GROUP_CONCAT(t2.B_DESC) AS B_DESC FROM t1 LEFT JOIN t2 ON t1.A_ID=t2.A_ID GROUP BY t1.A_ID ORDER BY t1.A_DESC; +A_ID B_DESC +1 A,B +2 NULL +3 F +DROP TABLE t1; +DROP TABLE t2; diff --git a/mysql-test/r/func_if.result b/mysql-test/r/func_if.result index 36bd9a36d1c..307d1021cdb 100644 --- a/mysql-test/r/func_if.result +++ b/mysql-test/r/func_if.result @@ -43,7 +43,7 @@ explain extended select if(u=1,st,binary st) s from t1 where st like "%a%" order id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where; Using filesort Warnings: -Note 1003 select if((`test`.`t1`.`u` = 1),`test`.`t1`.`st`,(`test`.`t1`.`st` collate _latin1'BINARY')) AS `s` from `test`.`t1` where (`test`.`t1`.`st` like _latin1'%a%') order by if((`test`.`t1`.`u` = 1),`test`.`t1`.`st`,(`test`.`t1`.`st` collate _latin1'BINARY')) +Note 1003 select if((test.t1.u = 1),test.t1.st,cast(test.t1.st as char charset binary)) AS `s` from test.t1 where (test.t1.st like _latin1'%a%') order by if((test.t1.u = 1),test.t1.st,cast(test.t1.st as char charset binary)) select nullif(u=0, 'test') from t1; nullif(u=0, 'test') NULL diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index 025ea02e454..b132edab81d 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -148,6 +148,16 @@ id select_type table type possible_keys key key_len ref rows Extra Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (_latin1'a' in (`test`.`t1`.`a`,`test`.`t1`.`b`,(`test`.`t1`.`c` collate _latin1'latin1_bin'))) drop table t1; +set names utf8; +create table t1 (a char(10) character set utf8 not null); +insert into t1 values ('bbbb'),(_koi8r''),(_latin1''); +select a from t1 where a in ('bbbb',_koi8r'',_latin1'') order by a; +a +ÄÄÄÄ +bbbb +цццц +drop table t1; +set names latin1; select '1.0' in (1,2); '1.0' in (1,2) 1 diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result index e32a4dcd85a..e9434b1749d 100644 --- a/mysql-test/r/func_like.result +++ b/mysql-test/r/func_like.result @@ -155,3 +155,6 @@ select * from t1 where a like '%ESKA%'; a PPUH PESKA-I Maria Struniarska DROP TABLE t1; +select _cp866'aaaaaaaaa' like _cp866'%aaaa%' collate cp866_bin; +_cp866'aaaaaaaaa' like _cp866'%aaaa%' collate cp866_bin +1 diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 12eef4aa881..90aa04515d7 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -43,7 +43,7 @@ Warnings: Note 1003 select abs(-(10)) AS `abs(-10)`,sign(-(5)) AS `sign(-5)`,sign(5) AS `sign(5)`,sign(0) AS `sign(0)` select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2); log(exp(10)) exp(log(sqrt(10))*2) log(-1) log(NULL) log(1,1) log(3,9) log(-1,2) log(NULL,2) -10.000000 10.000000 NULL NULL NULL 2.000000 NULL NULL +10 10 NULL NULL NULL 2 NULL NULL explain extended select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used @@ -51,7 +51,7 @@ Warnings: Note 1003 select log(exp(10)) AS `log(exp(10))`,exp((log(sqrt(10)) * 2)) AS `exp(log(sqrt(10))*2)`,log(-(1)) AS `log(-1)`,log(NULL) AS `log(NULL)`,log(1,1) AS `log(1,1)`,log(3,9) AS `log(3,9)`,log(-(1),2) AS `log(-1,2)`,log(NULL,2) AS `log(NULL,2)` select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL); ln(exp(10)) exp(ln(sqrt(10))*2) ln(-1) ln(0) ln(NULL) -10.000000 10.000000 NULL NULL NULL +10 10 NULL NULL NULL explain extended select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used @@ -59,7 +59,7 @@ Warnings: Note 1003 select ln(exp(10)) AS `ln(exp(10))`,exp((ln(sqrt(10)) * 2)) AS `exp(ln(sqrt(10))*2)`,ln(-(1)) AS `ln(-1)`,ln(0) AS `ln(0)`,ln(NULL) AS `ln(NULL)` select log2(8),log2(15),log2(-2),log2(0),log2(NULL); log2(8) log2(15) log2(-2) log2(0) log2(NULL) -3.000000 3.906891 NULL NULL NULL +3 3.9068905956085 NULL NULL NULL explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used @@ -67,7 +67,7 @@ Warnings: Note 1003 select log2(8) AS `log2(8)`,log2(15) AS `log2(15)`,log2(-(2)) AS `log2(-2)`,log2(0) AS `log2(0)`,log2(NULL) AS `log2(NULL)` select log10(100),log10(18),log10(-4),log10(0),log10(NULL); log10(100) log10(18) log10(-4) log10(0) log10(NULL) -2.000000 1.255273 NULL NULL NULL +2 1.2552725051033 NULL NULL NULL explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used @@ -75,7 +75,7 @@ Warnings: Note 1003 select log10(100) AS `log10(100)`,log10(18) AS `log10(18)`,log10(-(4)) AS `log10(-4)`,log10(0) AS `log10(0)`,log10(NULL) AS `log10(NULL)` select pow(10,log10(10)),power(2,4); pow(10,log10(10)) power(2,4) -10.000000 16.000000 +10 16 explain extended select pow(10,log10(10)),power(2,4); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used @@ -90,35 +90,35 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select sql_no_cache rand(999999) AS `rand(999999)`,rand() AS `rand()` -select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1); -pi() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1) -3.141593 1.000000 0.000000 0.000000 0.64209262 1.570796 1.570796 0.785398 -explain extended select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1); +select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6); +pi() format(sin(pi()/2),6) format(cos(pi()/2),6) format(abs(tan(pi())),6) format(cot(1),6) format(asin(1),6) format(acos(0),6) format(atan(1),6) +3.141593 1.000000 0.000000 0.000000 0.642093 1.570796 1.570796 0.785398 +explain extended select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select pi() AS `pi()`,sin((pi() / 2)) AS `sin(pi()/2)`,cos((pi() / 2)) AS `cos(pi()/2)`,abs(tan(pi())) AS `abs(tan(pi()))`,(1 / tan(1)) AS `cot(1)`,asin(1) AS `asin(1)`,acos(0) AS `acos(0)`,atan(1) AS `atan(1)` +Note 1003 select pi() AS `pi()`,format(sin((pi() / 2)),6) AS `format(sin(pi()/2),6)`,format(cos((pi() / 2)),6) AS `format(cos(pi()/2),6)`,format(abs(tan(pi())),6) AS `format(abs(tan(pi())),6)`,format((1 / tan(1)),6) AS `format(cot(1),6)`,format(asin(1),6) AS `format(asin(1),6)`,format(acos(0),6) AS `format(acos(0),6)`,format(atan(1),6) AS `format(atan(1),6)` select degrees(pi()),radians(360); degrees(pi()) radians(360) 180 6.2831853071796 SELECT ACOS(1.0); ACOS(1.0) -0.000000 +0 SELECT ASIN(1.0); ASIN(1.0) -1.570796 +1.5707963267949 SELECT ACOS(0.2*5.0); ACOS(0.2*5.0) -0.000000 +0 SELECT ACOS(0.5*2.0); ACOS(0.5*2.0) -0.000000 +0 SELECT ASIN(0.8+0.2); ASIN(0.8+0.2) -1.570796 +1.5707963267949 SELECT ASIN(1.2-0.2); ASIN(1.2-0.2) -1.570796 +1.5707963267949 explain extended select degrees(pi()),radians(360); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result index 4918617f85f..2431406c128 100644 --- a/mysql-test/r/func_set.result +++ b/mysql-test/r/func_set.result @@ -41,8 +41,7 @@ interval(null, 1, 10, 100) -1 drop table if exists t1,t2; create table t1 (id int(10) not null unique); -create table t2 (id int(10) not null primary key, -val int(10) not null); +create table t2 (id int(10) not null primary key, val int(10) not null); insert into t1 values (1),(2),(4); insert into t2 values (1,1),(2,1),(3,1),(4,2); select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id; @@ -56,3 +55,12 @@ id elt(two.val,'one','two') 2 one 4 two drop table t1,t2; +select find_in_set(binary 'a',binary 'A,B,C'); +find_in_set(binary 'a',binary 'A,B,C') +0 +select find_in_set('a',binary 'A,B,C'); +find_in_set('a',binary 'A,B,C') +0 +select find_in_set(binary 'a', 'A,B,C'); +find_in_set(binary 'a', 'A,B,C') +0 diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index e07ee4f0add..7b2fc4b21a5 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -638,7 +638,7 @@ explain extended select md5('hello'), sha('abc'), sha1('abc'), soundex(''), 'moo id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select md5(_latin1'hello') AS `md5('hello')`,sha(_latin1'abc') AS `sha('abc')`,sha(_latin1'abc') AS `sha1('abc')`,soundex(_latin1'') AS `soundex('')`,(soundex(_latin1'mood') = soundex(_latin1'mud')) AS `'mood' sounds like 'mud'`,aes_decrypt(aes_encrypt(_latin1'abc',_latin1'1'),_latin1'1') AS `aes_decrypt(aes_encrypt('abc','1'),'1')`,concat(_latin1'*',repeat(_latin1' ',5),_latin1'*') AS `concat('*',space(5),'*')`,reverse(_latin1'abc') AS `reverse('abc')`,rpad(_latin1'a',4,_latin1'1') AS `rpad('a',4,'1')`,lpad(_latin1'a',4,_latin1'1') AS `lpad('a',4,'1')`,concat_ws(_latin1',',_latin1'',NULL,_latin1'a') AS `concat_ws(',','',NULL,'a')`,make_set(255,_latin2'a',_latin2'b',_latin2'c') AS `make_set(255,_latin2'a',_latin2'b',_latin2'c')`,elt(2,1) AS `elt(2,1)`,locate(_latin1'a',_latin1'b',2) AS `locate("a","b",2)`,format(130,10) AS `format(130,10)`,char(0) AS `char(0)`,conv(130,16,10) AS `conv(130,16,10)`,hex(130) AS `hex(130)`,(_latin1'HE' collate _latin1'BINARY') AS `binary 'HE'`,export_set(255,_latin2'y',_latin2'n',_latin2' ') AS `export_set(255,_latin2'y',_latin2'n',_latin2' ')`,field((_latin1'b' collate _latin1'latin1_bin'),_latin1'A',_latin1'B') AS `FIELD('b' COLLATE latin1_bin,'A','B')`,find_in_set(_latin1'B',_latin1'a,b,c,d') AS `FIND_IN_SET(_latin1'B',_latin1'a,b,c,d')`,collation(conv(130,16,10)) AS `collation(conv(130,16,10))`,coercibility(conv(130,16,10)) AS `coercibility(conv(130,16,10))`,length(_latin1'\n \r\0\\_\\%\\') AS `length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,concat(_latin1'monty',_latin1' was here ',_latin1'again') AS `concat('monty',' was here ','again')`,length(_latin1'hello') AS `length('hello')`,char(ascii(_latin1'h')) AS `char(ascii('h'))`,ord(_latin1'h') AS `ord('h')`,quote((1 / 0)) AS `quote(1/0)`,crc32(_latin1'123') AS `crc32("123")`,replace(_latin1'aaaa',_latin1'a',_latin1'b') AS `replace('aaaa','a','b')`,insert(_latin1'txs',2,1,_latin1'hi') AS `insert('txs',2,1,'hi')`,left(_latin2'a',1) AS `left(_latin2'a',1)`,right(_latin2'a',1) AS `right(_latin2'a',1)`,lcase(_latin2'a') AS `lcase(_latin2'a')`,ucase(_latin2'a') AS `ucase(_latin2'a')`,substr(_latin1'abcdefg',3,2) AS `SUBSTR('abcdefg',3,2)`,substr_index(_latin1'1abcd;2abcd;3abcd;4abcd',_latin1';',2) AS `substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2)`,trim(_latin2' a ') AS `trim(_latin2' a ')`,ltrim(_latin2' a ') AS `ltrim(_latin2' a ')`,rtrim(_latin2' a ') AS `rtrim(_latin2' a ')`,decode(encode(repeat(_latin1'a',100000))) AS `decode(encode(repeat("a",100000),"monty"),"monty")` +Note 1003 select md5(_latin1'hello') AS `md5('hello')`,sha(_latin1'abc') AS `sha('abc')`,sha(_latin1'abc') AS `sha1('abc')`,soundex(_latin1'') AS `soundex('')`,(soundex(_latin1'mood') = soundex(_latin1'mud')) AS `'mood' sounds like 'mud'`,aes_decrypt(aes_encrypt(_latin1'abc',_latin1'1'),_latin1'1') AS `aes_decrypt(aes_encrypt('abc','1'),'1')`,concat(_latin1'*',repeat(_latin1' ',5),_latin1'*') AS `concat('*',space(5),'*')`,reverse(_latin1'abc') AS `reverse('abc')`,rpad(_latin1'a',4,_latin1'1') AS `rpad('a',4,'1')`,lpad(_latin1'a',4,_latin1'1') AS `lpad('a',4,'1')`,concat_ws(_latin1',',_latin1'',NULL,_latin1'a') AS `concat_ws(',','',NULL,'a')`,make_set(255,_latin2'a',_latin2'b',_latin2'c') AS `make_set(255,_latin2'a',_latin2'b',_latin2'c')`,elt(2,1) AS `elt(2,1)`,locate(_latin1'a',_latin1'b',2) AS `locate("a","b",2)`,format(130,10) AS `format(130,10)`,char(0) AS `char(0)`,conv(130,16,10) AS `conv(130,16,10)`,hex(130) AS `hex(130)`,cast(_latin1'HE' as char charset binary) AS `binary 'HE'`,export_set(255,_latin2'y',_latin2'n',_latin2' ') AS `export_set(255,_latin2'y',_latin2'n',_latin2' ')`,field((_latin1'b' collate _latin1'latin1_bin'),_latin1'A',_latin1'B') AS `FIELD('b' COLLATE latin1_bin,'A','B')`,find_in_set(_latin1'B',_latin1'a,b,c,d') AS `FIND_IN_SET(_latin1'B',_latin1'a,b,c,d')`,collation(conv(130,16,10)) AS `collation(conv(130,16,10))`,coercibility(conv(130,16,10)) AS `coercibility(conv(130,16,10))`,length(_latin1'\n \r\0\\_\\%\\') AS `length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,concat(_latin1'monty',_latin1' was here ',_latin1'again') AS `concat('monty',' was here ','again')`,length(_latin1'hello') AS `length('hello')`,char(ascii(_latin1'h')) AS `char(ascii('h'))`,ord(_latin1'h') AS `ord('h')`,quote((1 / 0)) AS `quote(1/0)`,crc32(_latin1'123') AS `crc32("123")`,replace(_latin1'aaaa',_latin1'a',_latin1'b') AS `replace('aaaa','a','b')`,insert(_latin1'txs',2,1,_latin1'hi') AS `insert('txs',2,1,'hi')`,left(_latin2'a',1) AS `left(_latin2'a',1)`,right(_latin2'a',1) AS `right(_latin2'a',1)`,lcase(_latin2'a') AS `lcase(_latin2'a')`,ucase(_latin2'a') AS `ucase(_latin2'a')`,substr(_latin1'abcdefg',3,2) AS `SUBSTR('abcdefg',3,2)`,substr_index(_latin1'1abcd;2abcd;3abcd;4abcd',_latin1';',2) AS `substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2)`,trim(_latin2' a ') AS `trim(_latin2' a ')`,ltrim(_latin2' a ') AS `ltrim(_latin2' a ')`,rtrim(_latin2' a ') AS `rtrim(_latin2' a ')`,decode(encode(repeat(_latin1'a',100000))) AS `decode(encode(repeat("a",100000),"monty"),"monty")` SELECT lpad(12345, 5, "#"); lpad(12345, 5, "#") 12345 @@ -673,3 +673,6 @@ c1 c2 2147483647 4294967295 -2147483648 0 drop table t1; +select left(1234, 3) + 0; +left(1234, 3) + 0 +123 diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index d8ea18f9744..864d9d04ff5 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -466,3 +466,22 @@ insert IGNORE into t1 values ('Garbage'); ERROR HY000: Unknown error alter table t1 add spatial index(a); drop table t1; +create table t1(a geometry not null, spatial index(a)); +insert into t1 values +(GeomFromText('POINT(1 1)')), (GeomFromText('POINT(3 3)')), +(GeomFromText('POINT(4 4)')), (GeomFromText('POINT(6 6)')); +select AsText(a) from t1 where +MBRContains(GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) +or +MBRContains(GeomFromText('Polygon((2 2, 2 5, 5 5, 5 2, 2 2))'), a); +AsText(a) +POINT(1 1) +POINT(3 3) +POINT(4 4) +select AsText(a) from t1 where +MBRContains(GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) +and +MBRContains(GeomFromText('Polygon((0 0, 0 7, 7 7, 7 0, 0 0))'), a); +AsText(a) +POINT(1 1) +drop table t1; diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 5d18c3f483f..866c19155db 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -229,6 +229,25 @@ GRANT SELECT () ON ``.`` TO ''@'localhost' REVOKE SELECT () ON . FROM @localhost; DROP DATABASE ; SET NAMES latin1; +insert into mysql.user (host, user) values ('localhost', 'test11'); +insert into mysql.db (host, db, user, select_priv) values +('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); +alter table mysql.db order by db asc; +flush privileges; +show grants for test11@localhost; +Grants for test11@localhost +GRANT USAGE ON *.* TO 'test11'@'localhost' +GRANT SELECT ON `ab%`.* TO 'test11'@'localhost' +GRANT SELECT ON `a%`.* TO 'test11'@'localhost' +alter table mysql.db order by db desc; +flush privileges; +show grants for test11@localhost; +Grants for test11@localhost +GRANT USAGE ON *.* TO 'test11'@'localhost' +GRANT SELECT ON `ab%`.* TO 'test11'@'localhost' +GRANT SELECT ON `a%`.* TO 'test11'@'localhost' +delete from mysql.user where user='test11'; +delete from mysql.db where user='test11'; SHOW PRIVILEGES; Privilege Context Comment Alter Tables To alter the table diff --git a/mysql-test/r/have_csv.require b/mysql-test/r/have_csv.require new file mode 100644 index 00000000000..cc2fb28289c --- /dev/null +++ b/mysql-test/r/have_csv.require @@ -0,0 +1,2 @@ +Variable_name Value +have_csv YES diff --git a/mysql-test/r/have_exampledb.require b/mysql-test/r/have_exampledb.require new file mode 100644 index 00000000000..4b0938660fe --- /dev/null +++ b/mysql-test/r/have_exampledb.require @@ -0,0 +1,2 @@ +Variable_name Value +have_exampledb YES diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result index 0556aa3a2b7..2e94974e953 100644 --- a/mysql-test/r/having.result +++ b/mysql-test/r/having.result @@ -87,3 +87,44 @@ sqty 5 9 drop table t1; +CREATE TABLE t1 ( +`id` bigint(20) NOT NULL default '0', +`description` text +) ENGINE=MyISAM; +CREATE TABLE t2 ( +`id` bigint(20) NOT NULL default '0', +`description` varchar(20) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1, 'test'); +INSERT INTO t2 VALUES (1, 'test'); +CREATE TABLE t3 ( +`id` bigint(20) NOT NULL default '0', +`order_id` bigint(20) NOT NULL default '0' +) ENGINE=MyISAM; +select +a.id, a.description, +count(b.id) as c +from t1 a left join t3 b on a.id=b.order_id +group by a.id, a.description +having (a.description is not null) and (c=0); +id description c +1 test 0 +select +a.*, +count(b.id) as c +from t2 a left join t3 b on a.id=b.order_id +group by a.id, a.description +having (a.description is not null) and (c=0); +id description c +1 test 0 +INSERT INTO t1 VALUES (2, 'test2'); +select +a.id, a.description, +count(b.id) as c +from t1 a left join t3 b on a.id=b.order_id +group by a.id, a.description +having (a.description is not null) and (c=0); +id description c +1 test 0 +2 test2 0 +drop table t1,t2,t3; diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result index 6100301b2c6..a33d26f9efa 100644 --- a/mysql-test/r/heap.result +++ b/mysql-test/r/heap.result @@ -217,3 +217,13 @@ DELETE from t1 where a < 100; SELECT * from t1; a DROP TABLE t1; +CREATE TABLE `job_titles` ( +`job_title_id` int(6) unsigned NOT NULL default '0', +`job_title` char(18) NOT NULL default '', +PRIMARY KEY (`job_title_id`), +UNIQUE KEY `job_title_id` (`job_title_id`,`job_title`) +) ENGINE=HEAP; +SELECT MAX(job_title_id) FROM job_titles; +MAX(job_title_id) +NULL +DROP TABLE job_titles; diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index db9b051a58f..dc763472b0e 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -283,6 +283,12 @@ ID Value1 Value2 SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1; ID Value1 Value2 drop table t1,t2; +CREATE TABLE t1 (a int); +CREATE TABLE t2 (b int); +CREATE TABLE t3 (c int); +SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3; +a b c +DROP TABLE t1, t2, t3; create table t1 (i int); create table t2 (i int); create table t3 (i int); diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 7915521a9b7..ec377b92371 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -628,7 +628,7 @@ insert into t2 values (10,1),(20,2),(30,3); explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 index NULL PRIMARY 4 NULL 3 Using index -1 SIMPLE t1 eq_ref PRIMARY PRIMARY 2 const 1 Using index +1 SIMPLE t1 const PRIMARY PRIMARY 2 const 1 Using where; Using index select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; fooID barID fooID 10 1 NULL @@ -676,3 +676,72 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 2 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 drop table t1, t2, t3; +create table t1 ( +match_id tinyint(3) unsigned not null auto_increment, +home tinyint(3) unsigned default '0', +unique key match_id (match_id), +key match_id_2 (match_id) +); +insert into t1 values("1", "2"); +create table t2 ( +player_id tinyint(3) unsigned default '0', +match_1_h tinyint(3) unsigned default '0', +key player_id (player_id) +); +insert into t2 values("1", "5"); +insert into t2 values("2", "9"); +insert into t2 values("3", "3"); +insert into t2 values("4", "7"); +insert into t2 values("5", "6"); +insert into t2 values("6", "8"); +insert into t2 values("7", "4"); +insert into t2 values("8", "12"); +insert into t2 values("9", "11"); +insert into t2 values("10", "10"); +explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from +(t2 s left join t1 m on m.match_id = 1) +order by m.match_id desc; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE s ALL NULL NULL NULL NULL 10 +1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using where +explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from +(t2 s left join t1 m on m.match_id = 1) +order by UUX desc; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort +1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using where +select s.*, '*', m.*, (s.match_1_h - m.home) UUX from +(t2 s left join t1 m on m.match_id = 1) +order by UUX desc; +player_id match_1_h * match_id home UUX +8 12 * 1 2 10 +9 11 * 1 2 9 +10 10 * 1 2 8 +2 9 * 1 2 7 +6 8 * 1 2 6 +4 7 * 1 2 5 +5 6 * 1 2 4 +1 5 * 1 2 3 +7 4 * 1 2 2 +3 3 * 1 2 1 +explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from +t2 s straight_join t1 m where m.match_id = 1 +order by UUX desc; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort +1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using where +select s.*, '*', m.*, (s.match_1_h - m.home) UUX from +t2 s straight_join t1 m where m.match_id = 1 +order by UUX desc; +player_id match_1_h * match_id home UUX +8 12 * 1 2 10 +9 11 * 1 2 9 +10 10 * 1 2 8 +2 9 * 1 2 7 +6 8 * 1 2 6 +4 7 * 1 2 5 +5 6 * 1 2 4 +1 5 * 1 2 3 +7 4 * 1 2 2 +3 3 * 1 2 1 +drop table t1, t2; diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index dd03ef73883..bb553825caa 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -76,13 +76,12 @@ CCident varchar(50) DEFAULT '' NOT NULL, PRIMARY KEY (name,author,category) ); INSERT INTO t1 VALUES -('patnom','patauteur',0,'p.favre@cryo-networks.fr',NULL,NULL,'#p2sndnq6ae5g1u6t','essai\nsalut','scol://195.242.78.119:patauteur.patnom',NULL,NULL,NULL,950036174,-882087474,NULL,3,0,3,'1','Pub/patnom/futur_divers.scs',NULL,'pat','CC1'); +('patnom','patauteur',0,'p.favre@cryo-networks.fr',NULL,NULL,'#p2sndnq6ae5g1u6t','essai salut','scol://195.242.78.119:patauteur.patnom',NULL,NULL,NULL,950036174,-882087474,NULL,3,0,3,'1','Pub/patnom/futur_divers.scs',NULL,'pat','CC1'); INSERT INTO t1 VALUES ('LeNomDeMonSite','Marc',0,'m.barilley@cryo-networks.fr',NULL,NULL,NULL,NULL,'scol://195.242.78.119:Marc.LeNomDeMonSite',NULL,NULL,NULL,950560434,-881563214,NULL,3,0,3,'1','Pub/LeNomDeMonSite/domus_hibere.scs',NULL,'Marq','CC1'); select * from t1 where name='patnom' and author='patauteur' and category=0; name author category email password proxy bitmap msg urlscol urlhttp timeout nbcnx creation livinguntil lang type subcat subtype reg scs capacity userISP CCident -patnom patauteur 0 p.favre@cryo-networks.fr NULL NULL #p2sndnq6ae5g1u6t essai -salut scol://195.242.78.119:patauteur.patnom NULL NULL NULL 950036174 -882087474 NULL 3 0 3 1 Pub/patnom/futur_divers.scs NULL pat CC1 +patnom patauteur 0 p.favre@cryo-networks.fr NULL NULL #p2sndnq6ae5g1u6t essai salut scol://195.242.78.119:patauteur.patnom NULL NULL NULL 950036174 -882087474 NULL 3 0 3 1 Pub/patnom/futur_divers.scs NULL pat CC1 drop table t1; create table t1 ( @@ -235,3 +234,36 @@ SELECT numeropost FROM t1 WHERE numreponse='1'; numeropost 1 drop table t1; +create table t1 (c varchar(30) character set utf8, t text character set utf8, unique (c(2)), unique (t(3))) engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` varchar(30) character set utf8 default NULL, + `t` text character set utf8, + UNIQUE KEY `c` (`c`(2)), + UNIQUE KEY `t` (`t`(3)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert t1 values ('cccc', 'tttt'), +(0xD0B1212223D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1212223D0B1D0B1D0B1D0B1), +(0xD0B1222123D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1222123D0B1D0B1D0B1D0B1); +insert t1 (c) values ('cc22'); +ERROR 23000: Duplicate entry 'cc22' for key 1 +insert t1 (t) values ('ttt22'); +ERROR 23000: Duplicate entry 'ttt22' for key 2 +insert t1 (c) values (0xD0B1212322D0B1D0B1D0B1D0B1D0B1); +ERROR 23000: Duplicate entry 'б!#"' for key 1 +insert t1 (t) values (0xD0B1D0B1212322D0B1D0B1D0B1D0B1); +ERROR 23000: Duplicate entry 'бб!#"б' for key 2 +select c from t1 where c='cccc'; +c +cccc +select t from t1 where t='tttt'; +t +tttt +select c from t1 where c=0xD0B1212223D0B1D0B1D0B1D0B1D0B1; +c +?!"#????? +select t from t1 where t=0xD0B1D0B1212223D0B1D0B1D0B1D0B1; +t +??!"#???? +drop table t1; diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result index d400dcd9795..a8bc2e3d342 100644 --- a/mysql-test/r/lowercase_table.result +++ b/mysql-test/r/lowercase_table.result @@ -1,4 +1,6 @@ drop table if exists t1,t2,t3,t4; +drop table if exists t0,t5,t6,t7,t8,t9; +drop database if exists mysqltest; create table T1 (id int primary key, Word varchar(40) not null, Index(Word)); create table t4 (id int primary key, Word varchar(40) not null); INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c'); @@ -42,6 +44,26 @@ select count(bags.a) from t1 as Bags; count(bags.a) 0 drop table t1; +create database mysqltest; +use MYSQLTEST; +create table t1 (a int); +select T1.a from MYSQLTEST.T1; +a +select t1.a from MYSQLTEST.T1; +a +select mysqltest.t1.* from MYSQLTEST.t1; +a +select MYSQLTEST.t1.* from MYSQLTEST.t1; +a +select MYSQLTEST.T1.* from MYSQLTEST.T1; +a +select MYSQLTEST.T1.* from T1; +a +alter table t1 rename to T1; +select MYSQLTEST.t1.* from MYSQLTEST.t1; +a +drop database mysqltest; +use test; create table t1 (a int); create table t2 (a int); delete p1.*,P2.* from t1 as p1, t2 as p2 where p1.a=P2.a; diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 83f8230f11c..5755033190b 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -642,3 +642,12 @@ x y 1 3 1 2 drop table t1,t2,t3; +create table t1 (a int); +create table t2 (a int); +insert into t1 values (0); +insert into t2 values (1); +create table t3 engine=merge union=(t1, t2) select * from t1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +create table t3 engine=merge union=(t1, t2) select * from t2; +ERROR HY000: You can't specify target table 't2' for update in FROM clause +drop table t1, t2; diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result index 80a01a0ca90..ced3ca61f80 100644 --- a/mysql-test/r/metadata.result +++ b/mysql-test/r/metadata.result @@ -21,7 +21,7 @@ def test t1 t1 g g 5 4 0 Y 32768 3 63 def test t1 t1 h h 0 7 0 Y 32768 4 63 def test t1 t1 i i 13 4 0 Y 32864 0 63 def test t1 t1 j j 10 10 0 Y 128 0 63 -def test t1 t1 k k 7 19 0 N 1217 0 63 +def test t1 t1 k k 7 19 0 N 1249 0 63 def test t1 t1 l l 12 19 0 Y 128 0 63 def test t1 t1 m m 254 1 0 Y 256 0 8 def test t1 t1 n n 254 3 0 Y 2048 0 8 diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 9a123729c4b..26dcce43d08 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -428,6 +428,22 @@ select * from t1 where a='807780' and b='477' and c='165'; a b c 807780 477 165 drop table t1; +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a)); +INSERT t1 VALUES ("can \tcan"); +INSERT t1 VALUES ("can can"); +INSERT t1 VALUES ("can"); +SELECT * FROM t1; +a +can can +can +can can +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; create table t1 (a blob); insert into t1 values('a '),('a'); select concat(a,'.') from t1 where a='a'; @@ -529,3 +545,12 @@ show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 a 1 a NULL NULL NULL NULL YES HASH drop table t1,t2; +create table t1 ( a tinytext, b char(1), index idx (a(1),b) ); +insert into t1 values (null,''), (null,''); +explain select count(*) from t1 where a is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref idx idx 4 const 1 Using where +select count(*) from t1 where a is null; +count(*) +2 +drop table t1; diff --git a/mysql-test/r/mysql_protocols.result b/mysql-test/r/mysql_protocols.result new file mode 100644 index 00000000000..272e3bda6f0 --- /dev/null +++ b/mysql-test/r/mysql_protocols.result @@ -0,0 +1,9 @@ +<default> + ok +TCP + ok +SOCKET + ok +ERROR 2047: Wrong or unknown protocol +ERROR 2047: Wrong or unknown protocol +Unknown option to protocol: NullS diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/r/mysqlbinlog2.result new file mode 100644 index 00000000000..3c1b85e05a1 --- /dev/null +++ b/mysql-test/r/mysqlbinlog2.result @@ -0,0 +1,446 @@ +drop table if exists t1; +reset master; +set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22"); +set timestamp=@a; +create table t1 (a int auto_increment not null primary key, b char(3)); +insert into t1 values(null, "a"); +insert into t1 values(null, "b"); +set timestamp=@a+2; +insert into t1 values(null, "c"); +set timestamp=@a+4; +insert into t1 values(null, "d"); +insert into t1 values(null, "e"); +flush logs; +set timestamp=@a+1; +insert into t1 values(null, "f"); + +--- Local -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); + +--- offset -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=1; +use test; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); + +--- start-position -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); + +--- stop-position -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; + +--- start-datetime -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=3; +use test; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); + +--- stop-datetime -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); + +--- Local with 2 binlogs on command line -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; +use test; +SET TIMESTAMP=1579609943; +insert into t1 values(null, "f"); + +--- offset -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=1; +use test; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; +use test; +SET TIMESTAMP=1579609943; +insert into t1 values(null, "f"); + +--- start-position -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; +use test; +SET TIMESTAMP=1579609943; +insert into t1 values(null, "f"); + +--- stop-position -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; + +--- start-datetime -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=3; +use test; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; +use test; +SET TIMESTAMP=1579609943; +insert into t1 values(null, "f"); + +--- stop-datetime -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); + +--- Remote -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); + +--- offset -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=1; +use test; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); + +--- start-position -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); + +--- stop-position -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; + +--- start-datetime -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=3; +use test; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); + +--- stop-datetime -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); + +--- Remote with 2 binlogs on command line -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; +use test; +SET TIMESTAMP=1579609943; +insert into t1 values(null, "f"); + +--- offset -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=1; +use test; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; +use test; +SET TIMESTAMP=1579609943; +insert into t1 values(null, "f"); + +--- start-position -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; +use test; +SET TIMESTAMP=1579609943; +insert into t1 values(null, "f"); + +--- stop-position -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; + +--- start-datetime -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=3; +use test; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; +use test; +SET TIMESTAMP=1579609943; +insert into t1 values(null, "f"); + +--- stop-datetime -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); + +--- to-last-log -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +use test; +SET TIMESTAMP=1579609942; +create table t1 (a int auto_increment not null primary key, b char(3)); +SET INSERT_ID=1; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "a"); +SET INSERT_ID=2; +SET TIMESTAMP=1579609942; +insert into t1 values(null, "b"); +SET INSERT_ID=3; +SET TIMESTAMP=1579609944; +insert into t1 values(null, "c"); +SET INSERT_ID=4; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "d"); +SET INSERT_ID=5; +SET TIMESTAMP=1579609946; +insert into t1 values(null, "e"); +SET INSERT_ID=6; +SET TIMESTAMP=1579609943; +insert into t1 values(null, "f"); + +--- end of test -- +drop table t1; diff --git a/mysql-test/r/ndb_alter_table.result b/mysql-test/r/ndb_alter_table.result index 6cc6a89d5ad..4e7f4b2a72b 100644 --- a/mysql-test/r/ndb_alter_table.result +++ b/mysql-test/r/ndb_alter_table.result @@ -15,15 +15,60 @@ col2 varchar(30) not null, col3 varchar (20) not null, col4 varchar(4) not null, col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, -col6 int not null, to_be_deleted int); -insert into t1 values (2,4,3,5,"PENDING",1,7); +col6 int not null, to_be_deleted int) ENGINE=ndbcluster; +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 ndbcluster 9 Dynamic 100 0 0 NULL 0 0 0 NULL NULL NULL latin1_swedish_ci NULL +insert into t1 values +(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 ndbcluster 9 Dynamic 100 0 0 NULL 0 0 102 NULL NULL NULL latin1_swedish_ci NULL +select * from t1 order by col1; +col1 col2 col3 col4 col5 col6 to_be_deleted +0 4 3 5 PENDING 1 7 +1 4 3 5 PENDING 1 7 +7 4 3 5 PENDING 1 7 +8 4 3 5 PENDING 1 7 +31 4 3 5 PENDING 1 7 +32 4 3 5 PENDING 1 7 +99 4 3 5 PENDING 1 7 +100 4 3 5 PENDING 1 7 +101 4 3 5 PENDING 1 7 alter table t1 add column col4_5 varchar(20) not null after col4, add column col7 varchar(30) not null after col5, add column col8 datetime not null, drop column to_be_deleted, change column col2 fourth varchar(30) not null after col3, modify column col6 int not null first; -select * from t1; +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 ndbcluster 9 Dynamic 100 0 0 NULL 0 0 102 NULL NULL NULL latin1_swedish_ci NULL +select * from t1 order by col1; col6 col1 col3 fourth col4 col4_5 col5 col7 col8 -1 2 3 4 5 PENDING 0000-00-00 00:00:00 +1 0 3 4 5 PENDING 0000-00-00 00:00:00 +1 1 3 4 5 PENDING 0000-00-00 00:00:00 +1 7 3 4 5 PENDING 0000-00-00 00:00:00 +1 8 3 4 5 PENDING 0000-00-00 00:00:00 +1 31 3 4 5 PENDING 0000-00-00 00:00:00 +1 32 3 4 5 PENDING 0000-00-00 00:00:00 +1 99 3 4 5 PENDING 0000-00-00 00:00:00 +1 100 3 4 5 PENDING 0000-00-00 00:00:00 +1 101 3 4 5 PENDING 0000-00-00 00:00:00 +insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 ndbcluster 9 Dynamic 100 0 0 NULL 0 0 103 NULL NULL NULL latin1_swedish_ci NULL +select * from t1 order by col1; +col6 col1 col3 fourth col4 col4_5 col5 col7 col8 +1 0 3 4 5 PENDING 0000-00-00 00:00:00 +1 1 3 4 5 PENDING 0000-00-00 00:00:00 +1 7 3 4 5 PENDING 0000-00-00 00:00:00 +1 8 3 4 5 PENDING 0000-00-00 00:00:00 +1 31 3 4 5 PENDING 0000-00-00 00:00:00 +1 32 3 4 5 PENDING 0000-00-00 00:00:00 +1 99 3 4 5 PENDING 0000-00-00 00:00:00 +1 100 3 4 5 PENDING 0000-00-00 00:00:00 +1 101 3 4 5 PENDING 0000-00-00 00:00:00 +2 102 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 drop table t1; diff --git a/mysql-test/r/ndb_autodiscover.result b/mysql-test/r/ndb_autodiscover.result index b86575ff2d9..313003f0a1f 100644 --- a/mysql-test/r/ndb_autodiscover.result +++ b/mysql-test/r/ndb_autodiscover.result @@ -35,10 +35,10 @@ update t1 set name="Autodiscover" where id = 2; show status like 'handler_discover%'; Variable_name Value Handler_discover 4 -select * from t1 order by name; +select * from t1 order by id; id name -2 Autodiscover 1 Autodiscover +2 Autodiscover 3 Discover 3 show status like 'handler_discover%'; Variable_name Value diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result index 0e7b039a5f9..80e1aa7939a 100644 --- a/mysql-test/r/ndb_basic.result +++ b/mysql-test/r/ndb_basic.result @@ -1,98 +1,106 @@ DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists mysqltest; CREATE TABLE t1 ( pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL +attr1 INT NOT NULL, +attr2 INT, +attr3 VARCHAR(10) ) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412); -SELECT pk1 FROM t1; +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); +SELECT pk1 FROM t1 ORDER BY pk1; pk1 9410 -SELECT * FROM t1; -pk1 attr1 -9410 9412 -SELECT t1.* FROM t1; -pk1 attr1 -9410 9412 +9411 +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +9410 9412 NULL 9412 +9411 9413 17 9413 +SELECT t1.* FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +9410 9412 NULL 9412 +9411 9413 17 9413 UPDATE t1 SET attr1=1 WHERE pk1=9410; -SELECT * FROM t1; -pk1 attr1 -9410 1 +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +9410 1 NULL 9412 +9411 9413 17 9413 UPDATE t1 SET pk1=2 WHERE attr1=1; -ERROR 42000: Table 't1' uses an extension that doesn't exist in this MySQL version -SELECT * FROM t1; -pk1 attr1 -9410 1 +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +2 1 NULL 9412 +9411 9413 17 9413 +UPDATE t1 SET pk1=pk1 + 1; +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +3 1 NULL 9412 +9412 9413 17 9413 DELETE FROM t1; SELECT * FROM t1; -pk1 attr1 -INSERT INTO t1 VALUES (9410,9412), (9411, 9413), (9408, 8765), -(7,8), (8,9), (9,10), (10,11), (11,12), (12,13), (13,14); +pk1 attr1 attr2 attr3 +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), +(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); UPDATE t1 SET attr1 = 9999; SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 -7 9999 -8 9999 -9 9999 -10 9999 -11 9999 -12 9999 -13 9999 -9408 9999 -9410 9999 -9411 9999 +pk1 attr1 attr2 attr3 +7 9999 NULL NULL +8 9999 NULL NULL +9 9999 NULL NULL +10 9999 NULL NULL +11 9999 NULL NULL +12 9999 NULL NULL +13 9999 NULL NULL +9408 9999 NULL 8765 +9410 9999 NULL 9412 UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000; SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 -7 9998 -8 9998 -9 9998 -10 9998 -11 9998 -12 9998 -13 9998 -9408 9999 -9410 9999 -9411 9999 +pk1 attr1 attr2 attr3 +7 9998 NULL NULL +8 9998 NULL NULL +9 9998 NULL NULL +10 9998 NULL NULL +11 9998 NULL NULL +12 9998 NULL NULL +13 9998 NULL NULL +9408 9999 NULL 8765 +9410 9999 NULL 9412 UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999; SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 -7 9998 -8 9998 -9 9998 -10 9998 -11 9998 -12 9998 -13 9998 -9408 9997 -9410 9997 -9411 9997 +pk1 attr1 attr2 attr3 +7 9998 NULL NULL +8 9998 NULL NULL +9 9998 NULL NULL +10 9998 NULL NULL +11 9998 NULL NULL +12 9998 NULL NULL +13 9998 NULL NULL +9408 9997 NULL 8765 +9410 9997 NULL 9412 DELETE FROM t1 WHERE pk1 = 9410; SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 -7 9998 -8 9998 -9 9998 -10 9998 -11 9998 -12 9998 -13 9998 -9408 9997 -9411 9997 +pk1 attr1 attr2 attr3 +7 9998 NULL NULL +8 9998 NULL NULL +9 9998 NULL NULL +10 9998 NULL NULL +11 9998 NULL NULL +12 9998 NULL NULL +13 9998 NULL NULL +9408 9997 NULL 8765 DELETE FROM t1; SELECT * FROM t1; -pk1 attr1 -INSERT INTO t1 values (1, 4), (2, 4), (3, 5), (4, 4), (5, 5); +pk1 attr1 attr2 attr3 +INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); DELETE FROM t1 WHERE attr1=4; SELECT * FROM t1 order by pk1; -pk1 attr1 -3 5 -5 5 +pk1 attr1 attr2 attr3 +3 5 NULL NULL +5 5 NULL NULL DELETE FROM t1; -INSERT INTO t1 VALUES (9410,9412), (9411, 9413); +INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); DELETE FROM t1 WHERE pk1 = 9410; SELECT * FROM t1; -pk1 attr1 -9411 9413 +pk1 attr1 attr2 attr3 +9411 9413 NULL NULL DROP TABLE t1; CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; INSERT INTO t1 values(3456, 7890); @@ -108,13 +116,17 @@ SELECT * FROM t1; id id2 1234 7890 DELETE FROM t1; -INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890); -SELECT * FROM t1; +INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); +SELECT * FROM t1 ORDER BY id; id id2 +3454 7890 3456 7890 3456 7890 3456 7890 DELETE FROM t1 WHERE id = 3456; +SELECT * FROM t1 ORDER BY id; +id id2 +3454 7890 DROP TABLE t1; CREATE TABLE t1 ( pk1 INT NOT NULL PRIMARY KEY, @@ -222,6 +234,18 @@ select * from t4 where a = 7 and b = 17 order by a; a b c d select * from t4 where a = 7 and b != 16 order by b; a b c d +delete from t2 where a > 5; +select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; +a b +1 10 +3 12 +5 14 +select a, b FROM t2 outer_table where +a = (select a from t2 where b = outer_table.b ) order by a; +a b +1 10 +3 12 +5 14 delete from t2; delete from t3; delete from t4; @@ -338,3 +362,30 @@ select * from t7; adress a b c No adress 8 NULL 12 drop table t7; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL, +attr2 INT, +attr3 VARCHAR(10) +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); +create database mysqltest; +use mysqltest; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +insert into t2 select pk1,attr1,attr2 from test.t1; +select * from t2 order by a; +a b c +9410 9412 NULL +9411 9413 17 +select b from test.t1, t2 where c = test.t1.attr2; +b +9413 +select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; +b attr1 +9413 9412 +drop table test.t1, t2; +drop database mysqltest; diff --git a/mysql-test/r/ndb_blob.result b/mysql-test/r/ndb_blob.result new file mode 100644 index 00000000000..c590815b233 --- /dev/null +++ b/mysql-test/r/ndb_blob.result @@ -0,0 +1,324 @@ +drop table if exists t1; +drop database if exists mysqltest; +set autocommit=0; +create table t1 ( +a int not null primary key, +b text not null, +c int not null, +d longblob, +key (c) +) engine=ndbcluster; +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +select length(@x0),length(@b1),length(@d1) from dual; +length(@x0) length(@b1) length(@d1) +256 2256 3000 +select length(@x0),length(@b2),length(@d2) from dual; +length(@x0) length(@b2) length(@d2) +256 20000 30000 +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1 where a = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=1; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=2; +a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) +2 20000 b2 30000 dd2 +update t1 set b=@b2,d=@d2 where a=1; +update t1 set b=@b1,d=@d1 where a=2; +commit; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=1; +a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) +1 20000 b2 30000 dd2 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=2; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +2 2256 b1 3000 dd1 +update t1 set b=concat(b,b),d=concat(d,d) where a=1; +update t1 set b=concat(b,b),d=concat(d,d) where a=2; +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 where a=1; +a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) +1 40000 b2 60000 dd2 +select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) +from t1 where a=2; +a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3) +2 4512 b1 6000 dd1 +update t1 set d=null where a=1; +commit; +select a from t1 where d is null; +a +1 +delete from t1 where a=1; +delete from t1 where a=2; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1 where c = 111; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref c c 4 const 10 Using where +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c=111; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where c=222; +a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) +2 20000 b2 30000 dd2 +update t1 set b=@b2,d=@d2 where c=111; +update t1 set b=@b1,d=@d1 where c=222; +commit; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where c=111; +a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) +1 20000 b2 30000 dd2 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c=222; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +2 2256 b1 3000 dd1 +update t1 set d=null where c=111; +commit; +select a from t1 where d is null; +a +1 +delete from t1 where c=111; +delete from t1 where c=222; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,'b1',111,'dd1'); +insert into t1 values(2,'b2',222,'dd2'); +insert into t1 values(3,'b3',333,'dd3'); +insert into t1 values(4,'b4',444,'dd4'); +insert into t1 values(5,'b5',555,'dd5'); +insert into t1 values(6,'b6',666,'dd6'); +insert into t1 values(7,'b7',777,'dd7'); +insert into t1 values(8,'b8',888,'dd8'); +insert into t1 values(9,'b9',999,'dd9'); +commit; +explain select * from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 100 +select * from t1 order by a; +a b c d +1 b1 111 dd1 +2 b2 222 dd2 +3 b3 333 dd3 +4 b4 444 dd4 +5 b5 555 dd5 +6 b6 666 dd6 +7 b7 777 dd7 +8 b8 888 dd8 +9 b9 999 dd9 +update t1 set b=concat(a,'x',b),d=concat(a,'x',d); +commit; +select * from t1 order by a; +a b c d +1 1xb1 111 1xdd1 +2 2xb2 222 2xdd2 +3 3xb3 333 3xdd3 +4 4xb4 444 4xdd4 +5 5xb5 555 5xdd5 +6 6xb6 666 6xdd6 +7 7xb7 777 7xdd7 +8 8xb8 888 8xdd8 +9 9xb9 999 9xdd9 +delete from t1; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 100 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 order by a; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +2 20000 b2 30000 dd2 +update t1 set b=concat(b,b),d=concat(d,d); +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 order by a; +a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) +1 4512 6000 +2 40000 b2 60000 dd2 +delete from t1; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,'b1',111,'dd1'); +insert into t1 values(2,'b2',222,'dd2'); +insert into t1 values(3,'b3',333,'dd3'); +insert into t1 values(4,'b4',444,'dd4'); +insert into t1 values(5,'b5',555,'dd5'); +insert into t1 values(6,'b6',666,'dd6'); +insert into t1 values(7,'b7',777,'dd7'); +insert into t1 values(8,'b8',888,'dd8'); +insert into t1 values(9,'b9',999,'dd9'); +commit; +explain select * from t1 where c >= 100 order by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 4 NULL 10 Using where; Using filesort +select * from t1 where c >= 100 order by a; +a b c d +1 b1 111 dd1 +2 b2 222 dd2 +3 b3 333 dd3 +4 b4 444 dd4 +5 b5 555 dd5 +6 b6 666 dd6 +7 b7 777 dd7 +8 b8 888 dd8 +9 b9 999 dd9 +update t1 set b=concat(a,'x',b),d=concat(a,'x',d) +where c >= 100; +commit; +select * from t1 where c >= 100 order by a; +a b c d +1 1xb1 111 1xdd1 +2 2xb2 222 2xdd2 +3 3xb3 333 3xdd3 +4 4xb4 444 4xdd4 +5 5xb5 555 5xdd5 +6 6xb6 666 6xdd6 +7 7xb7 777 7xdd7 +8 8xb8 888 8xdd8 +9 9xb9 999 9xdd9 +select * from t1 order by a; +a b c d +1 1xb1 111 1xdd1 +2 2xb2 222 2xdd2 +3 3xb3 333 3xdd3 +4 4xb4 444 4xdd4 +5 5xb5 555 5xdd5 +6 6xb6 666 6xdd6 +7 7xb7 777 7xdd7 +8 8xb8 888 8xdd8 +9 9xb9 999 9xdd9 +alter table t1 add x int; +select * from t1 order by a; +a b c d x +1 1xb1 111 1xdd1 NULL +2 2xb2 222 2xdd2 NULL +3 3xb3 333 3xdd3 NULL +4 4xb4 444 4xdd4 NULL +5 5xb5 555 5xdd5 NULL +6 6xb6 666 6xdd6 NULL +7 7xb7 777 7xdd7 NULL +8 8xb8 888 8xdd8 NULL +9 9xb9 999 9xdd9 NULL +alter table t1 drop x; +select * from t1 order by a; +a b c d +1 1xb1 111 1xdd1 +2 2xb2 222 2xdd2 +3 3xb3 333 3xdd3 +4 4xb4 444 4xdd4 +5 5xb5 555 5xdd5 +6 6xb6 666 6xdd6 +7 7xb7 777 7xdd7 +8 8xb8 888 8xdd8 +9 9xb9 999 9xdd9 +create database mysqltest; +use mysqltest; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +insert into t2 values (1,1,1),(2,2,2); +select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; +a b c d a b c +1 1xb1 111 1xdd1 1 1 1 +2 2xb2 222 2xdd2 2 2 2 +drop table t2; +use test; +delete from t1 where c >= 100; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1 where c >= 100 order by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 4 NULL 10 Using where; Using filesort +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c >= 100 order by a; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +2 20000 b2 30000 dd2 +update t1 set b=concat(b,b),d=concat(d,d); +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 where c >= 100 order by a; +a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) +1 4512 6000 +2 40000 b2 60000 dd2 +delete from t1 where c >= 100; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 0; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 1; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 2; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +2 20000 b2 30000 dd2 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 order by a; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +2 20000 b2 30000 dd2 +rollback; +select count(*) from t1; +count(*) +0 +drop table t1; +drop database mysqltest; diff --git a/mysql-test/r/ndb_index_ordered.result b/mysql-test/r/ndb_index_ordered.result index 0e3bd555b0a..2f1ad251e40 100644 --- a/mysql-test/r/ndb_index_ordered.result +++ b/mysql-test/r/ndb_index_ordered.result @@ -82,6 +82,24 @@ a b c 4 5 12 5 6 12 6 7 12 +update t1 set b = b + 1 where b > 4 and b < 7; +select * from t1 order by a; +a b c +1 2 13 +2 3 13 +3 4 12 +4 6 12 +5 7 12 +6 7 12 +update t1 set a = a + 10 where b > 1 and b < 7; +select * from t1 order by a; +a b c +5 7 12 +6 7 12 +11 2 13 +12 3 13 +13 4 12 +14 6 12 drop table t1; CREATE TABLE t1 ( a int unsigned NOT NULL PRIMARY KEY, @@ -187,4 +205,55 @@ a b c select * from t1 where b<=5 and c=0 or b<=5 and c=2; a b c 19 4 0 +select count(*) from t1 where b = 0; +count(*) +0 +select count(*) from t1 where b = 1; +count(*) +1 +drop table t1; +CREATE TABLE t1 ( +a int unsigned NOT NULL PRIMARY KEY, +b int unsigned, +c int unsigned, +KEY bc(b,c) +) engine = ndb; +insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); +select * from t1 use index (bc) where b IS NULL; +a b c +3 NULL NULL +2 NULL 2 +select * from t1 use index (bc)order by a; +a b c +1 1 1 +2 NULL 2 +3 NULL NULL +4 4 NULL +select * from t1 use index (bc) order by a; +a b c +1 1 1 +2 NULL 2 +3 NULL NULL +4 4 NULL +select * from t1 use index (PRIMARY) where b IS NULL order by a; +a b c +2 NULL 2 +3 NULL NULL +select * from t1 use index (bc) where b IS NULL order by a; +a b c +2 NULL 2 +3 NULL NULL +select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; +a b c +3 NULL NULL +select * from t1 use index (bc) where b IS NULL and c = 2 order by a; +a b c +2 NULL 2 +select * from t1 use index (bc) where b < 4 order by a; +a b c +1 1 1 +select * from t1 use index (bc) where b IS NOT NULL order by a; +a b c +1 1 1 +4 4 NULL drop table t1; diff --git a/mysql-test/r/ndb_index_unique.result b/mysql-test/r/ndb_index_unique.result index ed97e0b110a..4362de94b48 100644 --- a/mysql-test/r/ndb_index_unique.result +++ b/mysql-test/r/ndb_index_unique.result @@ -21,6 +21,28 @@ insert into t1 values(7,8,3); select * from t1 where b = 4 order by a; a b c 3 4 6 +insert into t1 values(8, 2, 3); +ERROR 23000: Can't write, because of unique constraint, to table 't1' +select * from t1 order by a; +a b c +1 2 3 +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +7 8 3 +delete from t1 where a = 1; +insert into t1 values(8, 2, 3); +select * from t1 order by a; +a b c +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +7 8 3 +8 2 3 drop table t1; CREATE TABLE t2 ( a int unsigned NOT NULL PRIMARY KEY, @@ -42,6 +64,28 @@ insert into t2 values(7,8,3); select * from t2 where b = 4 order by a; a b c 3 4 6 +insert into t2 values(8, 2, 3); +ERROR 23000: Can't write, because of unique constraint, to table 't2' +select * from t2 order by a; +a b c +1 2 3 +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +7 8 3 +delete from t2 where a = 1; +insert into t2 values(8, 2, 3); +select * from t2 order by a; +a b c +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +7 8 3 +8 2 3 drop table t2; CREATE TABLE t3 ( a int unsigned NOT NULL, @@ -65,6 +109,68 @@ a b c 3 4 6 drop table t3; CREATE TABLE t1 ( +pk int NOT NULL PRIMARY KEY, +a int unsigned, +UNIQUE KEY (a) +) engine=ndbcluster; +insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); +select * from t1 order by pk; +pk a +-1 NULL +0 0 +1 NULL +2 2 +3 NULL +4 4 +insert into t1 values (5,0); +ERROR 23000: Can't write, because of unique constraint, to table 't1' +select * from t1 order by pk; +pk a +-1 NULL +0 0 +1 NULL +2 2 +3 NULL +4 4 +delete from t1 where a = 0; +insert into t1 values (5,0); +select * from t1 order by pk; +pk a +-1 NULL +1 NULL +2 2 +3 NULL +4 4 +5 0 +CREATE TABLE t2 ( +pk int NOT NULL PRIMARY KEY, +a int unsigned, +b tinyint NOT NULL, +c VARCHAR(10), +UNIQUE KEY si(a, c) +) engine=ndbcluster; +insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); +select * from t2 order by pk; +pk a b c +-1 1 17 NULL +0 NULL 18 NULL +1 3 19 abc +insert into t2 values(2,3,19,'abc'); +ERROR 23000: Can't write, because of unique constraint, to table 't2' +select * from t2 order by pk; +pk a b c +-1 1 17 NULL +0 NULL 18 NULL +1 3 19 abc +delete from t2 where c IS NOT NULL; +insert into t2 values(2,3,19,'abc'); +select * from t2 order by pk; +pk a b c +-1 1 17 NULL +0 NULL 18 NULL +2 3 19 abc +drop table t1, t2; +CREATE TABLE t1 ( cid smallint(5) unsigned NOT NULL default '0', cv varchar(250) NOT NULL default '', PRIMARY KEY (cid), @@ -74,8 +180,10 @@ INSERT INTO t1 VALUES (8,'dummy'); CREATE TABLE t2 ( cid bigint(20) unsigned NOT NULL auto_increment, cap varchar(255) NOT NULL default '', -PRIMARY KEY (cid) +PRIMARY KEY (cid), +UNIQUE KEY (cid, cap) ) engine=ndbcluster; +INSERT INTO t2 VALUES (NULL,'another dummy'); CREATE TABLE t3 ( gid bigint(20) unsigned NOT NULL auto_increment, gn varchar(255) NOT NULL default '', @@ -132,6 +240,9 @@ cid cv 8 dummy select * from t1 where cv = 'test'; cid cv +select * from t2 where cap = 'another dummy'; +cid cap +0 another dummy select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; uid gid rid cid 1 1 2 4 diff --git a/mysql-test/r/ndb_limit.result b/mysql-test/r/ndb_limit.result new file mode 100644 index 00000000000..6574aa0bb1a --- /dev/null +++ b/mysql-test/r/ndb_limit.result @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS t2; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +select count(*) from t2; +count(*) +10000 +delete from t2 limit 1; +select count(*) from t2; +count(*) +9999 +delete from t2 limit 100; +select count(*) from t2; +count(*) +9899 +delete from t2 limit 1000; +select count(*) from t2; +count(*) +8899 +update t2 set c=12345678 limit 100; +select count(*) from t2 where c=12345678; +count(*) +100 +select count(*) from t2 where c=12345678 limit 1000; +count(*) +100 +select * from t2 limit 0; +a b c +drop table t2; diff --git a/mysql-test/r/ndb_lock.result b/mysql-test/r/ndb_lock.result new file mode 100644 index 00000000000..56661913e22 --- /dev/null +++ b/mysql-test/r/ndb_lock.result @@ -0,0 +1,30 @@ +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; +insert into t1 values (1,'one'), (2,'two'); +select * from t1 order by x; +x y +1 one +2 two +select * from t1 order by x; +x y +1 one +2 two +start transaction; +insert into t1 values (3,'three'); +select * from t1 order by x; +x y +1 one +2 two +3 three +start transaction; +select * from t1 order by x; +x y +1 one +2 two +commit; +select * from t1 order by x; +x y +1 one +2 two +3 three +commit; diff --git a/mysql-test/r/ndb_replace.result b/mysql-test/r/ndb_replace.result index 45af0f7fcb5..63fd8b55c8e 100644 --- a/mysql-test/r/ndb_replace.result +++ b/mysql-test/r/ndb_replace.result @@ -11,7 +11,7 @@ insert into t1 (gesuchnr, benutzer_id) value (3,2); replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1); insert into t1 (gesuchnr,benutzer_id) values (1,1); -ERROR 23000: Can't write; duplicate key in table 't1' +ERROR 23000: Duplicate entry '1-1' for key 1 replace into t1 (gesuchnr,benutzer_id) values (1,1); select * from t1 order by gesuchnr; gesuchnr benutzer_id diff --git a/mysql-test/r/ndb_transaction.result b/mysql-test/r/ndb_transaction.result new file mode 100644 index 00000000000..691b91b1d36 --- /dev/null +++ b/mysql-test/r/ndb_transaction.result @@ -0,0 +1,257 @@ +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists mysqltest; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL +) ENGINE=ndbcluster; +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 1 +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; +attr1 +2 +rollback; +select count(*) from t1; +count(*) +0 +select * from t1 where pk1 = 1; +pk1 attr1 +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; +attr1 +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +commit; +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 1 +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; +attr1 +2 +begin; +update t1 set attr1 = attr1 * 2; +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 2 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +2 4 1 2 +rollback; +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 1 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +begin; +update t1 set attr1 = attr1 * 2; +commit; +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 2 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +2 4 1 2 +begin; +delete from t1 where attr1 = 2; +select count(*) from t1; +count(*) +1 +select * from t1 where pk1 = 1; +pk1 attr1 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +rollback; +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 2 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +2 4 1 2 +begin; +delete from t1 where attr1 = 2; +commit; +select count(*) from t1; +count(*) +1 +select * from t1 where pk1 = 1; +pk1 attr1 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +DROP TABLE t1; +CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +select sum(id) from t1; +sum(id) +3 +select * from t1 where id = 1; +id id2 +1 1 +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; +id +2 +rollback; +select sum(id) from t1; +sum(id) +NULL +select * from t1 where id = 1; +id id2 +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; +id +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +commit; +select sum(id) from t1; +sum(id) +3 +select * from t1 where id = 1; +id id2 +1 1 +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; +id +2 +begin; +update t1 set id = id * 2; +select sum(id) from t1; +sum(id) +6 +select * from t1 where id = 2; +id id2 +2 1 +select * from t1, t1 as t1x where t1x.id = t1.id - 2; +id id2 id id2 +4 2 2 1 +rollback; +select sum(id) from t1; +sum(id) +3 +select * from t1 where id = 2; +id id2 +2 2 +select * from t1, t1 as t1x where t1x.id = t1.id - 2; +id id2 id id2 +begin; +update t1 set id = id * 2; +commit; +select sum(id) from t1; +sum(id) +6 +select * from t1 where id = 2; +id id2 +2 1 +select * from t1, t1 as t1x where t1x.id = t1.id - 2; +id id2 id id2 +4 2 2 1 +DROP TABLE t1; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +CREATE TABLE t3 ( +a bigint unsigned NOT NULL, +b bigint unsigned not null, +c bigint unsigned, +PRIMARY KEY(a) +) engine=ndbcluster; +CREATE TABLE t4 ( +a bigint unsigned NOT NULL, +b bigint unsigned not null, +c bigint unsigned NOT NULL, +d int unsigned, +PRIMARY KEY(a, b, c) +) engine=ndbcluster; +select count(*) from t2; +count(*) +0 +select count(*) from t3; +count(*) +0 +select count(*) from t4; +count(*) +0 +select count(*) from t2; +count(*) +100 +select count(*) from t3; +count(*) +100 +select count(*) from t4; +count(*) +100 +begin; +begin; +drop table t2; +drop table t3; +drop table t4; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL +) ENGINE=ndbcluster; +create database mysqltest; +use mysqltest; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +begin; +insert into test.t1 values(1,1); +insert into t2 values(1,1,1); +insert into test.t1 values(2,2); +insert into t2 values(2,2,2); +select count(*) from test.t1; +count(*) +2 +select count(*) from t2; +count(*) +2 +select * from test.t1 where pk1 = 1; +pk1 attr1 +1 1 +select * from t2 where a = 1; +a b c +1 1 1 +select test.t1.attr1 +from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; +attr1 +2 +select t2.a +from t2, t2 as t2x where t2.a = t2x.a + 1; +a +2 +select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; +pk1 a +1 2 +rollback; +select count(*) from test.t1; +count(*) +0 +select count(*) from t2; +count(*) +0 +drop table test.t1, t2; +drop database mysqltest; diff --git a/mysql-test/r/ndb_truncate.result b/mysql-test/r/ndb_truncate.result new file mode 100644 index 00000000000..38f3a78029c --- /dev/null +++ b/mysql-test/r/ndb_truncate.result @@ -0,0 +1,14 @@ +DROP TABLE IF EXISTS t2; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +select count(*) from t2; +count(*) +5000 +truncate table t2; +select count(*) from t2; +count(*) +0 +drop table t2; diff --git a/mysql-test/r/ndb_types.result b/mysql-test/r/ndb_types.result new file mode 100644 index 00000000000..9a45b77149b --- /dev/null +++ b/mysql-test/r/ndb_types.result @@ -0,0 +1,36 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +auto int(5) unsigned NOT NULL auto_increment, +string char(10) default "hello", +tiny tinyint(4) DEFAULT '0' NOT NULL , +short smallint(6) DEFAULT '1' NOT NULL , +medium mediumint(8) DEFAULT '0' NOT NULL, +long_int int(11) DEFAULT '0' NOT NULL, +longlong bigint(13) DEFAULT '0' NOT NULL, +real_float float(13,1) DEFAULT 0.0 NOT NULL, +real_double double(16,4), +utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, +ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, +umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, +ulong int(11) unsigned DEFAULT '0' NOT NULL, +ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, +time_stamp timestamp, +date_field date, +time_field time, +date_time datetime, +options enum('one','two','tree') not null, +flags set('one','two','tree') not null, +PRIMARY KEY (auto), +KEY (utiny), +KEY (tiny), +KEY (short), +KEY any_name (medium), +KEY (longlong), +KEY (real_float), +KEY (ushort), +KEY (umedium), +KEY (ulong), +KEY (ulonglong,ulong), +KEY (options,flags) +); +drop table t1; diff --git a/mysql-test/r/negation_elimination.result b/mysql-test/r/negation_elimination.result index a3a2bad7ec6..9193a125cd1 100644 --- a/mysql-test/r/negation_elimination.result +++ b/mysql-test/r/negation_elimination.result @@ -375,4 +375,17 @@ a 13 14 15 +delete from t1 where a > 3; +select a, not(not(a)) from t1; +a not(not(a)) +NULL NULL +0 0 +1 1 +2 1 +3 1 +explain extended select a, not(not(a)), not(a <= 2 and not(a)), not(a not like "1"), not (a not in (1,2)), not(a != 2) from t1 where not(not(a)) having not(not(a)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 5 Using where; Using index +Warnings: +Note 1003 select test.t1.a AS `a`,(test.t1.a <> 0) AS `not(not(a))`,((test.t1.a > 2) or test.t1.a) AS `not(a <= 2 and not(a))`,(test.t1.a like _latin1'1') AS `not(a not like "1")`,(test.t1.a in (1,2)) AS `not (a not in (1,2))`,(test.t1.a = 2) AS `not(a != 2)` from test.t1 where test.t1.a having test.t1.a drop table t1; diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 1d76fbf2fb3..bd90b3fe3f3 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -156,3 +156,22 @@ drop table t1; select cast(NULL as signed); cast(NULL as signed) NULL +create table t1(i int, key(i)); +insert into t1 values(1); +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +explain select * from t1 where i=2 or i is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref_or_null i i 5 const 10 Using where; Using index +alter table t1 change i i int not null; +explain select * from t1 where i=2 or i is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref i i 4 const 7 Using where; Using index +drop table t1; diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result index c862a020a93..f398c69a424 100644 --- a/mysql-test/r/olap.result +++ b/mysql-test/r/olap.result @@ -271,3 +271,39 @@ i i COUNT(*) 100 NULL 2 NULL NULL 2 drop table t1,t2; +CREATE TABLE user_day( +user_id INT NOT NULL, +date DATE NOT NULL, +UNIQUE INDEX user_date (user_id, date) +); +INSERT INTO user_day VALUES +(1, '2004-06-06' ), +(1, '2004-06-07' ), +(2, '2004-06-06' ); +SELECT +d.date AS day, +COUNT(d.user_id) as sample, +COUNT(next_day.user_id) AS not_cancelled +FROM user_day d +LEFT JOIN user_day next_day +ON next_day.user_id=d.user_id AND +next_day.date= DATE_ADD( d.date, interval 1 day ) +GROUP BY day; +day sample not_cancelled +2004-06-06 2 1 +2004-06-07 1 0 +SELECT +d.date AS day, +COUNT(d.user_id) as sample, +COUNT(next_day.user_id) AS not_cancelled +FROM user_day d +LEFT JOIN user_day next_day +ON next_day.user_id=d.user_id AND +next_day.date= DATE_ADD( d.date, interval 1 day ) +GROUP BY day +WITH ROLLUP; +day sample not_cancelled +2004-06-06 2 1 +2004-06-07 1 0 +NULL 3 1 +DROP TABLE user_day; diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 6b03dc239e7..a431807a560 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -116,7 +116,7 @@ col1 2 3 2 -select col1 as id from t1 order by t1.id; +select col1 as id from t1 order by id; id 1 1 @@ -126,16 +126,16 @@ id 2 2 3 -select concat(col1) as id from t1 order by t1.id; +select concat(col1) as id from t1 order by id; id -2 -2 1 1 1 2 -3 2 +2 +2 +3 drop table t1; CREATE TABLE t1 (id int auto_increment primary key,aika varchar(40),aikakentta timestamp); insert into t1 (aika) values ('Keskiviikko'); @@ -660,3 +660,66 @@ a b c d 1 1 12 -1 1 1 2 0 drop table t1, t2; +create table t1 (col1 int, col int); +create table t2 (col2 int, col int); +insert into t1 values (1,1),(2,2),(3,3); +insert into t2 values (1,3),(2,2),(3,1); +select t1.* , t2.col as t2_col from t1 left join t2 on (t1.col1=t2.col2) +order by col; +col1 col t2_col +1 1 3 +2 2 2 +3 3 1 +select col1 as col, col from t1 order by col; +ERROR 23000: Column 'col' in order clause is ambiguous +select t1.col as c1, t2.col as c2 from t1, t2 where t1.col1=t2.col2 +order by col; +ERROR 23000: Column 'col' in order clause is ambiguous +select t1.col as c1, t2.col as c2 from t1, t2 where t1.col1=t2.col2 +order by col; +ERROR 23000: Column 'col' in order clause is ambiguous +select col1 from t1, t2 where t1.col1=t2.col2 order by col; +ERROR 23000: Column 'col' in order clause is ambiguous +select t1.col as t1_col, t2.col from t1, t2 where t1.col1=t2.col2 +order by col; +t1_col col +3 1 +2 2 +1 3 +select col2 as c, col as c from t2 order by col; +c c +3 1 +2 2 +1 3 +select col2 as col, col as col2 from t2 order by col; +col col2 +1 3 +2 2 +3 1 +select t1.col as t1_col, t2.col2 from t1, t2 where t1.col1=t2.col2 +order by col; +t1_col col2 +1 1 +2 2 +3 3 +select t2.col2, t2.col, t2.col from t2 order by col; +col2 col col +3 1 1 +2 2 2 +1 3 3 +select t2.col2 as col from t2 order by t2.col; +col +3 +2 +1 +select t2.col2 as col, t2.col from t2 order by t2.col; +col col +3 1 +2 2 +1 3 +select t2.col2, t2.col, t2.col from t2 order by t2.col; +col2 col col +3 1 1 +2 2 2 +1 3 3 +drop table t1, t2; diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 27f4ce7f815..321b8894796 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -219,3 +219,54 @@ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length I t1 MyISAM 9 Dynamic 0 0 0 4294967295 1024 0 NULL # # # latin1_swedish_ci NULL deallocate prepare stmt1 ; drop table t1; +create table t1(a varchar(2), b varchar(3)); +prepare stmt1 from "select a, b from t1 where (not (a='aa' and b < 'zzz'))"; +execute stmt1; +a b +execute stmt1; +a b +deallocate prepare stmt1; +drop table t1; +prepare stmt1 from "select 1 into @var"; +execute stmt1; +execute stmt1; +prepare stmt1 from "create table t1 select 1 as i"; +execute stmt1; +drop table t1; +execute stmt1; +prepare stmt1 from "insert into t1 select i from t1"; +execute stmt1; +execute stmt1; +prepare stmt1 from "select * from t1 into outfile 'f1.txt'"; +execute stmt1; +deallocate prepare stmt1; +drop table t1; +prepare stmt1 from 'select 1'; +prepare STMT1 from 'select 2'; +execute sTmT1; +2 +2 +deallocate prepare StMt1; +deallocate prepare Stmt1; +ERROR HY000: Unknown prepared statement handler (Stmt1) given to DEALLOCATE PREPARE +set names utf8; +prepare `ü` from 'select 1234'; +execute `ü` ; +1234 +1234 +set names latin1; +execute ``; +1234 +1234 +set names default; +create table t1 (a varchar(10)) charset=utf8; +insert into t1 (a) values ('yahoo'); +set character_set_connection=latin1; +prepare stmt from 'select a from t1 where a like ?'; +set @var='google'; +execute stmt using @var; +a +execute stmt using @var; +a +deallocate prepare stmt; +drop table t1; diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index 6a21055cd3e..dc67fda7efa 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -317,6 +317,7 @@ NDBCLUSTER YES/NO Clustered, fault-tolerant, memory-based tables NDB YES/NO Alias for NDBCLUSTER EXAMPLE YES/NO Example storage engine ARCHIVE YES/NO Archive storage engine +CSV YES/NO CSV storage engine drop table if exists tx; prepare stmt1 from ' drop table if exists tx ' ; execute stmt1 ; @@ -333,12 +334,12 @@ prepare stmt1 from ' deallocate prepare never_prepared ' ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'never_prepared' at line 1 prepare stmt4 from ' use test ' ; ERROR HY000: This command is not supported in the prepared statement protocol yet -prepare stmt3 from ' create database drop_me '; +prepare stmt3 from ' create database mysqltest '; ERROR HY000: This command is not supported in the prepared statement protocol yet -create database drop_me ; -prepare stmt3 from ' drop database drop_me '; +create database mysqltest ; +prepare stmt3 from ' drop database mysqltest '; ERROR HY000: This command is not supported in the prepared statement protocol yet -drop database drop_me ; +drop database mysqltest ; prepare stmt3 from ' grant all on test.t1 to drop_user@localhost identified by ''looser'' '; ERROR HY000: This command is not supported in the prepared statement protocol yet diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index a6d09202e4e..344f02bb8ab 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -870,7 +870,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63 def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63 -def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63 +def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63 def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63 def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63 def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63 diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 606716f6583..162004c7b0c 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -870,7 +870,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63 def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63 -def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63 +def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63 def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63 def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63 def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63 diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index 5643ec637fc..23874c9b02b 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -871,7 +871,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63 def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63 -def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63 +def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63 def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63 def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63 def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63 diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 97069823c26..d1c3597b22b 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -913,7 +913,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63 def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63 -def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63 +def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63 def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63 def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63 def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63 @@ -2105,7 +2105,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63 def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63 -def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63 +def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63 def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63 def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63 def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63 diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index b849d874b9a..31dfdd7bb87 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -870,7 +870,7 @@ def test t_many_col_types t_many_col_types c11 c11 0 9 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c12 c12 0 10 6 Y 32768 4 63 def test t_many_col_types t_many_col_types c13 c13 10 10 10 Y 128 0 63 def test t_many_col_types t_many_col_types c14 c14 12 19 19 Y 128 0 63 -def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1217 0 63 +def test t_many_col_types t_many_col_types c15 c15 7 19 19 N 1249 0 63 def test t_many_col_types t_many_col_types c16 c16 11 8 8 Y 128 0 63 def test t_many_col_types t_many_col_types c17 c17 13 4 4 Y 32864 0 63 def test t_many_col_types t_many_col_types c18 c18 1 1 1 Y 32768 0 63 diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index bdd87919fd9..01ee018a434 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -475,3 +475,89 @@ id name uid id name uid 1025 Y 25 1025 Y 25 1026 Z 26 1026 Z 26 drop table t1,t2; +create table t1 (x bigint unsigned not null); +insert into t1(x) values (0xfffffffffffffff0); +insert into t1(x) values (0xfffffffffffffff1); +select * from t1; +x +18446744073709551600 +18446744073709551601 +select count(*) from t1 where x>0; +count(*) +2 +select count(*) from t1 where x=0; +count(*) +0 +select count(*) from t1 where x<0; +count(*) +0 +select count(*) from t1 where x < -16; +count(*) +0 +select count(*) from t1 where x = -16; +count(*) +0 +select count(*) from t1 where x > -16; +count(*) +2 +select count(*) from t1 where x = 18446744073709551601; +count(*) +1 +create table t2 (x bigint not null); +insert into t2(x) values (0xfffffffffffffff0); +insert into t2(x) values (0xfffffffffffffff1); +select * from t2; +x +-16 +-15 +select count(*) from t2 where x>0; +count(*) +0 +select count(*) from t2 where x=0; +count(*) +0 +select count(*) from t2 where x<0; +count(*) +2 +select count(*) from t2 where x < -16; +count(*) +0 +select count(*) from t2 where x = -16; +count(*) +1 +select count(*) from t2 where x > -16; +count(*) +1 +select count(*) from t2 where x = 18446744073709551601; +count(*) +0 +drop table t1; +create table t1 (x bigint unsigned not null primary key) engine=innodb; +insert into t1(x) values (0xfffffffffffffff0); +insert into t1(x) values (0xfffffffffffffff1); +select * from t1; +x +18446744073709551600 +18446744073709551601 +select count(*) from t1 where x>0; +count(*) +2 +select count(*) from t1 where x=0; +count(*) +0 +select count(*) from t1 where x<0; +count(*) +0 +select count(*) from t1 where x < -16; +count(*) +0 +select count(*) from t1 where x = -16; +count(*) +0 +select count(*) from t1 where x > -16; +count(*) +1 +select count(*) from t1 where x = 18446744073709551601; +count(*) +1 +drop table t1; diff --git a/mysql-test/r/rename.result b/mysql-test/r/rename.result index c2dfd9fa219..c6da8285479 100644 --- a/mysql-test/r/rename.result +++ b/mysql-test/r/rename.result @@ -1,4 +1,5 @@ drop table if exists t0,t1,t2,t3,t4; +drop table if exists t0,t5,t6,t7,t8,t9; create table t0 SELECT 1,"table 1"; create table t2 SELECT 2,"table 2"; create table t3 SELECT 3,"table 3"; diff --git a/mysql-test/r/rpl_charset.result b/mysql-test/r/rpl_charset.result index 5522fd3e89b..d961173f849 100644 --- a/mysql-test/r/rpl_charset.result +++ b/mysql-test/r/rpl_charset.result @@ -4,41 +4,41 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -drop database if exists test2; -drop database if exists test3; -create database test2 character set latin2; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +create database mysqltest2 character set latin2; set @@character_set_server=latin5; -create database test3; +create database mysqltest3; --- --master-- -show create database test2; +show create database mysqltest2; Database Create Database -test2 CREATE DATABASE `test2` /*!40100 DEFAULT CHARACTER SET latin2 */ -show create database test3; +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; Database Create Database -test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET latin5 */ +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ --- --slave-- -show create database test2; +show create database mysqltest2; Database Create Database -test2 CREATE DATABASE `test2` /*!40100 DEFAULT CHARACTER SET latin2 */ -show create database test3; +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; Database Create Database -test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET latin5 */ +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ set @@collation_server=armscii8_bin; -drop database test3; -create database test3; +drop database mysqltest3; +create database mysqltest3; --- --master-- -show create database test3; +show create database mysqltest3; Database Create Database -test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ --- --slave-- -show create database test3; +show create database mysqltest3; Database Create Database -test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ -use test2; +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ +use mysqltest2; create table t1 (a int auto_increment primary key, b varchar(100)); set character_set_client=cp850, collation_connection=latin2_croatian_ci; insert into t1 (b) values(@@character_set_server); @@ -57,7 +57,7 @@ a b 5 latin2_croatian_ci --- --slave-- -select * from test2.t1 order by a; +select * from mysqltest2.t1 order by a; a b 1 armscii8 2 armscii8_bin @@ -81,7 +81,7 @@ a b 4 Mller --- --slave-- -select * from test2.t1 order by a; +select * from mysqltest2.t1 order by a; a b 1 latin1_german1_ci 2 Muffler @@ -98,69 +98,69 @@ a b 1 cp850_general_ci --- --slave-- -select * from test2.t1 order by a; +select * from mysqltest2.t1 order by a; a b 1 cp850_general_ci -drop database test2; -drop database test3; +drop database mysqltest2; +drop database mysqltest3; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 95 Query 1 181 use `test`; drop database if exists test2 -master-bin.000001 181 Query 1 267 use `test`; drop database if exists test3 -master-bin.000001 267 Query 1 366 use `test`; create database test2 character set latin2 +master-bin.000001 95 Query 1 181 use `test`; drop database if exists mysqltest2 +master-bin.000001 181 Query 1 267 use `test`; drop database if exists mysqltest3 +master-bin.000001 267 Query 1 366 use `test`; create database mysqltest2 character set latin2 master-bin.000001 366 Query 1 522 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30 -master-bin.000001 522 Query 1 600 use `test`; create database test3 +master-bin.000001 522 Query 1 600 use `test`; create database mysqltest3 master-bin.000001 600 Query 1 756 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64 -master-bin.000001 756 Query 1 832 use `test`; drop database test3 +master-bin.000001 756 Query 1 832 use `test`; drop database mysqltest3 master-bin.000001 832 Query 1 988 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64 -master-bin.000001 988 Query 1 1066 use `test`; create database test3 -master-bin.000001 1066 Query 1 1223 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 1223 Query 1 1347 use `test2`; create table t1 (a int auto_increment primary key, b varchar(100)) -master-bin.000001 1347 Query 1 1505 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 988 Query 1 1066 use `test`; create database mysqltest3 +master-bin.000001 1066 Query 1 1223 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 1223 Query 1 1347 use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) +master-bin.000001 1347 Query 1 1505 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 1505 Intvar 1 1533 INSERT_ID=1 -master-bin.000001 1533 Query 1 1640 use `test2`; insert into t1 (b) values(@@character_set_server) -master-bin.000001 1640 Query 1 1798 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 1533 Query 1 1640 use `mysqltest2`; insert into t1 (b) values(@@character_set_server) +master-bin.000001 1640 Query 1 1798 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 1798 Intvar 1 1826 INSERT_ID=2 -master-bin.000001 1826 Query 1 1929 use `test2`; insert into t1 (b) values(@@collation_server) -master-bin.000001 1929 Query 1 2087 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 1826 Query 1 1929 use `mysqltest2`; insert into t1 (b) values(@@collation_server) +master-bin.000001 1929 Query 1 2087 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 2087 Intvar 1 2115 INSERT_ID=3 -master-bin.000001 2115 Query 1 2222 use `test2`; insert into t1 (b) values(@@character_set_client) -master-bin.000001 2222 Query 1 2380 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 2115 Query 1 2222 use `mysqltest2`; insert into t1 (b) values(@@character_set_client) +master-bin.000001 2222 Query 1 2380 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 2380 Intvar 1 2408 INSERT_ID=4 -master-bin.000001 2408 Query 1 2519 use `test2`; insert into t1 (b) values(@@character_set_connection) -master-bin.000001 2519 Query 1 2677 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 2408 Query 1 2519 use `mysqltest2`; insert into t1 (b) values(@@character_set_connection) +master-bin.000001 2519 Query 1 2677 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 2677 Intvar 1 2705 INSERT_ID=5 -master-bin.000001 2705 Query 1 2812 use `test2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 2812 Query 1 2969 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 2969 Query 1 3044 use `test2`; truncate table t1 -master-bin.000001 3044 Query 1 3201 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 2705 Query 1 2812 use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 2812 Query 1 2969 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 2969 Query 1 3044 use `mysqltest2`; truncate table t1 +master-bin.000001 3044 Query 1 3201 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 3201 Intvar 1 3229 INSERT_ID=1 -master-bin.000001 3229 Query 1 3336 use `test2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 3336 Query 1 3493 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 3229 Query 1 3336 use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 3336 Query 1 3493 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 3493 Intvar 1 3521 INSERT_ID=2 -master-bin.000001 3521 Query 1 3631 use `test2`; insert into t1 (b) values(LEAST("Mller","Muffler")) -master-bin.000001 3631 Query 1 3789 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 3521 Query 1 3631 use `mysqltest2`; insert into t1 (b) values(LEAST("Mller","Muffler")) +master-bin.000001 3631 Query 1 3789 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 3789 Intvar 1 3817 INSERT_ID=3 -master-bin.000001 3817 Query 1 3924 use `test2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 3924 Query 1 4082 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 3817 Query 1 3924 use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 3924 Query 1 4082 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 4082 Intvar 1 4110 INSERT_ID=4 -master-bin.000001 4110 Query 1 4220 use `test2`; insert into t1 (b) values(LEAST("Mller","Muffler")) -master-bin.000001 4220 Query 1 4378 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 4110 Query 1 4220 use `mysqltest2`; insert into t1 (b) values(LEAST("Mller","Muffler")) +master-bin.000001 4220 Query 1 4378 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 4378 Intvar 1 4406 INSERT_ID=74 -master-bin.000001 4406 Create_file 1 5074 db=test2;table=t1;file_id=1;block_len=581 -master-bin.000001 5074 Query 1 5232 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 4406 Create_file 1 5074 db=mysqltest2;table=t1;file_id=1;block_len=581 +master-bin.000001 5074 Query 1 5232 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 5232 Intvar 1 5260 INSERT_ID=5 master-bin.000001 5260 Exec_load 1 5283 ;file_id=1 -master-bin.000001 5283 Query 1 5441 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 5441 Query 1 5516 use `test2`; truncate table t1 -master-bin.000001 5516 Query 1 5674 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 5283 Query 1 5441 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 5441 Query 1 5516 use `mysqltest2`; truncate table t1 +master-bin.000001 5516 Query 1 5674 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 5674 Intvar 1 5702 INSERT_ID=1 master-bin.000001 5702 User var 1 5742 @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci -master-bin.000001 5742 Query 1 5840 use `test2`; insert into t1 (b) values(collation(@a)) -master-bin.000001 5840 Query 1 5998 use `test2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 5998 Query 1 6075 use `test2`; drop database test2 +master-bin.000001 5742 Query 1 5840 use `mysqltest2`; insert into t1 (b) values(collation(@a)) +master-bin.000001 5840 Query 1 5998 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 +master-bin.000001 5998 Query 1 6075 use `mysqltest2`; drop database mysqltest2 master-bin.000001 6075 Query 1 6228 SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 6228 Query 1 6300 drop database test3 +master-bin.000001 6228 Query 1 6300 drop database mysqltest3 set global character_set_server=latin2; ERROR HY000: Binary logging and replication forbid changing the global server character set or collation set global character_set_server=latin2; diff --git a/mysql-test/r/rpl_delete_all.result b/mysql-test/r/rpl_delete_all.result index 97a535490dd..5ed221823e8 100644 --- a/mysql-test/r/rpl_delete_all.result +++ b/mysql-test/r/rpl_delete_all.result @@ -4,12 +4,12 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -create database test1; -drop database if exists test1; +create database mysqltest; +drop database if exists mysqltest; Warnings: -Note 1008 Can't drop database 'test1'; database doesn't exist -show tables from test1; -ERROR HY000: Can't read dir of './test1/' (Errcode: X) +Note 1008 Can't drop database 'mysqltest'; database doesn't exist +show tables from mysqltest; +ERROR HY000: Can't read dir of './mysqltest/' (Errcode: X) create table t1 (a int); drop table if exists t1; Warnings: diff --git a/mysql-test/r/rpl_heap.result b/mysql-test/r/rpl_heap.result index 1556bcd5f25..1facbcb7676 100644 --- a/mysql-test/r/rpl_heap.result +++ b/mysql-test/r/rpl_heap.result @@ -1,22 +1,22 @@ reset master; drop table if exists t1; -create table t1 (a int) type=HEAP; -insert into t1 values(10); +create table t1 type=HEAP select 10 as a; +insert into t1 values(11); show binlog events from 79; Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.001 79 Query 1 79 use `test`; create table t1 (a int) type=HEAP -master-bin.001 147 Query 1 147 use `test`; DELETE FROM `test`.`t1` -master-bin.001 205 Query 1 205 use `test`; insert into t1 values(10) +master-bin.001 79 Query 1 79 use `test`; create table t1 type=HEAP select 10 as a +master-bin.001 154 Query 1 154 use `test`; insert into t1 values(11) reset slave; start slave; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) default NULL + `a` bigint(2) NOT NULL default '0' ) TYPE=HEAP select * from t1; a 10 +11 select * from t1; a select * from t1 limit 10; diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 470a3e8439f..00dbcb54d93 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -81,7 +81,10 @@ email varchar(50) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY e_n (email,name) ); -INSERT INTO t2 VALUES (1,'name1','email1'),(2,'name2','email2'),(3,'name3','email3'),(4,'name4','email4'),(5,'name5','email5'),(6,'name6','email6'),(7,'name7','email7'),(8,'name8','email8'),(9,'name9','email9'),(10,'name10','email10'),(11,'name11','email11'),(12,'name12','email12'),(13,'name13','email13'),(14,'name14','email14'),(15,'name15','email15'),(16,'name16','email16'),(17,'name17','email17'),(18,'name18','email18'),(19,'name19','email19'),(20,'name20','email20'),(21,'name21','email21'),(22,'name22','email22'),(23,'name23','email23'),(24,'name24','email24'),(25,'name25','email25'),(26,'name26','email26'),(27,'name27','email27'),(28,'name28','email28'),(29,'name29','email29'),(30,'name30','email30'),(31,'name31','email31'),(32,'name32','email32'),(33,'name33','email33'),(34,'name34','email34'),(35,'name35','email35'),(36,'name36','email36'),(37,'name37','email37'),(38,'name38','email38'),(39,'name39','email39'),(40,'name40','email40'),(41,'name41','email41'),(42,'name42','email42'),(43,'name43','email43'),(44,'name44','email44'),(45,'name45','email45'),(46,'name46','email46'),(47,'name47','email47'),(48,'name48','email48'),(49,'name49','email49'),(50,'name50','email50'),(51,'name51','email51'),(52,'name52','email52'),(53,'name53','email53'),(54,'name54','email54'),(55,'name55','email55'),(56,'name56','email56'),(57,'name57','email57'),(58,'name58','email58'),(59,'name59','email59'),(60,'name60','email60'),(61,'name61','email61'),(62,'name62','email62'),(63,'name63','email63'),(64,'name64','email64'),(65,'name65','email65'),(66,'name66','email66'),(67,'name67','email67'),(68,'name68','email68'),(69,'name69','email69'),(70,'name70','email70'),(71,'name71','email71'),(72,'name72','email72'),(73,'name73','email73'),(74,'name74','email74'),(75,'name75','email75'),(76,'name76','email76'),(77,'name77','email77'),(78,'name78','email78'),(79,'name79','email79'),(80,'name80','email80'),(81,'name81','email81'),(82,'name82','email82'),(83,'name83','email83'),(84,'name84','email84'),(85,'name85','email85'),(86,'name86','email86'),(87,'name87','email87'),(88,'name88','email88'),(89,'name89','email89'),(90,'name90','email90'),(91,'name91','email91'),(92,'name92','email92'),(93,'name93','email93'),(94,'name94','email94'),(95,'name95','email95'),(96,'name96','email96'),(97,'name97','email97'),(98,'name98','email98'),(99,'name99','email99'),(100,'name100','email100'),(101,'name101','email101'),(102,'name102','email102'),(103,'name103','email103'),(104,'name104','email104'),(105,'name105','email105'),(106,'name106','email106'),(107,'name107','email107'),(108,'name108','email108'),(109,'name109','email109'),(110,'name110','email110'),(111,'name111','email111'),(112,'name112','email112'),(113,'name113','email113'),(114,'name114','email114'),(115,'name115','email115'),(116,'name116','email116'),(117,'name117','email117'),(118,'name118','email118'),(119,'name119','email119'),(120,'name120','email120'),(121,'name121','email121'),(122,'name122','email122'),(123,'name123','email123'),(124,'name124','email124'),(125,'name125','email125'),(126,'name126','email126'),(127,'name127','email127'),(128,'name128','email128'),(129,'name129','email129'),(130,'name130','email130'),(131,'name131','email131'),(132,'name132','email132'),(133,'name133','email133'),(134,'name134','email134'),(135,'name135','email135'),(136,'name136','email136'),(137,'name137','email137'),(138,'name138','email138'),(139,'name139','email139'),(140,'name140','email140'),(141,'name141','email141'),(142,'name142','email142'),(143,'name143','email143'),(144,'name144','email144'),(145,'name145','email145'),(146,'name146','email146'),(147,'name147','email147'),(148,'name148','email148'),(149,'name149','email149'),(150,'name150','email150'),(151,'name151','email151'),(152,'name152','email152'),(153,'name153','email153'),(154,'name154','email154'),(155,'name155','email155'),(156,'name156','email156'),(157,'name157','email157'),(158,'name158','email158'),(159,'name159','email159'),(160,'name160','email160'),(161,'name161','email161'),(162,'name162','email162'),(163,'name163','email163'),(164,'name164','email164'),(165,'name165','email165'),(166,'name166','email166'),(167,'name167','email167'),(168,'name168','email168'),(169,'name169','email169'),(170,'name170','email170'),(171,'name171','email171'),(172,'name172','email172'),(173,'name173','email173'),(174,'name174','email174'),(175,'name175','email175'),(176,'name176','email176'),(177,'name177','email177'),(178,'name178','email178'),(179,'name179','email179'),(180,'name180','email180'),(181,'name181','email181'),(182,'name182','email182'),(183,'name183','email183'),(184,'name184','email184'),(185,'name185','email185'),(186,'name186','email186'),(187,'name187','email187'),(188,'name188','email188'),(189,'name189','email189'),(190,'name190','email190'),(191,'name191','email191'),(192,'name192','email192'),(193,'name193','email193'),(194,'name194','email194'),(195,'name195','email195'),(196,'name196','email196'),(197,'name197','email197'),(198,'name198','email198'),(199,'name199','email199'),(200,'name200','email200'); +EXPLAIN SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system PRIMARY,kid NULL NULL NULL 0 const row not found +1 SIMPLE t2 index NULL e_n 100 NULL 200 SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; email email1 diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index aefebad7e49..ecf91fe6f68 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1,4 +1,5 @@ drop table if exists t1,t2; +drop database if exists mysqltest; create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4); check table t1 fast; @@ -361,39 +362,39 @@ t1 HEAP 9 Fixed 0 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL t2 HEAP 9 Fixed 0 5 # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL t3 HEAP 9 Fixed 0 9 # # # 9 NULL NULL NULL NULL latin1_swedish_ci NULL drop table t1, t2, t3; -create database test_$1; -show create database test_$1; +create database mysqltest; +show create database mysqltest; Database Create Database -test_$1 CREATE DATABASE `test_$1` /*!40100 DEFAULT CHARACTER SET latin1 */ -create table test_$1.t1(a int); -insert into test_$1.t1 values(1); -grant select on `test_$1`.* to mysqltest_1@localhost; -grant usage on `test_$1`.* to mysqltest_2@localhost; -grant drop on `test_$1`.* to mysqltest_3@localhost; +mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */ +create table mysqltest.t1(a int); +insert into mysqltest.t1 values(1); +grant select on `mysqltest`.* to mysqltest_1@localhost; +grant usage on `mysqltest`.* to mysqltest_2@localhost; +grant drop on `mysqltest`.* to mysqltest_3@localhost; select * from t1; a 1 -show create database test_$1; +show create database mysqltest; Database Create Database -test_$1 CREATE DATABASE `test_$1` /*!40100 DEFAULT CHARACTER SET latin1 */ +mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */ drop table t1; -ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'test_$1' -drop database test_$1; -ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'test_$1' -select * from test_$1.t1; -ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1' -show create database test_$1; -ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1' -drop table test_$1.t1; -ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1' -drop database test_$1; -ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1' -select * from test_$1.t1; -ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'test_$1' -show create database test_$1; -ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'test_$1' -drop table test_$1.t1; -drop database test_$1; +ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest' +drop database mysqltest; +ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest' +select * from mysqltest.t1; +ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest' +show create database mysqltest; +ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest' +drop table mysqltest.t1; +ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest' +drop database mysqltest; +ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest' +select * from mysqltest.t1; +ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest' +show create database mysqltest; +ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest' +drop table mysqltest.t1; +drop database mysqltest; set names binary; delete from mysql.user where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 80dd5c4077a..b67989231e0 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1259,11 +1259,6 @@ a b 2 NULL 3 1 drop table t1, t2; -create table t1(City VARCHAR(30),Location geometry); -insert into t1 values("Paris",GeomFromText('POINT(2.33 48.87)')); -select City from t1 where (select intersects(GeomFromText(AsText(Location)),GeomFromText('Polygon((2 50, 2.5 50, 2.5 47, 2 47, 2 50))'))=0); -City -drop table t1; CREATE TABLE `t1` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `pseudo` varchar(35) NOT NULL default '', @@ -1907,3 +1902,77 @@ select t000.a, count(*) `C` FROM t1 t000 GROUP BY t000.a HAVING count(*) > ALL ( a C 1 1 drop table t1,t2; +create table t1 (a int not null auto_increment primary key, b varchar(40), fulltext(b)); +insert into t1 (b) values ('ball'),('ball games'), ('games'), ('foo'), ('foobar'), ('Serg'), ('Sergei'),('Georg'), ('Patrik'),('Hakan'); +create table t2 (a int); +insert into t2 values (1),(3),(2),(7); +select a,b from t1 where match(b) against ('Ball') > 0; +a b +1 ball +2 ball games +select a from t2 where a in (select a from t1 where match(b) against ('Ball') > 0); +a +1 +2 +drop table t1,t2; +CREATE TABLE t1(`IZAVORGANG_ID` VARCHAR(11) CHARACTER SET latin1 COLLATE latin1_bin,`KUERZEL` VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_bin,`IZAANALYSEART_ID` VARCHAR(11) CHARACTER SET latin1 COLLATE latin1_bin,`IZAPMKZ_ID` VARCHAR(11) CHARACTER SET latin1 COLLATE latin1_bin); +CREATE INDEX AK01IZAVORGANG ON t1(izaAnalyseart_id,Kuerzel); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000001','601','D0000000001','I0000000001'); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000002','602','D0000000001','I0000000001'); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000003','603','D0000000001','I0000000001'); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000004','101','D0000000001','I0000000001'); +SELECT `IZAVORGANG_ID` FROM t1 WHERE `KUERZEL` IN(SELECT MIN(`KUERZEL`)`Feld1` FROM t1 WHERE `KUERZEL` LIKE'601%'And`IZAANALYSEART_ID`='D0000000001'); +IZAVORGANG_ID +D0000000001 +drop table t1; +CREATE TABLE `t1` ( `aid` int(11) NOT NULL default '0', `bid` int(11) NOT NULL default '0', PRIMARY KEY (`aid`,`bid`)); +CREATE TABLE `t2` ( `aid` int(11) NOT NULL default '0', `bid` int(11) NOT NULL default '0', PRIMARY KEY (`aid`,`bid`)); +insert into t1 values (1,1),(1,2),(2,1),(2,2); +insert into t2 values (1,2),(2,2); +select * from t1 where t1.aid not in (select aid from t2 where bid=t1.bid); +aid bid +1 1 +2 1 +alter table t2 drop primary key; +alter table t2 add key KEY1 (aid, bid); +select * from t1 where t1.aid not in (select aid from t2 where bid=t1.bid); +aid bid +1 1 +2 1 +alter table t2 drop key KEY1; +alter table t2 add primary key (bid, aid); +select * from t1 where t1.aid not in (select aid from t2 where bid=t1.bid); +aid bid +1 1 +2 1 +drop table t1,t2; +CREATE TABLE t1 (howmanyvalues bigint, avalue int); +INSERT INTO t1 VALUES (1, 1),(2, 1),(2, 2),(3, 1),(3, 2),(3, 3),(4, 1),(4, 2),(4, 3),(4, 4); +SELECT howmanyvalues, count(*) from t1 group by howmanyvalues; +howmanyvalues count(*) +1 1 +2 2 +3 3 +4 4 +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues = a.howmanyvalues) as mycount from t1 a group by a.howmanyvalues; +howmanyvalues mycount +1 1 +2 2 +3 3 +4 4 +CREATE INDEX t1_howmanyvalues_idx ON t1 (howmanyvalues); +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues+1 = a.howmanyvalues+1) as mycount from t1 a group by a.howmanyvalues; +howmanyvalues mycount +1 1 +2 2 +3 3 +4 4 +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues = a.howmanyvalues) as mycount from t1 a group by a.howmanyvalues; +howmanyvalues mycount +1 1 +2 2 +3 3 +4 4 +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues = a.avalue) as mycount from t1 a group by a.howmanyvalues; +ERROR 42S22: Unknown column 'a.avalue' in 'where clause' +drop table t1; diff --git a/mysql-test/r/subselect_gis.result b/mysql-test/r/subselect_gis.result new file mode 100644 index 00000000000..34ab7748656 --- /dev/null +++ b/mysql-test/r/subselect_gis.result @@ -0,0 +1,8 @@ +drop table if exists t1; +create table t1(City VARCHAR(30),Location geometry); +insert into t1 values("Paris",GeomFromText('POINT(2.33 48.87)')); +select City from t1 where (select +intersects(GeomFromText(AsText(Location)),GeomFromText('Polygon((2 50, 2.5 +50, 2.5 47, 2 47, 2 50))'))=0); +City +drop table t1; diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result index 2d0daae09be..1b5fc4f8b27 100644 --- a/mysql-test/r/system_mysql_db.result +++ b/mysql-test/r/system_mysql_db.result @@ -19,77 +19,77 @@ user BASE TABLE show create table db; Table Create Table db CREATE TABLE `db` ( - `Host` char(60) character set latin1 collate latin1_bin NOT NULL default '', - `Db` char(64) character set latin1 collate latin1_bin NOT NULL default '', - `User` char(16) character set latin1 collate latin1_bin NOT NULL default '', - `Select_priv` enum('N','Y') NOT NULL default 'N', - `Insert_priv` enum('N','Y') NOT NULL default 'N', - `Update_priv` enum('N','Y') NOT NULL default 'N', - `Delete_priv` enum('N','Y') NOT NULL default 'N', - `Create_priv` enum('N','Y') NOT NULL default 'N', - `Drop_priv` enum('N','Y') NOT NULL default 'N', - `Grant_priv` enum('N','Y') NOT NULL default 'N', - `References_priv` enum('N','Y') NOT NULL default 'N', - `Index_priv` enum('N','Y') NOT NULL default 'N', - `Alter_priv` enum('N','Y') NOT NULL default 'N', - `Create_tmp_table_priv` enum('N','Y') NOT NULL default 'N', - `Lock_tables_priv` enum('N','Y') NOT NULL default 'N', - `Create_view_priv` enum('N','Y') NOT NULL default 'N', - `Show_view_priv` enum('N','Y') NOT NULL default 'N', + `Host` char(60) collate utf8_bin NOT NULL default '', + `Db` char(64) collate utf8_bin NOT NULL default '', + `User` char(16) collate utf8_bin NOT NULL default '', + `Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Create_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Show_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', PRIMARY KEY (`Host`,`Db`,`User`), KEY `User` (`User`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Database privileges' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' show create table host; Table Create Table host CREATE TABLE `host` ( - `Host` char(60) character set latin1 collate latin1_bin NOT NULL default '', - `Db` char(64) character set latin1 collate latin1_bin NOT NULL default '', - `Select_priv` enum('N','Y') NOT NULL default 'N', - `Insert_priv` enum('N','Y') NOT NULL default 'N', - `Update_priv` enum('N','Y') NOT NULL default 'N', - `Delete_priv` enum('N','Y') NOT NULL default 'N', - `Create_priv` enum('N','Y') NOT NULL default 'N', - `Drop_priv` enum('N','Y') NOT NULL default 'N', - `Grant_priv` enum('N','Y') NOT NULL default 'N', - `References_priv` enum('N','Y') NOT NULL default 'N', - `Index_priv` enum('N','Y') NOT NULL default 'N', - `Alter_priv` enum('N','Y') NOT NULL default 'N', - `Create_tmp_table_priv` enum('N','Y') NOT NULL default 'N', - `Lock_tables_priv` enum('N','Y') NOT NULL default 'N', - `Create_view_priv` enum('N','Y') NOT NULL default 'N', - `Show_view_priv` enum('N','Y') NOT NULL default 'N', + `Host` char(60) collate utf8_bin NOT NULL default '', + `Db` char(64) collate utf8_bin NOT NULL default '', + `Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Create_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Show_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', PRIMARY KEY (`Host`,`Db`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Host privileges; Merged with database privileges' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' show create table user; Table Create Table user CREATE TABLE `user` ( - `Host` varchar(60) character set latin1 collate latin1_bin NOT NULL default '', - `User` varchar(16) character set latin1 collate latin1_bin NOT NULL default '', - `Password` varchar(41) character set latin1 collate latin1_bin NOT NULL default '', - `Select_priv` enum('N','Y') NOT NULL default 'N', - `Insert_priv` enum('N','Y') NOT NULL default 'N', - `Update_priv` enum('N','Y') NOT NULL default 'N', - `Delete_priv` enum('N','Y') NOT NULL default 'N', - `Create_priv` enum('N','Y') NOT NULL default 'N', - `Drop_priv` enum('N','Y') NOT NULL default 'N', - `Reload_priv` enum('N','Y') NOT NULL default 'N', - `Shutdown_priv` enum('N','Y') NOT NULL default 'N', - `Process_priv` enum('N','Y') NOT NULL default 'N', - `File_priv` enum('N','Y') NOT NULL default 'N', - `Grant_priv` enum('N','Y') NOT NULL default 'N', - `References_priv` enum('N','Y') NOT NULL default 'N', - `Index_priv` enum('N','Y') NOT NULL default 'N', - `Alter_priv` enum('N','Y') NOT NULL default 'N', - `Show_db_priv` enum('N','Y') NOT NULL default 'N', - `Super_priv` enum('N','Y') NOT NULL default 'N', - `Create_tmp_table_priv` enum('N','Y') NOT NULL default 'N', - `Lock_tables_priv` enum('N','Y') NOT NULL default 'N', - `Execute_priv` enum('N','Y') NOT NULL default 'N', - `Repl_slave_priv` enum('N','Y') NOT NULL default 'N', - `Repl_client_priv` enum('N','Y') NOT NULL default 'N', - `Create_view_priv` enum('N','Y') NOT NULL default 'N', - `Show_view_priv` enum('N','Y') NOT NULL default 'N', - `ssl_type` enum('','ANY','X509','SPECIFIED') NOT NULL default '', + `Host` varchar(60) collate utf8_bin NOT NULL default '', + `User` varchar(16) collate utf8_bin NOT NULL default '', + `Password` varchar(41) collate utf8_bin NOT NULL default '', + `Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Reload_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Shutdown_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Process_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `File_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Show_db_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Super_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Execute_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Repl_slave_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Repl_client_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Create_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `Show_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N', + `ssl_type` enum('','ANY','X509','SPECIFIED') collate utf8_bin NOT NULL default '', `ssl_cipher` blob NOT NULL, `x509_issuer` blob NOT NULL, `x509_subject` blob NOT NULL, @@ -97,41 +97,41 @@ user CREATE TABLE `user` ( `max_updates` int(11) unsigned NOT NULL default '0', `max_connections` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`Host`,`User`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Users and global privileges' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' show create table func; Table Create Table func CREATE TABLE `func` ( - `name` char(64) character set latin1 collate latin1_bin NOT NULL default '', + `name` char(64) collate utf8_bin NOT NULL default '', `ret` tinyint(1) NOT NULL default '0', - `dl` char(128) NOT NULL default '', - `type` enum('function','aggregate') NOT NULL default 'function', + `dl` char(128) collate utf8_bin NOT NULL default '', + `type` enum('function','aggregate') collate utf8_bin NOT NULL default 'function', PRIMARY KEY (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='User defined functions' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' show create table tables_priv; Table Create Table tables_priv CREATE TABLE `tables_priv` ( - `Host` char(60) character set latin1 collate latin1_bin NOT NULL default '', - `Db` char(64) character set latin1 collate latin1_bin NOT NULL default '', - `User` char(16) character set latin1 collate latin1_bin NOT NULL default '', - `Table_name` char(64) character set latin1 collate latin1_bin NOT NULL default '', - `Grantor` char(77) NOT NULL default '', + `Host` char(60) collate utf8_bin NOT NULL default '', + `Db` char(64) collate utf8_bin NOT NULL default '', + `User` char(16) collate utf8_bin NOT NULL default '', + `Table_name` char(64) collate utf8_bin NOT NULL default '', + `Grantor` char(77) collate utf8_bin NOT NULL default '', `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') NOT NULL default '', - `Column_priv` set('Select','Insert','Update','References') NOT NULL default '', + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') collate utf8_bin NOT NULL default '', + `Column_priv` set('Select','Insert','Update','References') collate utf8_bin NOT NULL default '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), KEY `Grantor` (`Grantor`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Table privileges' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' show create table columns_priv; Table Create Table columns_priv CREATE TABLE `columns_priv` ( - `Host` char(60) character set latin1 collate latin1_bin NOT NULL default '', - `Db` char(64) character set latin1 collate latin1_bin NOT NULL default '', - `User` char(16) character set latin1 collate latin1_bin NOT NULL default '', - `Table_name` char(64) character set latin1 collate latin1_bin NOT NULL default '', - `Column_name` char(64) character set latin1 collate latin1_bin NOT NULL default '', + `Host` char(60) collate utf8_bin NOT NULL default '', + `Db` char(64) collate utf8_bin NOT NULL default '', + `User` char(16) collate utf8_bin NOT NULL default '', + `Table_name` char(64) collate utf8_bin NOT NULL default '', + `Column_name` char(64) collate utf8_bin NOT NULL default '', `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `Column_priv` set('Select','Insert','Update','References') NOT NULL default '', + `Column_priv` set('Select','Insert','Update','References') collate utf8_bin NOT NULL default '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Column privileges' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' show tables; Tables_in_test table_type diff --git a/mysql-test/r/timezone2.result b/mysql-test/r/timezone2.result index 5361ff4ffe6..02406b77a65 100644 --- a/mysql-test/r/timezone2.result +++ b/mysql-test/r/timezone2.result @@ -244,3 +244,10 @@ NULL select convert_tz( NULL, 'MET', 'UTC'); convert_tz( NULL, 'MET', 'UTC') NULL +create table t1 (ts timestamp); +set timestamp=1000000000; +insert into t1 (ts) values (now()); +select convert_tz(ts, @@time_zone, 'Japan') from t1; +convert_tz(ts, @@time_zone, 'Japan') +2001-09-09 10:46:40 +drop table t1; diff --git a/mysql-test/r/truncate.result b/mysql-test/r/truncate.result index d777bd184b2..74a6cb72cc6 100644 --- a/mysql-test/r/truncate.result +++ b/mysql-test/r/truncate.result @@ -31,4 +31,25 @@ SELECT * from t1; a 1 2 +delete from t1; +insert into t1 (a) values (NULL),(NULL); +SELECT * from t1; +a +3 +4 +drop table t1; +create temporary table t1 (a integer auto_increment primary key); +insert into t1 (a) values (NULL),(NULL); +truncate table t1; +insert into t1 (a) values (NULL),(NULL); +SELECT * from t1; +a +1 +2 +delete from t1; +insert into t1 (a) values (NULL),(NULL); +SELECT * from t1; +a +3 +4 drop table t1; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 580fc9a8d0b..95bba1d4ec7 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -593,9 +593,12 @@ create table t1 (id integer primary key auto_increment, txt text, unique index t insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL); select * from t1 where txt='Chevy' or txt is NULL; id txt +3 NULL 1 Chevy 2 Chevy -3 NULL +explain select * from t1 where txt='Chevy' or txt is NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range txt_index txt_index 23 NULL 2 Using where select * from t1 where txt='Chevy '; id txt 1 Chevy @@ -663,6 +666,21 @@ id txt 1 Chevy 2 Chevy 4 Ford +alter table t1 modify column txt blob; +explain select * from t1 where txt='Chevy' or txt is NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 2 Using where +select * from t1 where txt='Chevy' or txt is NULL; +id txt +1 Chevy +3 NULL +explain select * from t1 where txt='Chevy' or txt is NULL order by txt; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 2 Using where; Using filesort +select * from t1 where txt='Chevy' or txt is NULL order by txt; +id txt +3 NULL +1 Chevy drop table t1; CREATE TABLE t1 ( i int(11) NOT NULL default '0', c text NOT NULL, PRIMARY KEY (i), KEY (c(1),c(1))); INSERT t1 VALUES (1,''),(2,''),(3,'asdfh'),(4,''); diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index e77ef9f975b..71d1b9ad381 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -79,3 +79,20 @@ SELECT DATE_FORMAT(f1, "%l.%i %p") , DATE_FORMAT(f2, "%l.%i %p") FROM t1; DATE_FORMAT(f1, "%l.%i %p") DATE_FORMAT(f2, "%l.%i %p") 9.00 AM 12.00 PM DROP TABLE t1; +CREATE TABLE t1 (f1 DATE); +CREATE TABLE t2 (f2 VARCHAR(8)); +CREATE TABLE t3 (f2 CHAR(8)); +INSERT INTO t1 VALUES ('1978-11-26'); +INSERT INTO t2 SELECT f1+0 FROM t1; +INSERT INTO t2 SELECT f1+0 FROM t1 UNION SELECT f1+0 FROM t1; +INSERT INTO t3 SELECT f1+0 FROM t1; +INSERT INTO t3 SELECT f1+0 FROM t1 UNION SELECT f1+0 FROM t1; +SELECT * FROM t2; +f2 +19781126 +19781126 +SELECT * FROM t3; +f2 +19781126 +19781126 +DROP TABLE t1, t2, t3; diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 30de1e62df7..843bdc2bdc5 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -75,14 +75,17 @@ insert t1 values (121,"16"); select c1 + c1 * (c2 / 100) as col from t1; col 140.36 -create table t2 select c1 + c1 * (c2 / 100) as col from t1; +create table t2 select c1 + c1 * (c2 / 100) as col1, round(c1, 5) as col2, round(c1, 35) as col3, sqrt(c1*1e-15) col4 from t1; select * from t2; -col -140.36 +col1 col2 col3 col4 +140.36 121.00000 121 3.47850542618522e-07 show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `col` double default NULL + `col1` double default NULL, + `col2` double(22,5) default NULL, + `col3` double default NULL, + `col4` double default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1,t2; create table t1 (a float); @@ -132,6 +135,9 @@ t1 CREATE TABLE `t1` ( `b` double(200,30) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +create table t1 (c20 char); +insert into t1 values (5000.0); +drop table t1; create table t1 (f float(54)); ERROR 42000: Incorrect column specifier for column 'f' drop table if exists t1; diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index e803fde14a6..5a65c90c5c7 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -272,7 +272,7 @@ auto bigint(17) unsigned NULL PRI 0 select,insert,update,references t1 bigint(1) NULL 0 select,insert,update,references t2 char(1) latin1_swedish_ci select,insert,update,references t3 longtext latin1_swedish_ci select,insert,update,references -t4 longtext latin1_bin select,insert,update,references +t4 longblob NULL select,insert,update,references select * from t2; auto t1 t2 t3 t4 11 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index aa8c0903558..425e4a05586 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -365,3 +365,15 @@ select * from t1; t1 i 2004-04-01 00:00:00 10 drop table t1; +create table t1 (ts timestamp(19)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +set TIMESTAMP=1000000000; +insert into t1 values (); +select * from t1; +ts +2001-09-09 04:46:40 +drop table t1; diff --git a/mysql-test/r/type_uint.result b/mysql-test/r/type_uint.result index 07eb47faa7c..d8edf9085b7 100644 --- a/mysql-test/r/type_uint.result +++ b/mysql-test/r/type_uint.result @@ -5,8 +5,12 @@ insert into t1 values (1); insert into t1 values (-1); Warnings: Warning 1264 Data truncated; out of range for column 'this' at row 1 +insert into t1 values ('5000000000'); +Warnings: +Warning 1265 Data truncated for column 'this' at row 1 select * from t1; this 1 0 +4294967295 drop table t1; diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 4a0c500c15c..99e0a69834e 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -436,6 +436,14 @@ select length(version()) > 1 as `*` UNION select 2; * 1 2 +create table t1 (a int); +insert into t1 values (0), (3), (1), (2); +explain (select * from t1) union (select * from t1) order by a; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 +2 UNION t1 ALL NULL NULL NULL NULL 4 +NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL Using filesort +drop table t1; CREATE TABLE t1 ( id int(3) unsigned default '0') ENGINE=MyISAM; INSERT INTO t1 (id) VALUES("1"); CREATE TABLE t2 ( id int(3) unsigned default '0', id_master int(5) default '0', text1 varchar(5) default NULL, text2 varchar(5) default NULL) ENGINE=MyISAM; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 498e1634dc4..a84cf733f21 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -460,3 +460,19 @@ SELECT @@global.session.key_buffer_size; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 SELECT @@global.local.key_buffer_size; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 +set @tstlw = @@log_warnings; +show global variables like 'log_warnings'; +Variable_name Value +log_warnings 1 +set global log_warnings = 0; +show global variables like 'log_warnings'; +Variable_name Value +log_warnings 0 +set global log_warnings = 42; +show global variables like 'log_warnings'; +Variable_name Value +log_warnings 42 +set global log_warnings = @tstlw; +show global variables like 'log_warnings'; +Variable_name Value +log_warnings 1 diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 07427c616f6..eb35aa90fe2 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -312,3 +312,14 @@ insert into t1 values (1,1), (2,2); alter table t1 drop key no_such_key; alter table t1 drop key a; drop table t1; + +# +# BUG#4717 - check for valid table names +# +create table t1 (a int); +--error 1103 +alter table t1 rename to `t1\\`; +--error 1103 +rename table t1 to `t1\\`; +drop table t1; + diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test index 73588a91aac..e5986e6755d 100644 --- a/mysql-test/t/auto_increment.test +++ b/mysql-test/t/auto_increment.test @@ -138,6 +138,13 @@ insert into t1(b)values(5); insert into t1(b)values(6); insert into t1(b)values(7); select * from t1 order by b; +alter table t1 modify b mediumint; +select * from t1 order by b; +create table t2 (a int); +insert t2 values (1),(2); +alter table t2 add b int auto_increment primary key; +select * from t2; +drop table t2; delete from t1 where a=0; update t1 set a=0 where b=5; select * from t1 order by b; diff --git a/mysql-test/t/binary.test b/mysql-test/t/binary.test index 20a047e0b26..3e702fd5257 100644 --- a/mysql-test/t/binary.test +++ b/mysql-test/t/binary.test @@ -38,6 +38,7 @@ select concat("-",a,"-",b,"-") from t1 where b="hello "; select concat("-",a,"-",b,"-") from t1 ignore index (b) where b="hello "; # blob test alter table t1 modify b tinytext not null, drop key b, add key (b(100)); +select concat("-",a,"-",b,"-") from t1; select concat("-",a,"-",b,"-") from t1 where b="hello "; select concat("-",a,"-",b,"-") from t1 ignore index (b) where b="hello "; drop table t1; @@ -66,3 +67,16 @@ select * from t1 where lower(b)='bbb'; select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1; select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1; drop table t1; + +# +# Bug5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results +# + +create table t1( firstname char(20), lastname char(20)); +insert into t1 values ("john","doe"),("John","Doe"); +select * from t1 where firstname='john' and firstname like binary 'john'; +select * from t1 where firstname='john' and binary 'john' = firstname; +select * from t1 where firstname='john' and firstname = binary 'john'; +select * from t1 where firstname='John' and firstname like binary 'john'; +select * from t1 where firstname='john' and firstname like binary 'John'; +drop table t1; diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index 32c1479ae04..4598ca5ea15 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -48,6 +48,9 @@ flush privileges; #connect (con1,localhost,test,gambling2,""); #show tables; connect (con1,localhost,test,gambling2,mysql); +set password=""; +--error 1105 +set password='gambling3'; set password=old_password('gambling3'); show tables; connect (con1,localhost,test,gambling3,test); diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 30441fb9aae..26c527ca7cb 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -4,7 +4,7 @@ --disable_warnings drop table if exists t1,t2,t3; -drop database if exists test_$1; +drop database if exists mysqltest; --enable_warnings create table t1 (b char(0)); @@ -69,14 +69,14 @@ drop table 1ea10; create table t1 (t1.index int); drop table t1; # Test that we get warning for this -drop database if exists test_$1; -create database test_$1; -create table test_$1.$test1 (a$1 int, $b int, c$ int); -insert into test_$1.$test1 values (1,2,3); -select a$1, $b, c$ from test_$1.$test1; -create table test_$1.test2$ (a int); -drop table test_$1.test2$; -drop database test_$1; +drop database if exists mysqltest; +create database mysqltest; +create table mysqltest.$test1 (a$1 int, $b int, c$ int); +insert into mysqltest.$test1 values (1,2,3); +select a$1, $b, c$ from mysqltest.$test1; +create table mysqltest.test2$ (a int); +drop table mysqltest.test2$; +drop database mysqltest; --error 1103 create table `` (a int); @@ -281,16 +281,16 @@ drop table t3; show create table t3; select * from t3; drop table t2, t3; -create database test_$1; -create table test_$1.t3 like t1; -create temporary table t3 like test_$1.t3; +create database mysqltest; +create table mysqltest.t3 like t1; +create temporary table t3 like mysqltest.t3; show create table t3; create table t2 like t3; show create table t2; select * from t2; create table t3 like t1; --error 1050 -create table t3 like test_$1.t3; +create table t3 like mysqltest.t3; --error 1044,1 create table non_existing_database.t1 like t1; --error 1051 @@ -301,7 +301,7 @@ create temporary table t3 like t1; create table t3 like `a/a`; drop table t1, t2, t3; drop table t3; -drop database test_$1; +drop database mysqltest; # # Test default table type @@ -393,10 +393,10 @@ drop table t1, t2, t3; # Bug #1209 # -create database test_$1; -use test_$1; +create database mysqltest; +use mysqltest; select database(); -drop database test_$1; +drop database mysqltest; select database(); # Connect without a database diff --git a/mysql-test/t/create_select_tmp.test b/mysql-test/t/create_select_tmp.test index 166d32fb17c..d81a3799d98 100644 --- a/mysql-test/t/create_select_tmp.test +++ b/mysql-test/t/create_select_tmp.test @@ -12,18 +12,18 @@ drop table if exists t1, t2; CREATE TABLE t1 ( a int ); INSERT INTO t1 VALUES (1),(2),(1); --error 1062; -CREATE TABLE t2 ( PRIMARY KEY (a) ) TYPE=INNODB SELECT a FROM t1; +CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; --error 1146; select * from t2; --error 1062; -CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) TYPE=INNODB SELECT a FROM t1; +CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; --error 1146; select * from t2; --error 1062; -CREATE TABLE t2 ( PRIMARY KEY (a) ) TYPE=MYISAM SELECT a FROM t1; +CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; --error 1146; select * from t2; --error 1062; -CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) TYPE=MYISAM SELECT a FROM t1; +CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; --error 1146; select * from t2; diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test new file mode 100644 index 00000000000..591fab3961a --- /dev/null +++ b/mysql-test/t/csv.test @@ -0,0 +1,1315 @@ +# +# Test for the CSV engine +# + +-- source include/have_csv.inc + +# +# Simple select test +# + +--disable_warnings +drop table if exists t1,t2,t3,t4; +--enable_warnings + +CREATE TABLE t1 ( + Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, + Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL +) ENGINE = CSV; + +INSERT INTO t1 VALUES (9410,9412); + +select period from t1; +select * from t1; +select t1.* from t1; + +# +# Create test table +# + +CREATE TABLE t2 ( + auto int not null, + fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL, + companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL, + fld3 char(30) DEFAULT '' NOT NULL, + fld4 char(35) DEFAULT '' NOT NULL, + fld5 char(35) DEFAULT '' NOT NULL, + fld6 char(4) DEFAULT '' NOT NULL +) ENGINE = CSV; + +# +# Populate table +# + +--disable_query_log +INSERT INTO t2 VALUES (1,000001,00,'Omaha','teethe','neat',''); +INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W'); +INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring',''); +INSERT INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''); +INSERT INTO t2 VALUES (5,011501,37,'bewilderingly','wallet','balled',''); +INSERT INTO t2 VALUES (6,011701,37,'astound','parters','persist','W'); +INSERT INTO t2 VALUES (7,011702,37,'admonishing','eschew','attainments',''); +INSERT INTO t2 VALUES (8,011703,37,'sumac','quitter','fanatic',''); +INSERT INTO t2 VALUES (9,012001,37,'flanking','neat','measures','FAS'); +INSERT INTO t2 VALUES (10,012003,37,'combed','Steinberg','rightfulness',''); +INSERT INTO t2 VALUES (11,012004,37,'subjective','jarring','capably',''); +INSERT INTO t2 VALUES (12,012005,37,'scatterbrain','tinily','impulsive',''); +INSERT INTO t2 VALUES (13,012301,37,'Eulerian','balled','starlet',''); +INSERT INTO t2 VALUES (14,012302,36,'dubbed','persist','terminators',''); +INSERT INTO t2 VALUES (15,012303,37,'Kane','attainments','untying',''); +INSERT INTO t2 VALUES (16,012304,37,'overlay','fanatic','announces','FAS'); +INSERT INTO t2 VALUES (17,012305,37,'perturb','measures','featherweight','FAS'); +INSERT INTO t2 VALUES (18,012306,37,'goblins','rightfulness','pessimist','FAS'); +INSERT INTO t2 VALUES (19,012501,37,'annihilates','capably','daughter',''); +INSERT INTO t2 VALUES (20,012602,37,'Wotan','impulsive','decliner','FAS'); +INSERT INTO t2 VALUES (21,012603,37,'snatching','starlet','lawgiver',''); +INSERT INTO t2 VALUES (22,012604,37,'concludes','terminators','stated',''); +INSERT INTO t2 VALUES (23,012605,37,'laterally','untying','readable',''); +INSERT INTO t2 VALUES (24,012606,37,'yelped','announces','attrition',''); +INSERT INTO t2 VALUES (25,012701,37,'grazing','featherweight','cascade','FAS'); +INSERT INTO t2 VALUES (26,012702,37,'Baird','pessimist','motors','FAS'); +INSERT INTO t2 VALUES (27,012703,37,'celery','daughter','interrogate',''); +INSERT INTO t2 VALUES (28,012704,37,'misunderstander','decliner','pests','W'); +INSERT INTO t2 VALUES (29,013601,37,'handgun','lawgiver','stairway',''); +INSERT INTO t2 VALUES (30,013602,37,'foldout','stated','dopers','FAS'); +INSERT INTO t2 VALUES (31,013603,37,'mystic','readable','testicle','W'); +INSERT INTO t2 VALUES (32,013604,37,'succumbed','attrition','Parsifal','W'); +INSERT INTO t2 VALUES (33,013605,37,'Nabisco','cascade','leavings',''); +INSERT INTO t2 VALUES (34,013606,37,'fingerings','motors','postulation','W'); +INSERT INTO t2 VALUES (35,013607,37,'aging','interrogate','squeaking',''); +INSERT INTO t2 VALUES (36,013608,37,'afield','pests','contrasted',''); +INSERT INTO t2 VALUES (37,013609,37,'ammonium','stairway','leftover',''); +INSERT INTO t2 VALUES (38,013610,37,'boat','dopers','whiteners',''); +INSERT INTO t2 VALUES (39,013801,37,'intelligibility','testicle','erases','W'); +INSERT INTO t2 VALUES (40,013802,37,'Augustine','Parsifal','Punjab','W'); +INSERT INTO t2 VALUES (41,013803,37,'teethe','leavings','Merritt',''); +INSERT INTO t2 VALUES (42,013804,37,'dreaded','postulation','Quixotism',''); +INSERT INTO t2 VALUES (43,013901,37,'scholastics','squeaking','sweetish','FAS'); +INSERT INTO t2 VALUES (44,016001,37,'audiology','contrasted','dogging','FAS'); +INSERT INTO t2 VALUES (45,016201,37,'wallet','leftover','scornfully','FAS'); +INSERT INTO t2 VALUES (46,016202,37,'parters','whiteners','bellow',''); +INSERT INTO t2 VALUES (47,016301,37,'eschew','erases','bills',''); +INSERT INTO t2 VALUES (48,016302,37,'quitter','Punjab','cupboard','FAS'); +INSERT INTO t2 VALUES (49,016303,37,'neat','Merritt','sureties','FAS'); +INSERT INTO t2 VALUES (50,016304,37,'Steinberg','Quixotism','puddings',''); +INSERT INTO t2 VALUES (51,018001,37,'jarring','sweetish','tapestry',''); +INSERT INTO t2 VALUES (52,018002,37,'tinily','dogging','fetters',''); +INSERT INTO t2 VALUES (53,018003,37,'balled','scornfully','bivalves',''); +INSERT INTO t2 VALUES (54,018004,37,'persist','bellow','incurring',''); +INSERT INTO t2 VALUES (55,018005,37,'attainments','bills','Adolph',''); +INSERT INTO t2 VALUES (56,018007,37,'fanatic','cupboard','pithed',''); +INSERT INTO t2 VALUES (57,018008,37,'measures','sureties','emergency',''); +INSERT INTO t2 VALUES (58,018009,37,'rightfulness','puddings','Miles',''); +INSERT INTO t2 VALUES (59,018010,37,'capably','tapestry','trimmings',''); +INSERT INTO t2 VALUES (60,018012,37,'impulsive','fetters','tragedies','W'); +INSERT INTO t2 VALUES (61,018013,37,'starlet','bivalves','skulking','W'); +INSERT INTO t2 VALUES (62,018014,37,'terminators','incurring','flint',''); +INSERT INTO t2 VALUES (63,018015,37,'untying','Adolph','flopping','W'); +INSERT INTO t2 VALUES (64,018016,37,'announces','pithed','relaxing','FAS'); +INSERT INTO t2 VALUES (65,018017,37,'featherweight','emergency','offload','FAS'); +INSERT INTO t2 VALUES (66,018018,37,'pessimist','Miles','suites','W'); +INSERT INTO t2 VALUES (67,018019,37,'daughter','trimmings','lists','FAS'); +INSERT INTO t2 VALUES (68,018020,37,'decliner','tragedies','animized','FAS'); +INSERT INTO t2 VALUES (69,018021,37,'lawgiver','skulking','multilayer','W'); +INSERT INTO t2 VALUES (70,018022,37,'stated','flint','standardizes','FAS'); +INSERT INTO t2 VALUES (71,018023,37,'readable','flopping','Judas',''); +INSERT INTO t2 VALUES (72,018024,37,'attrition','relaxing','vacuuming','W'); +INSERT INTO t2 VALUES (73,018025,37,'cascade','offload','dentally','W'); +INSERT INTO t2 VALUES (74,018026,37,'motors','suites','humanness','W'); +INSERT INTO t2 VALUES (75,018027,37,'interrogate','lists','inch','W'); +INSERT INTO t2 VALUES (76,018028,37,'pests','animized','Weissmuller','W'); +INSERT INTO t2 VALUES (77,018029,37,'stairway','multilayer','irresponsibly','W'); +INSERT INTO t2 VALUES (78,018030,37,'dopers','standardizes','luckily','FAS'); +INSERT INTO t2 VALUES (79,018032,37,'testicle','Judas','culled','W'); +INSERT INTO t2 VALUES (80,018033,37,'Parsifal','vacuuming','medical','FAS'); +INSERT INTO t2 VALUES (81,018034,37,'leavings','dentally','bloodbath','FAS'); +INSERT INTO t2 VALUES (82,018035,37,'postulation','humanness','subschema','W'); +INSERT INTO t2 VALUES (83,018036,37,'squeaking','inch','animals','W'); +INSERT INTO t2 VALUES (84,018037,37,'contrasted','Weissmuller','Micronesia',''); +INSERT INTO t2 VALUES (85,018038,37,'leftover','irresponsibly','repetitions',''); +INSERT INTO t2 VALUES (86,018039,37,'whiteners','luckily','Antares',''); +INSERT INTO t2 VALUES (87,018040,37,'erases','culled','ventilate','W'); +INSERT INTO t2 VALUES (88,018041,37,'Punjab','medical','pityingly',''); +INSERT INTO t2 VALUES (89,018042,37,'Merritt','bloodbath','interdependent',''); +INSERT INTO t2 VALUES (90,018043,37,'Quixotism','subschema','Graves','FAS'); +INSERT INTO t2 VALUES (91,018044,37,'sweetish','animals','neonatal',''); +INSERT INTO t2 VALUES (92,018045,37,'dogging','Micronesia','scribbled','FAS'); +INSERT INTO t2 VALUES (93,018046,37,'scornfully','repetitions','chafe','W'); +INSERT INTO t2 VALUES (94,018048,37,'bellow','Antares','honoring',''); +INSERT INTO t2 VALUES (95,018049,37,'bills','ventilate','realtor',''); +INSERT INTO t2 VALUES (96,018050,37,'cupboard','pityingly','elite',''); +INSERT INTO t2 VALUES (97,018051,37,'sureties','interdependent','funereal',''); +INSERT INTO t2 VALUES (98,018052,37,'puddings','Graves','abrogating',''); +INSERT INTO t2 VALUES (99,018053,50,'tapestry','neonatal','sorters',''); +INSERT INTO t2 VALUES (100,018054,37,'fetters','scribbled','Conley',''); +INSERT INTO t2 VALUES (101,018055,37,'bivalves','chafe','lectured',''); +INSERT INTO t2 VALUES (102,018056,37,'incurring','honoring','Abraham',''); +INSERT INTO t2 VALUES (103,018057,37,'Adolph','realtor','Hawaii','W'); +INSERT INTO t2 VALUES (104,018058,37,'pithed','elite','cage',''); +INSERT INTO t2 VALUES (105,018059,36,'emergency','funereal','hushes',''); +INSERT INTO t2 VALUES (106,018060,37,'Miles','abrogating','Simla',''); +INSERT INTO t2 VALUES (107,018061,37,'trimmings','sorters','reporters',''); +INSERT INTO t2 VALUES (108,018101,37,'tragedies','Conley','Dutchman','FAS'); +INSERT INTO t2 VALUES (109,018102,37,'skulking','lectured','descendants','FAS'); +INSERT INTO t2 VALUES (110,018103,37,'flint','Abraham','groupings','FAS'); +INSERT INTO t2 VALUES (111,018104,37,'flopping','Hawaii','dissociate',''); +INSERT INTO t2 VALUES (112,018201,37,'relaxing','cage','coexist','W'); +INSERT INTO t2 VALUES (113,018202,37,'offload','hushes','Beebe',''); +INSERT INTO t2 VALUES (114,018402,37,'suites','Simla','Taoism',''); +INSERT INTO t2 VALUES (115,018403,37,'lists','reporters','Connally',''); +INSERT INTO t2 VALUES (116,018404,37,'animized','Dutchman','fetched','FAS'); +INSERT INTO t2 VALUES (117,018405,37,'multilayer','descendants','checkpoints','FAS'); +INSERT INTO t2 VALUES (118,018406,37,'standardizes','groupings','rusting',''); +INSERT INTO t2 VALUES (119,018409,37,'Judas','dissociate','galling',''); +INSERT INTO t2 VALUES (120,018601,37,'vacuuming','coexist','obliterates',''); +INSERT INTO t2 VALUES (121,018602,37,'dentally','Beebe','traitor',''); +INSERT INTO t2 VALUES (122,018603,37,'humanness','Taoism','resumes','FAS'); +INSERT INTO t2 VALUES (123,018801,37,'inch','Connally','analyzable','FAS'); +INSERT INTO t2 VALUES (124,018802,37,'Weissmuller','fetched','terminator','FAS'); +INSERT INTO t2 VALUES (125,018803,37,'irresponsibly','checkpoints','gritty','FAS'); +INSERT INTO t2 VALUES (126,018804,37,'luckily','rusting','firearm','W'); +INSERT INTO t2 VALUES (127,018805,37,'culled','galling','minima',''); +INSERT INTO t2 VALUES (128,018806,37,'medical','obliterates','Selfridge',''); +INSERT INTO t2 VALUES (129,018807,37,'bloodbath','traitor','disable',''); +INSERT INTO t2 VALUES (130,018808,37,'subschema','resumes','witchcraft','W'); +INSERT INTO t2 VALUES (131,018809,37,'animals','analyzable','betroth','W'); +INSERT INTO t2 VALUES (132,018810,37,'Micronesia','terminator','Manhattanize',''); +INSERT INTO t2 VALUES (133,018811,37,'repetitions','gritty','imprint',''); +INSERT INTO t2 VALUES (134,018812,37,'Antares','firearm','peeked',''); +INSERT INTO t2 VALUES (135,019101,37,'ventilate','minima','swelling',''); +INSERT INTO t2 VALUES (136,019102,37,'pityingly','Selfridge','interrelationships','W'); +INSERT INTO t2 VALUES (137,019103,37,'interdependent','disable','riser',''); +INSERT INTO t2 VALUES (138,019201,37,'Graves','witchcraft','Gandhian','W'); +INSERT INTO t2 VALUES (139,030501,37,'neonatal','betroth','peacock','A'); +INSERT INTO t2 VALUES (140,030502,50,'scribbled','Manhattanize','bee','A'); +INSERT INTO t2 VALUES (141,030503,37,'chafe','imprint','kanji',''); +INSERT INTO t2 VALUES (142,030504,37,'honoring','peeked','dental',''); +INSERT INTO t2 VALUES (143,031901,37,'realtor','swelling','scarf','FAS'); +INSERT INTO t2 VALUES (144,036001,37,'elite','interrelationships','chasm','A'); +INSERT INTO t2 VALUES (145,036002,37,'funereal','riser','insolence','A'); +INSERT INTO t2 VALUES (146,036004,37,'abrogating','Gandhian','syndicate',''); +INSERT INTO t2 VALUES (147,036005,37,'sorters','peacock','alike',''); +INSERT INTO t2 VALUES (148,038001,37,'Conley','bee','imperial','A'); +INSERT INTO t2 VALUES (149,038002,37,'lectured','kanji','convulsion','A'); +INSERT INTO t2 VALUES (150,038003,37,'Abraham','dental','railway','A'); +INSERT INTO t2 VALUES (151,038004,37,'Hawaii','scarf','validate','A'); +INSERT INTO t2 VALUES (152,038005,37,'cage','chasm','normalizes','A'); +INSERT INTO t2 VALUES (153,038006,37,'hushes','insolence','comprehensive',''); +INSERT INTO t2 VALUES (154,038007,37,'Simla','syndicate','chewing',''); +INSERT INTO t2 VALUES (155,038008,37,'reporters','alike','denizen',''); +INSERT INTO t2 VALUES (156,038009,37,'Dutchman','imperial','schemer',''); +INSERT INTO t2 VALUES (157,038010,37,'descendants','convulsion','chronicle',''); +INSERT INTO t2 VALUES (158,038011,37,'groupings','railway','Kline',''); +INSERT INTO t2 VALUES (159,038012,37,'dissociate','validate','Anatole',''); +INSERT INTO t2 VALUES (160,038013,37,'coexist','normalizes','partridges',''); +INSERT INTO t2 VALUES (161,038014,37,'Beebe','comprehensive','brunch',''); +INSERT INTO t2 VALUES (162,038015,37,'Taoism','chewing','recruited',''); +INSERT INTO t2 VALUES (163,038016,37,'Connally','denizen','dimensions','W'); +INSERT INTO t2 VALUES (164,038017,37,'fetched','schemer','Chicana','W'); +INSERT INTO t2 VALUES (165,038018,37,'checkpoints','chronicle','announced',''); +INSERT INTO t2 VALUES (166,038101,37,'rusting','Kline','praised','FAS'); +INSERT INTO t2 VALUES (167,038102,37,'galling','Anatole','employing',''); +INSERT INTO t2 VALUES (168,038103,37,'obliterates','partridges','linear',''); +INSERT INTO t2 VALUES (169,038104,37,'traitor','brunch','quagmire',''); +INSERT INTO t2 VALUES (170,038201,37,'resumes','recruited','western','A'); +INSERT INTO t2 VALUES (171,038202,37,'analyzable','dimensions','relishing',''); +INSERT INTO t2 VALUES (172,038203,37,'terminator','Chicana','serving','A'); +INSERT INTO t2 VALUES (173,038204,37,'gritty','announced','scheduling',''); +INSERT INTO t2 VALUES (174,038205,37,'firearm','praised','lore',''); +INSERT INTO t2 VALUES (175,038206,37,'minima','employing','eventful',''); +INSERT INTO t2 VALUES (176,038208,37,'Selfridge','linear','arteriole','A'); +INSERT INTO t2 VALUES (177,042801,37,'disable','quagmire','disentangle',''); +INSERT INTO t2 VALUES (178,042802,37,'witchcraft','western','cured','A'); +INSERT INTO t2 VALUES (179,046101,37,'betroth','relishing','Fenton','W'); +INSERT INTO t2 VALUES (180,048001,37,'Manhattanize','serving','avoidable','A'); +INSERT INTO t2 VALUES (181,048002,37,'imprint','scheduling','drains','A'); +INSERT INTO t2 VALUES (182,048003,37,'peeked','lore','detectably','FAS'); +INSERT INTO t2 VALUES (183,048004,37,'swelling','eventful','husky',''); +INSERT INTO t2 VALUES (184,048005,37,'interrelationships','arteriole','impelling',''); +INSERT INTO t2 VALUES (185,048006,37,'riser','disentangle','undoes',''); +INSERT INTO t2 VALUES (186,048007,37,'Gandhian','cured','evened',''); +INSERT INTO t2 VALUES (187,048008,37,'peacock','Fenton','squeezes',''); +INSERT INTO t2 VALUES (188,048101,37,'bee','avoidable','destroyer','FAS'); +INSERT INTO t2 VALUES (189,048102,37,'kanji','drains','rudeness',''); +INSERT INTO t2 VALUES (190,048201,37,'dental','detectably','beaner','FAS'); +INSERT INTO t2 VALUES (191,048202,37,'scarf','husky','boorish',''); +INSERT INTO t2 VALUES (192,048203,37,'chasm','impelling','Everhart',''); +INSERT INTO t2 VALUES (193,048204,37,'insolence','undoes','encompass','A'); +INSERT INTO t2 VALUES (194,048205,37,'syndicate','evened','mushrooms',''); +INSERT INTO t2 VALUES (195,048301,37,'alike','squeezes','Alison','A'); +INSERT INTO t2 VALUES (196,048302,37,'imperial','destroyer','externally','FAS'); +INSERT INTO t2 VALUES (197,048303,37,'convulsion','rudeness','pellagra',''); +INSERT INTO t2 VALUES (198,048304,37,'railway','beaner','cult',''); +INSERT INTO t2 VALUES (199,048305,37,'validate','boorish','creek','A'); +INSERT INTO t2 VALUES (200,048401,37,'normalizes','Everhart','Huffman',''); +INSERT INTO t2 VALUES (201,048402,37,'comprehensive','encompass','Majorca','FAS'); +INSERT INTO t2 VALUES (202,048403,37,'chewing','mushrooms','governing','A'); +INSERT INTO t2 VALUES (203,048404,37,'denizen','Alison','gadfly','FAS'); +INSERT INTO t2 VALUES (204,048405,37,'schemer','externally','reassigned','FAS'); +INSERT INTO t2 VALUES (205,048406,37,'chronicle','pellagra','intentness','W'); +INSERT INTO t2 VALUES (206,048407,37,'Kline','cult','craziness',''); +INSERT INTO t2 VALUES (207,048408,37,'Anatole','creek','psychic',''); +INSERT INTO t2 VALUES (208,048409,37,'partridges','Huffman','squabbled',''); +INSERT INTO t2 VALUES (209,048410,37,'brunch','Majorca','burlesque',''); +INSERT INTO t2 VALUES (210,048411,37,'recruited','governing','capped',''); +INSERT INTO t2 VALUES (211,048412,37,'dimensions','gadfly','extracted','A'); +INSERT INTO t2 VALUES (212,048413,37,'Chicana','reassigned','DiMaggio',''); +INSERT INTO t2 VALUES (213,048601,37,'announced','intentness','exclamation','FAS'); +INSERT INTO t2 VALUES (214,048602,37,'praised','craziness','subdirectory',''); +INSERT INTO t2 VALUES (215,048603,37,'employing','psychic','fangs',''); +INSERT INTO t2 VALUES (216,048604,37,'linear','squabbled','buyer','A'); +INSERT INTO t2 VALUES (217,048801,37,'quagmire','burlesque','pithing','A'); +INSERT INTO t2 VALUES (218,050901,37,'western','capped','transistorizing','A'); +INSERT INTO t2 VALUES (219,051201,37,'relishing','extracted','nonbiodegradable',''); +INSERT INTO t2 VALUES (220,056002,37,'serving','DiMaggio','dislocate',''); +INSERT INTO t2 VALUES (221,056003,37,'scheduling','exclamation','monochromatic','FAS'); +INSERT INTO t2 VALUES (222,056004,37,'lore','subdirectory','batting',''); +INSERT INTO t2 VALUES (223,056102,37,'eventful','fangs','postcondition','A'); +INSERT INTO t2 VALUES (224,056203,37,'arteriole','buyer','catalog','FAS'); +INSERT INTO t2 VALUES (225,056204,37,'disentangle','pithing','Remus',''); +INSERT INTO t2 VALUES (226,058003,37,'cured','transistorizing','devices','A'); +INSERT INTO t2 VALUES (227,058004,37,'Fenton','nonbiodegradable','bike','A'); +INSERT INTO t2 VALUES (228,058005,37,'avoidable','dislocate','qualify',''); +INSERT INTO t2 VALUES (229,058006,37,'drains','monochromatic','detained',''); +INSERT INTO t2 VALUES (230,058007,37,'detectably','batting','commended',''); +INSERT INTO t2 VALUES (231,058101,37,'husky','postcondition','civilize',''); +INSERT INTO t2 VALUES (232,058102,37,'impelling','catalog','Elmhurst',''); +INSERT INTO t2 VALUES (233,058103,37,'undoes','Remus','anesthetizing',''); +INSERT INTO t2 VALUES (234,058105,37,'evened','devices','deaf',''); +INSERT INTO t2 VALUES (235,058111,37,'squeezes','bike','Brigham',''); +INSERT INTO t2 VALUES (236,058112,37,'destroyer','qualify','title',''); +INSERT INTO t2 VALUES (237,058113,37,'rudeness','detained','coarse',''); +INSERT INTO t2 VALUES (238,058114,37,'beaner','commended','combinations',''); +INSERT INTO t2 VALUES (239,058115,37,'boorish','civilize','grayness',''); +INSERT INTO t2 VALUES (240,058116,37,'Everhart','Elmhurst','innumerable','FAS'); +INSERT INTO t2 VALUES (241,058117,37,'encompass','anesthetizing','Caroline','A'); +INSERT INTO t2 VALUES (242,058118,37,'mushrooms','deaf','fatty','FAS'); +INSERT INTO t2 VALUES (243,058119,37,'Alison','Brigham','eastbound',''); +INSERT INTO t2 VALUES (244,058120,37,'externally','title','inexperienced',''); +INSERT INTO t2 VALUES (245,058121,37,'pellagra','coarse','hoarder','A'); +INSERT INTO t2 VALUES (246,058122,37,'cult','combinations','scotch','W'); +INSERT INTO t2 VALUES (247,058123,37,'creek','grayness','passport','A'); +INSERT INTO t2 VALUES (248,058124,37,'Huffman','innumerable','strategic','FAS'); +INSERT INTO t2 VALUES (249,058125,37,'Majorca','Caroline','gated',''); +INSERT INTO t2 VALUES (250,058126,37,'governing','fatty','flog',''); +INSERT INTO t2 VALUES (251,058127,37,'gadfly','eastbound','Pipestone',''); +INSERT INTO t2 VALUES (252,058128,37,'reassigned','inexperienced','Dar',''); +INSERT INTO t2 VALUES (253,058201,37,'intentness','hoarder','Corcoran',''); +INSERT INTO t2 VALUES (254,058202,37,'craziness','scotch','flyers','A'); +INSERT INTO t2 VALUES (255,058303,37,'psychic','passport','competitions','W'); +INSERT INTO t2 VALUES (256,058304,37,'squabbled','strategic','suppliers','FAS'); +INSERT INTO t2 VALUES (257,058602,37,'burlesque','gated','skips',''); +INSERT INTO t2 VALUES (258,058603,37,'capped','flog','institutes',''); +INSERT INTO t2 VALUES (259,058604,37,'extracted','Pipestone','troop','A'); +INSERT INTO t2 VALUES (260,058605,37,'DiMaggio','Dar','connective','W'); +INSERT INTO t2 VALUES (261,058606,37,'exclamation','Corcoran','denies',''); +INSERT INTO t2 VALUES (262,058607,37,'subdirectory','flyers','polka',''); +INSERT INTO t2 VALUES (263,060401,36,'fangs','competitions','observations','FAS'); +INSERT INTO t2 VALUES (264,061701,36,'buyer','suppliers','askers',''); +INSERT INTO t2 VALUES (265,066201,36,'pithing','skips','homeless','FAS'); +INSERT INTO t2 VALUES (266,066501,36,'transistorizing','institutes','Anna',''); +INSERT INTO t2 VALUES (267,068001,36,'nonbiodegradable','troop','subdirectories','W'); +INSERT INTO t2 VALUES (268,068002,36,'dislocate','connective','decaying','FAS'); +INSERT INTO t2 VALUES (269,068005,36,'monochromatic','denies','outwitting','W'); +INSERT INTO t2 VALUES (270,068006,36,'batting','polka','Harpy','W'); +INSERT INTO t2 VALUES (271,068007,36,'postcondition','observations','crazed',''); +INSERT INTO t2 VALUES (272,068008,36,'catalog','askers','suffocate',''); +INSERT INTO t2 VALUES (273,068009,36,'Remus','homeless','provers','FAS'); +INSERT INTO t2 VALUES (274,068010,36,'devices','Anna','technically',''); +INSERT INTO t2 VALUES (275,068011,36,'bike','subdirectories','Franklinizations',''); +INSERT INTO t2 VALUES (276,068202,36,'qualify','decaying','considered',''); +INSERT INTO t2 VALUES (277,068302,36,'detained','outwitting','tinnily',''); +INSERT INTO t2 VALUES (278,068303,36,'commended','Harpy','uninterruptedly',''); +INSERT INTO t2 VALUES (279,068401,36,'civilize','crazed','whistled','A'); +INSERT INTO t2 VALUES (280,068501,36,'Elmhurst','suffocate','automate',''); +INSERT INTO t2 VALUES (281,068502,36,'anesthetizing','provers','gutting','W'); +INSERT INTO t2 VALUES (282,068503,36,'deaf','technically','surreptitious',''); +INSERT INTO t2 VALUES (283,068602,36,'Brigham','Franklinizations','Choctaw',''); +INSERT INTO t2 VALUES (284,068603,36,'title','considered','cooks',''); +INSERT INTO t2 VALUES (285,068701,36,'coarse','tinnily','millivolt','FAS'); +INSERT INTO t2 VALUES (286,068702,36,'combinations','uninterruptedly','counterpoise',''); +INSERT INTO t2 VALUES (287,068703,36,'grayness','whistled','Gothicism',''); +INSERT INTO t2 VALUES (288,076001,36,'innumerable','automate','feminine',''); +INSERT INTO t2 VALUES (289,076002,36,'Caroline','gutting','metaphysically','W'); +INSERT INTO t2 VALUES (290,076101,36,'fatty','surreptitious','sanding','A'); +INSERT INTO t2 VALUES (291,076102,36,'eastbound','Choctaw','contributorily',''); +INSERT INTO t2 VALUES (292,076103,36,'inexperienced','cooks','receivers','FAS'); +INSERT INTO t2 VALUES (293,076302,36,'hoarder','millivolt','adjourn',''); +INSERT INTO t2 VALUES (294,076303,36,'scotch','counterpoise','straggled','A'); +INSERT INTO t2 VALUES (295,076304,36,'passport','Gothicism','druggists',''); +INSERT INTO t2 VALUES (296,076305,36,'strategic','feminine','thanking','FAS'); +INSERT INTO t2 VALUES (297,076306,36,'gated','metaphysically','ostrich',''); +INSERT INTO t2 VALUES (298,076307,36,'flog','sanding','hopelessness','FAS'); +INSERT INTO t2 VALUES (299,076402,36,'Pipestone','contributorily','Eurydice',''); +INSERT INTO t2 VALUES (300,076501,36,'Dar','receivers','excitation','W'); +INSERT INTO t2 VALUES (301,076502,36,'Corcoran','adjourn','presumes','FAS'); +INSERT INTO t2 VALUES (302,076701,36,'flyers','straggled','imaginable','FAS'); +INSERT INTO t2 VALUES (303,078001,36,'competitions','druggists','concoct','W'); +INSERT INTO t2 VALUES (304,078002,36,'suppliers','thanking','peering','W'); +INSERT INTO t2 VALUES (305,078003,36,'skips','ostrich','Phelps','FAS'); +INSERT INTO t2 VALUES (306,078004,36,'institutes','hopelessness','ferociousness','FAS'); +INSERT INTO t2 VALUES (307,078005,36,'troop','Eurydice','sentences',''); +INSERT INTO t2 VALUES (308,078006,36,'connective','excitation','unlocks',''); +INSERT INTO t2 VALUES (309,078007,36,'denies','presumes','engrossing','W'); +INSERT INTO t2 VALUES (310,078008,36,'polka','imaginable','Ruth',''); +INSERT INTO t2 VALUES (311,078101,36,'observations','concoct','tying',''); +INSERT INTO t2 VALUES (312,078103,36,'askers','peering','exclaimers',''); +INSERT INTO t2 VALUES (313,078104,36,'homeless','Phelps','synergy',''); +INSERT INTO t2 VALUES (314,078105,36,'Anna','ferociousness','Huey','W'); +INSERT INTO t2 VALUES (315,082101,36,'subdirectories','sentences','merging',''); +INSERT INTO t2 VALUES (316,083401,36,'decaying','unlocks','judges','A'); +INSERT INTO t2 VALUES (317,084001,36,'outwitting','engrossing','Shylock','W'); +INSERT INTO t2 VALUES (318,084002,36,'Harpy','Ruth','Miltonism',''); +INSERT INTO t2 VALUES (319,086001,36,'crazed','tying','hen','W'); +INSERT INTO t2 VALUES (320,086102,36,'suffocate','exclaimers','honeybee','FAS'); +INSERT INTO t2 VALUES (321,086201,36,'provers','synergy','towers',''); +INSERT INTO t2 VALUES (322,088001,36,'technically','Huey','dilutes','W'); +INSERT INTO t2 VALUES (323,088002,36,'Franklinizations','merging','numerals','FAS'); +INSERT INTO t2 VALUES (324,088003,36,'considered','judges','democracy','FAS'); +INSERT INTO t2 VALUES (325,088004,36,'tinnily','Shylock','Ibero-',''); +INSERT INTO t2 VALUES (326,088101,36,'uninterruptedly','Miltonism','invalids',''); +INSERT INTO t2 VALUES (327,088102,36,'whistled','hen','behavior',''); +INSERT INTO t2 VALUES (328,088103,36,'automate','honeybee','accruing',''); +INSERT INTO t2 VALUES (329,088104,36,'gutting','towers','relics','A'); +INSERT INTO t2 VALUES (330,088105,36,'surreptitious','dilutes','rackets',''); +INSERT INTO t2 VALUES (331,088106,36,'Choctaw','numerals','Fischbein','W'); +INSERT INTO t2 VALUES (332,088201,36,'cooks','democracy','phony','W'); +INSERT INTO t2 VALUES (333,088203,36,'millivolt','Ibero-','cross','FAS'); +INSERT INTO t2 VALUES (334,088204,36,'counterpoise','invalids','cleanup',''); +INSERT INTO t2 VALUES (335,088302,37,'Gothicism','behavior','conspirator',''); +INSERT INTO t2 VALUES (336,088303,37,'feminine','accruing','label','FAS'); +INSERT INTO t2 VALUES (337,088305,37,'metaphysically','relics','university',''); +INSERT INTO t2 VALUES (338,088402,37,'sanding','rackets','cleansed','FAS'); +INSERT INTO t2 VALUES (339,088501,36,'contributorily','Fischbein','ballgown',''); +INSERT INTO t2 VALUES (340,088502,36,'receivers','phony','starlet',''); +INSERT INTO t2 VALUES (341,088503,36,'adjourn','cross','aqueous',''); +INSERT INTO t2 VALUES (342,098001,58,'straggled','cleanup','portrayal','A'); +INSERT INTO t2 VALUES (343,098002,58,'druggists','conspirator','despising','W'); +INSERT INTO t2 VALUES (344,098003,58,'thanking','label','distort','W'); +INSERT INTO t2 VALUES (345,098004,58,'ostrich','university','palmed',''); +INSERT INTO t2 VALUES (346,098005,58,'hopelessness','cleansed','faced',''); +INSERT INTO t2 VALUES (347,098006,58,'Eurydice','ballgown','silverware',''); +INSERT INTO t2 VALUES (348,141903,29,'excitation','starlet','assessor',''); +INSERT INTO t2 VALUES (349,098008,58,'presumes','aqueous','spiders',''); +INSERT INTO t2 VALUES (350,098009,58,'imaginable','portrayal','artificially',''); +INSERT INTO t2 VALUES (351,098010,58,'concoct','despising','reminiscence',''); +INSERT INTO t2 VALUES (352,098011,58,'peering','distort','Mexican',''); +INSERT INTO t2 VALUES (353,098012,58,'Phelps','palmed','obnoxious',''); +INSERT INTO t2 VALUES (354,098013,58,'ferociousness','faced','fragile',''); +INSERT INTO t2 VALUES (355,098014,58,'sentences','silverware','apprehensible',''); +INSERT INTO t2 VALUES (356,098015,58,'unlocks','assessor','births',''); +INSERT INTO t2 VALUES (357,098016,58,'engrossing','spiders','garages',''); +INSERT INTO t2 VALUES (358,098017,58,'Ruth','artificially','panty',''); +INSERT INTO t2 VALUES (359,098018,58,'tying','reminiscence','anteater',''); +INSERT INTO t2 VALUES (360,098019,58,'exclaimers','Mexican','displacement','A'); +INSERT INTO t2 VALUES (361,098020,58,'synergy','obnoxious','drovers','A'); +INSERT INTO t2 VALUES (362,098021,58,'Huey','fragile','patenting','A'); +INSERT INTO t2 VALUES (363,098022,58,'merging','apprehensible','far','A'); +INSERT INTO t2 VALUES (364,098023,58,'judges','births','shrieks',''); +INSERT INTO t2 VALUES (365,098024,58,'Shylock','garages','aligning','W'); +INSERT INTO t2 VALUES (366,098025,37,'Miltonism','panty','pragmatism',''); +INSERT INTO t2 VALUES (367,106001,36,'hen','anteater','fevers','W'); +INSERT INTO t2 VALUES (368,108001,36,'honeybee','displacement','reexamines','A'); +INSERT INTO t2 VALUES (369,108002,36,'towers','drovers','occupancies',''); +INSERT INTO t2 VALUES (370,108003,36,'dilutes','patenting','sweats','FAS'); +INSERT INTO t2 VALUES (371,108004,36,'numerals','far','modulators',''); +INSERT INTO t2 VALUES (372,108005,36,'democracy','shrieks','demand','W'); +INSERT INTO t2 VALUES (373,108007,36,'Ibero-','aligning','Madeira',''); +INSERT INTO t2 VALUES (374,108008,36,'invalids','pragmatism','Viennese','W'); +INSERT INTO t2 VALUES (375,108009,36,'behavior','fevers','chillier','W'); +INSERT INTO t2 VALUES (376,108010,36,'accruing','reexamines','wildcats','FAS'); +INSERT INTO t2 VALUES (377,108011,36,'relics','occupancies','gentle',''); +INSERT INTO t2 VALUES (378,108012,36,'rackets','sweats','Angles','W'); +INSERT INTO t2 VALUES (379,108101,36,'Fischbein','modulators','accuracies',''); +INSERT INTO t2 VALUES (380,108102,36,'phony','demand','toggle',''); +INSERT INTO t2 VALUES (381,108103,36,'cross','Madeira','Mendelssohn','W'); +INSERT INTO t2 VALUES (382,108111,50,'cleanup','Viennese','behaviorally',''); +INSERT INTO t2 VALUES (383,108105,36,'conspirator','chillier','Rochford',''); +INSERT INTO t2 VALUES (384,108106,36,'label','wildcats','mirror','W'); +INSERT INTO t2 VALUES (385,108107,36,'university','gentle','Modula',''); +INSERT INTO t2 VALUES (386,108108,50,'cleansed','Angles','clobbering',''); +INSERT INTO t2 VALUES (387,108109,36,'ballgown','accuracies','chronography',''); +INSERT INTO t2 VALUES (388,108110,36,'starlet','toggle','Eskimoizeds',''); +INSERT INTO t2 VALUES (389,108201,36,'aqueous','Mendelssohn','British','W'); +INSERT INTO t2 VALUES (390,108202,36,'portrayal','behaviorally','pitfalls',''); +INSERT INTO t2 VALUES (391,108203,36,'despising','Rochford','verify','W'); +INSERT INTO t2 VALUES (392,108204,36,'distort','mirror','scatter','FAS'); +INSERT INTO t2 VALUES (393,108205,36,'palmed','Modula','Aztecan',''); +INSERT INTO t2 VALUES (394,108301,36,'faced','clobbering','acuity','W'); +INSERT INTO t2 VALUES (395,108302,36,'silverware','chronography','sinking','W'); +INSERT INTO t2 VALUES (396,112101,36,'assessor','Eskimoizeds','beasts','FAS'); +INSERT INTO t2 VALUES (397,112102,36,'spiders','British','Witt','W'); +INSERT INTO t2 VALUES (398,113701,36,'artificially','pitfalls','physicists','FAS'); +INSERT INTO t2 VALUES (399,116001,36,'reminiscence','verify','folksong','A'); +INSERT INTO t2 VALUES (400,116201,36,'Mexican','scatter','strokes','FAS'); +INSERT INTO t2 VALUES (401,116301,36,'obnoxious','Aztecan','crowder',''); +INSERT INTO t2 VALUES (402,116302,36,'fragile','acuity','merry',''); +INSERT INTO t2 VALUES (403,116601,36,'apprehensible','sinking','cadenced',''); +INSERT INTO t2 VALUES (404,116602,36,'births','beasts','alimony','A'); +INSERT INTO t2 VALUES (405,116603,36,'garages','Witt','principled','A'); +INSERT INTO t2 VALUES (406,116701,36,'panty','physicists','golfing',''); +INSERT INTO t2 VALUES (407,116702,36,'anteater','folksong','undiscovered',''); +INSERT INTO t2 VALUES (408,118001,36,'displacement','strokes','irritates',''); +INSERT INTO t2 VALUES (409,118002,36,'drovers','crowder','patriots','A'); +INSERT INTO t2 VALUES (410,118003,36,'patenting','merry','rooms','FAS'); +INSERT INTO t2 VALUES (411,118004,36,'far','cadenced','towering','W'); +INSERT INTO t2 VALUES (412,118005,36,'shrieks','alimony','displease',''); +INSERT INTO t2 VALUES (413,118006,36,'aligning','principled','photosensitive',''); +INSERT INTO t2 VALUES (414,118007,36,'pragmatism','golfing','inking',''); +INSERT INTO t2 VALUES (415,118008,36,'fevers','undiscovered','gainers',''); +INSERT INTO t2 VALUES (416,118101,36,'reexamines','irritates','leaning','A'); +INSERT INTO t2 VALUES (417,118102,36,'occupancies','patriots','hydrant','A'); +INSERT INTO t2 VALUES (418,118103,36,'sweats','rooms','preserve',''); +INSERT INTO t2 VALUES (419,118202,36,'modulators','towering','blinded','A'); +INSERT INTO t2 VALUES (420,118203,36,'demand','displease','interactions','A'); +INSERT INTO t2 VALUES (421,118204,36,'Madeira','photosensitive','Barry',''); +INSERT INTO t2 VALUES (422,118302,36,'Viennese','inking','whiteness','A'); +INSERT INTO t2 VALUES (423,118304,36,'chillier','gainers','pastimes','W'); +INSERT INTO t2 VALUES (424,118305,36,'wildcats','leaning','Edenization',''); +INSERT INTO t2 VALUES (425,118306,36,'gentle','hydrant','Muscat',''); +INSERT INTO t2 VALUES (426,118307,36,'Angles','preserve','assassinated',''); +INSERT INTO t2 VALUES (427,123101,36,'accuracies','blinded','labeled',''); +INSERT INTO t2 VALUES (428,123102,36,'toggle','interactions','glacial','A'); +INSERT INTO t2 VALUES (429,123301,36,'Mendelssohn','Barry','implied','W'); +INSERT INTO t2 VALUES (430,126001,36,'behaviorally','whiteness','bibliographies','W'); +INSERT INTO t2 VALUES (431,126002,36,'Rochford','pastimes','Buchanan',''); +INSERT INTO t2 VALUES (432,126003,36,'mirror','Edenization','forgivably','FAS'); +INSERT INTO t2 VALUES (433,126101,36,'Modula','Muscat','innuendo','A'); +INSERT INTO t2 VALUES (434,126301,36,'clobbering','assassinated','den','FAS'); +INSERT INTO t2 VALUES (435,126302,36,'chronography','labeled','submarines','W'); +INSERT INTO t2 VALUES (436,126402,36,'Eskimoizeds','glacial','mouthful','A'); +INSERT INTO t2 VALUES (437,126601,36,'British','implied','expiring',''); +INSERT INTO t2 VALUES (438,126602,36,'pitfalls','bibliographies','unfulfilled','FAS'); +INSERT INTO t2 VALUES (439,126702,36,'verify','Buchanan','precession',''); +INSERT INTO t2 VALUES (440,128001,36,'scatter','forgivably','nullified',''); +INSERT INTO t2 VALUES (441,128002,36,'Aztecan','innuendo','affects',''); +INSERT INTO t2 VALUES (442,128003,36,'acuity','den','Cynthia',''); +INSERT INTO t2 VALUES (443,128004,36,'sinking','submarines','Chablis','A'); +INSERT INTO t2 VALUES (444,128005,36,'beasts','mouthful','betterments','FAS'); +INSERT INTO t2 VALUES (445,128007,36,'Witt','expiring','advertising',''); +INSERT INTO t2 VALUES (446,128008,36,'physicists','unfulfilled','rubies','A'); +INSERT INTO t2 VALUES (447,128009,36,'folksong','precession','southwest','FAS'); +INSERT INTO t2 VALUES (448,128010,36,'strokes','nullified','superstitious','A'); +INSERT INTO t2 VALUES (449,128011,36,'crowder','affects','tabernacle','W'); +INSERT INTO t2 VALUES (450,128012,36,'merry','Cynthia','silk','A'); +INSERT INTO t2 VALUES (451,128013,36,'cadenced','Chablis','handsomest','A'); +INSERT INTO t2 VALUES (452,128014,36,'alimony','betterments','Persian','A'); +INSERT INTO t2 VALUES (453,128015,36,'principled','advertising','analog','W'); +INSERT INTO t2 VALUES (454,128016,36,'golfing','rubies','complex','W'); +INSERT INTO t2 VALUES (455,128017,36,'undiscovered','southwest','Taoist',''); +INSERT INTO t2 VALUES (456,128018,36,'irritates','superstitious','suspend',''); +INSERT INTO t2 VALUES (457,128019,36,'patriots','tabernacle','relegated',''); +INSERT INTO t2 VALUES (458,128020,36,'rooms','silk','awesome','W'); +INSERT INTO t2 VALUES (459,128021,36,'towering','handsomest','Bruxelles',''); +INSERT INTO t2 VALUES (460,128022,36,'displease','Persian','imprecisely','A'); +INSERT INTO t2 VALUES (461,128023,36,'photosensitive','analog','televise',''); +INSERT INTO t2 VALUES (462,128101,36,'inking','complex','braking',''); +INSERT INTO t2 VALUES (463,128102,36,'gainers','Taoist','true','FAS'); +INSERT INTO t2 VALUES (464,128103,36,'leaning','suspend','disappointing','FAS'); +INSERT INTO t2 VALUES (465,128104,36,'hydrant','relegated','navally','W'); +INSERT INTO t2 VALUES (466,128106,36,'preserve','awesome','circus',''); +INSERT INTO t2 VALUES (467,128107,36,'blinded','Bruxelles','beetles',''); +INSERT INTO t2 VALUES (468,128108,36,'interactions','imprecisely','trumps',''); +INSERT INTO t2 VALUES (469,128202,36,'Barry','televise','fourscore','W'); +INSERT INTO t2 VALUES (470,128203,36,'whiteness','braking','Blackfoots',''); +INSERT INTO t2 VALUES (471,128301,36,'pastimes','true','Grady',''); +INSERT INTO t2 VALUES (472,128302,36,'Edenization','disappointing','quiets','FAS'); +INSERT INTO t2 VALUES (473,128303,36,'Muscat','navally','floundered','FAS'); +INSERT INTO t2 VALUES (474,128304,36,'assassinated','circus','profundity','W'); +INSERT INTO t2 VALUES (475,128305,36,'labeled','beetles','Garrisonian','W'); +INSERT INTO t2 VALUES (476,128307,36,'glacial','trumps','Strauss',''); +INSERT INTO t2 VALUES (477,128401,36,'implied','fourscore','cemented','FAS'); +INSERT INTO t2 VALUES (478,128502,36,'bibliographies','Blackfoots','contrition','A'); +INSERT INTO t2 VALUES (479,128503,36,'Buchanan','Grady','mutations',''); +INSERT INTO t2 VALUES (480,128504,36,'forgivably','quiets','exhibits','W'); +INSERT INTO t2 VALUES (481,128505,36,'innuendo','floundered','tits',''); +INSERT INTO t2 VALUES (482,128601,36,'den','profundity','mate','A'); +INSERT INTO t2 VALUES (483,128603,36,'submarines','Garrisonian','arches',''); +INSERT INTO t2 VALUES (484,128604,36,'mouthful','Strauss','Moll',''); +INSERT INTO t2 VALUES (485,128702,36,'expiring','cemented','ropers',''); +INSERT INTO t2 VALUES (486,128703,36,'unfulfilled','contrition','bombast',''); +INSERT INTO t2 VALUES (487,128704,36,'precession','mutations','difficultly','A'); +INSERT INTO t2 VALUES (488,138001,36,'nullified','exhibits','adsorption',''); +INSERT INTO t2 VALUES (489,138002,36,'affects','tits','definiteness','FAS'); +INSERT INTO t2 VALUES (490,138003,36,'Cynthia','mate','cultivation','A'); +INSERT INTO t2 VALUES (491,138004,36,'Chablis','arches','heals','A'); +INSERT INTO t2 VALUES (492,138005,36,'betterments','Moll','Heusen','W'); +INSERT INTO t2 VALUES (493,138006,36,'advertising','ropers','target','FAS'); +INSERT INTO t2 VALUES (494,138007,36,'rubies','bombast','cited','A'); +INSERT INTO t2 VALUES (495,138008,36,'southwest','difficultly','congresswoman','W'); +INSERT INTO t2 VALUES (496,138009,36,'superstitious','adsorption','Katherine',''); +INSERT INTO t2 VALUES (497,138102,36,'tabernacle','definiteness','titter','A'); +INSERT INTO t2 VALUES (498,138103,36,'silk','cultivation','aspire','A'); +INSERT INTO t2 VALUES (499,138104,36,'handsomest','heals','Mardis',''); +INSERT INTO t2 VALUES (500,138105,36,'Persian','Heusen','Nadia','W'); +INSERT INTO t2 VALUES (501,138201,36,'analog','target','estimating','FAS'); +INSERT INTO t2 VALUES (502,138302,36,'complex','cited','stuck','A'); +INSERT INTO t2 VALUES (503,138303,36,'Taoist','congresswoman','fifteenth','A'); +INSERT INTO t2 VALUES (504,138304,36,'suspend','Katherine','Colombo',''); +INSERT INTO t2 VALUES (505,138401,29,'relegated','titter','survey','A'); +INSERT INTO t2 VALUES (506,140102,29,'awesome','aspire','staffing',''); +INSERT INTO t2 VALUES (507,140103,29,'Bruxelles','Mardis','obtain',''); +INSERT INTO t2 VALUES (508,140104,29,'imprecisely','Nadia','loaded',''); +INSERT INTO t2 VALUES (509,140105,29,'televise','estimating','slaughtered',''); +INSERT INTO t2 VALUES (510,140201,29,'braking','stuck','lights','A'); +INSERT INTO t2 VALUES (511,140701,29,'true','fifteenth','circumference',''); +INSERT INTO t2 VALUES (512,141501,29,'disappointing','Colombo','dull','A'); +INSERT INTO t2 VALUES (513,141502,29,'navally','survey','weekly','A'); +INSERT INTO t2 VALUES (514,141901,29,'circus','staffing','wetness',''); +INSERT INTO t2 VALUES (515,141902,29,'beetles','obtain','visualized',''); +INSERT INTO t2 VALUES (516,142101,29,'trumps','loaded','Tannenbaum',''); +INSERT INTO t2 VALUES (517,142102,29,'fourscore','slaughtered','moribund',''); +INSERT INTO t2 VALUES (518,142103,29,'Blackfoots','lights','demultiplex',''); +INSERT INTO t2 VALUES (519,142701,29,'Grady','circumference','lockings',''); +INSERT INTO t2 VALUES (520,143001,29,'quiets','dull','thugs','FAS'); +INSERT INTO t2 VALUES (521,143501,29,'floundered','weekly','unnerves',''); +INSERT INTO t2 VALUES (522,143502,29,'profundity','wetness','abut',''); +INSERT INTO t2 VALUES (523,148001,29,'Garrisonian','visualized','Chippewa','A'); +INSERT INTO t2 VALUES (524,148002,29,'Strauss','Tannenbaum','stratifications','A'); +INSERT INTO t2 VALUES (525,148003,29,'cemented','moribund','signaled',''); +INSERT INTO t2 VALUES (526,148004,29,'contrition','demultiplex','Italianizes','A'); +INSERT INTO t2 VALUES (527,148005,29,'mutations','lockings','algorithmic','A'); +INSERT INTO t2 VALUES (528,148006,29,'exhibits','thugs','paranoid','FAS'); +INSERT INTO t2 VALUES (529,148007,29,'tits','unnerves','camping','A'); +INSERT INTO t2 VALUES (530,148009,29,'mate','abut','signifying','A'); +INSERT INTO t2 VALUES (531,148010,29,'arches','Chippewa','Patrice','W'); +INSERT INTO t2 VALUES (532,148011,29,'Moll','stratifications','search','A'); +INSERT INTO t2 VALUES (533,148012,29,'ropers','signaled','Angeles','A'); +INSERT INTO t2 VALUES (534,148013,29,'bombast','Italianizes','semblance',''); +INSERT INTO t2 VALUES (535,148023,36,'difficultly','algorithmic','taxed',''); +INSERT INTO t2 VALUES (536,148015,29,'adsorption','paranoid','Beatrice',''); +INSERT INTO t2 VALUES (537,148016,29,'definiteness','camping','retrace',''); +INSERT INTO t2 VALUES (538,148017,29,'cultivation','signifying','lockout',''); +INSERT INTO t2 VALUES (539,148018,29,'heals','Patrice','grammatic',''); +INSERT INTO t2 VALUES (540,148019,29,'Heusen','search','helmsman',''); +INSERT INTO t2 VALUES (541,148020,29,'target','Angeles','uniform','W'); +INSERT INTO t2 VALUES (542,148021,29,'cited','semblance','hamming',''); +INSERT INTO t2 VALUES (543,148022,29,'congresswoman','taxed','disobedience',''); +INSERT INTO t2 VALUES (544,148101,29,'Katherine','Beatrice','captivated','A'); +INSERT INTO t2 VALUES (545,148102,29,'titter','retrace','transferals','A'); +INSERT INTO t2 VALUES (546,148201,29,'aspire','lockout','cartographer','A'); +INSERT INTO t2 VALUES (547,148401,29,'Mardis','grammatic','aims','FAS'); +INSERT INTO t2 VALUES (548,148402,29,'Nadia','helmsman','Pakistani',''); +INSERT INTO t2 VALUES (549,148501,29,'estimating','uniform','burglarized','FAS'); +INSERT INTO t2 VALUES (550,148502,29,'stuck','hamming','saucepans','A'); +INSERT INTO t2 VALUES (551,148503,29,'fifteenth','disobedience','lacerating','A'); +INSERT INTO t2 VALUES (552,148504,29,'Colombo','captivated','corny',''); +INSERT INTO t2 VALUES (553,148601,29,'survey','transferals','megabytes','FAS'); +INSERT INTO t2 VALUES (554,148602,29,'staffing','cartographer','chancellor',''); +INSERT INTO t2 VALUES (555,150701,29,'obtain','aims','bulk','A'); +INSERT INTO t2 VALUES (556,152101,29,'loaded','Pakistani','commits','A'); +INSERT INTO t2 VALUES (557,152102,29,'slaughtered','burglarized','meson','W'); +INSERT INTO t2 VALUES (558,155202,36,'lights','saucepans','deputies',''); +INSERT INTO t2 VALUES (559,155203,29,'circumference','lacerating','northeaster','A'); +INSERT INTO t2 VALUES (560,155204,29,'dull','corny','dipole',''); +INSERT INTO t2 VALUES (561,155205,29,'weekly','megabytes','machining','0'); +INSERT INTO t2 VALUES (562,156001,29,'wetness','chancellor','therefore',''); +INSERT INTO t2 VALUES (563,156002,29,'visualized','bulk','Telefunken',''); +INSERT INTO t2 VALUES (564,156102,29,'Tannenbaum','commits','salvaging',''); +INSERT INTO t2 VALUES (565,156301,29,'moribund','meson','Corinthianizes','A'); +INSERT INTO t2 VALUES (566,156302,29,'demultiplex','deputies','restlessly','A'); +INSERT INTO t2 VALUES (567,156303,29,'lockings','northeaster','bromides',''); +INSERT INTO t2 VALUES (568,156304,29,'thugs','dipole','generalized','A'); +INSERT INTO t2 VALUES (569,156305,29,'unnerves','machining','mishaps',''); +INSERT INTO t2 VALUES (570,156306,29,'abut','therefore','quelling',''); +INSERT INTO t2 VALUES (571,156501,29,'Chippewa','Telefunken','spiritual','A'); +INSERT INTO t2 VALUES (572,158001,29,'stratifications','salvaging','beguiles','FAS'); +INSERT INTO t2 VALUES (573,158002,29,'signaled','Corinthianizes','Trobriand','FAS'); +INSERT INTO t2 VALUES (574,158101,29,'Italianizes','restlessly','fleeing','A'); +INSERT INTO t2 VALUES (575,158102,29,'algorithmic','bromides','Armour','A'); +INSERT INTO t2 VALUES (576,158103,29,'paranoid','generalized','chin','A'); +INSERT INTO t2 VALUES (577,158201,29,'camping','mishaps','provers','A'); +INSERT INTO t2 VALUES (578,158202,29,'signifying','quelling','aeronautic','A'); +INSERT INTO t2 VALUES (579,158203,29,'Patrice','spiritual','voltage','W'); +INSERT INTO t2 VALUES (580,158204,29,'search','beguiles','sash',''); +INSERT INTO t2 VALUES (581,158301,29,'Angeles','Trobriand','anaerobic','A'); +INSERT INTO t2 VALUES (582,158302,29,'semblance','fleeing','simultaneous','A'); +INSERT INTO t2 VALUES (583,158303,29,'taxed','Armour','accumulating','A'); +INSERT INTO t2 VALUES (584,158304,29,'Beatrice','chin','Medusan','A'); +INSERT INTO t2 VALUES (585,158305,29,'retrace','provers','shouted','A'); +INSERT INTO t2 VALUES (586,158306,29,'lockout','aeronautic','freakish',''); +INSERT INTO t2 VALUES (587,158501,29,'grammatic','voltage','index','FAS'); +INSERT INTO t2 VALUES (588,160301,29,'helmsman','sash','commercially',''); +INSERT INTO t2 VALUES (589,166101,50,'uniform','anaerobic','mistiness','A'); +INSERT INTO t2 VALUES (590,166102,50,'hamming','simultaneous','endpoint',''); +INSERT INTO t2 VALUES (591,168001,29,'disobedience','accumulating','straight','A'); +INSERT INTO t2 VALUES (592,168002,29,'captivated','Medusan','flurried',''); +INSERT INTO t2 VALUES (593,168003,29,'transferals','shouted','denotative','A'); +INSERT INTO t2 VALUES (594,168101,29,'cartographer','freakish','coming','FAS'); +INSERT INTO t2 VALUES (595,168102,29,'aims','index','commencements','FAS'); +INSERT INTO t2 VALUES (596,168103,29,'Pakistani','commercially','gentleman',''); +INSERT INTO t2 VALUES (597,168104,29,'burglarized','mistiness','gifted',''); +INSERT INTO t2 VALUES (598,168202,29,'saucepans','endpoint','Shanghais',''); +INSERT INTO t2 VALUES (599,168301,29,'lacerating','straight','sportswriting','A'); +INSERT INTO t2 VALUES (600,168502,29,'corny','flurried','sloping','A'); +INSERT INTO t2 VALUES (601,168503,29,'megabytes','denotative','navies',''); +INSERT INTO t2 VALUES (602,168601,29,'chancellor','coming','leaflet','A'); +INSERT INTO t2 VALUES (603,173001,40,'bulk','commencements','shooter',''); +INSERT INTO t2 VALUES (604,173701,40,'commits','gentleman','Joplin','FAS'); +INSERT INTO t2 VALUES (605,173702,40,'meson','gifted','babies',''); +INSERT INTO t2 VALUES (606,176001,40,'deputies','Shanghais','subdivision','FAS'); +INSERT INTO t2 VALUES (607,176101,40,'northeaster','sportswriting','burstiness','W'); +INSERT INTO t2 VALUES (608,176201,40,'dipole','sloping','belted','FAS'); +INSERT INTO t2 VALUES (609,176401,40,'machining','navies','assails','FAS'); +INSERT INTO t2 VALUES (610,176501,40,'therefore','leaflet','admiring','W'); +INSERT INTO t2 VALUES (611,176601,40,'Telefunken','shooter','swaying','0'); +INSERT INTO t2 VALUES (612,176602,40,'salvaging','Joplin','Goldstine','FAS'); +INSERT INTO t2 VALUES (613,176603,40,'Corinthianizes','babies','fitting',''); +INSERT INTO t2 VALUES (614,178001,40,'restlessly','subdivision','Norwalk','W'); +INSERT INTO t2 VALUES (615,178002,40,'bromides','burstiness','weakening','W'); +INSERT INTO t2 VALUES (616,178003,40,'generalized','belted','analogy','FAS'); +INSERT INTO t2 VALUES (617,178004,40,'mishaps','assails','deludes',''); +INSERT INTO t2 VALUES (618,178005,40,'quelling','admiring','cokes',''); +INSERT INTO t2 VALUES (619,178006,40,'spiritual','swaying','Clayton',''); +INSERT INTO t2 VALUES (620,178007,40,'beguiles','Goldstine','exhausts',''); +INSERT INTO t2 VALUES (621,178008,40,'Trobriand','fitting','causality',''); +INSERT INTO t2 VALUES (622,178101,40,'fleeing','Norwalk','sating','FAS'); +INSERT INTO t2 VALUES (623,178102,40,'Armour','weakening','icon',''); +INSERT INTO t2 VALUES (624,178103,40,'chin','analogy','throttles',''); +INSERT INTO t2 VALUES (625,178201,40,'provers','deludes','communicants','FAS'); +INSERT INTO t2 VALUES (626,178202,40,'aeronautic','cokes','dehydrate','FAS'); +INSERT INTO t2 VALUES (627,178301,40,'voltage','Clayton','priceless','FAS'); +INSERT INTO t2 VALUES (628,178302,40,'sash','exhausts','publicly',''); +INSERT INTO t2 VALUES (629,178401,40,'anaerobic','causality','incidentals','FAS'); +INSERT INTO t2 VALUES (630,178402,40,'simultaneous','sating','commonplace',''); +INSERT INTO t2 VALUES (631,178403,40,'accumulating','icon','mumbles',''); +INSERT INTO t2 VALUES (632,178404,40,'Medusan','throttles','furthermore','W'); +INSERT INTO t2 VALUES (633,178501,40,'shouted','communicants','cautioned','W'); +INSERT INTO t2 VALUES (634,186002,37,'freakish','dehydrate','parametrized','A'); +INSERT INTO t2 VALUES (635,186102,37,'index','priceless','registration','A'); +INSERT INTO t2 VALUES (636,186201,40,'commercially','publicly','sadly','FAS'); +INSERT INTO t2 VALUES (637,186202,40,'mistiness','incidentals','positioning',''); +INSERT INTO t2 VALUES (638,186203,40,'endpoint','commonplace','babysitting',''); +INSERT INTO t2 VALUES (639,186302,37,'straight','mumbles','eternal','A'); +INSERT INTO t2 VALUES (640,188007,37,'flurried','furthermore','hoarder',''); +INSERT INTO t2 VALUES (641,188008,37,'denotative','cautioned','congregates',''); +INSERT INTO t2 VALUES (642,188009,37,'coming','parametrized','rains',''); +INSERT INTO t2 VALUES (643,188010,37,'commencements','registration','workers','W'); +INSERT INTO t2 VALUES (644,188011,37,'gentleman','sadly','sags','A'); +INSERT INTO t2 VALUES (645,188012,37,'gifted','positioning','unplug','W'); +INSERT INTO t2 VALUES (646,188013,37,'Shanghais','babysitting','garage','A'); +INSERT INTO t2 VALUES (647,188014,37,'sportswriting','eternal','boulder','A'); +INSERT INTO t2 VALUES (648,188015,37,'sloping','hoarder','hollowly','A'); +INSERT INTO t2 VALUES (649,188016,37,'navies','congregates','specifics',''); +INSERT INTO t2 VALUES (650,188017,37,'leaflet','rains','Teresa',''); +INSERT INTO t2 VALUES (651,188102,37,'shooter','workers','Winsett',''); +INSERT INTO t2 VALUES (652,188103,37,'Joplin','sags','convenient','A'); +INSERT INTO t2 VALUES (653,188202,37,'babies','unplug','buckboards','FAS'); +INSERT INTO t2 VALUES (654,188301,40,'subdivision','garage','amenities',''); +INSERT INTO t2 VALUES (655,188302,40,'burstiness','boulder','resplendent','FAS'); +INSERT INTO t2 VALUES (656,188303,40,'belted','hollowly','priding','FAS'); +INSERT INTO t2 VALUES (657,188401,37,'assails','specifics','configurations',''); +INSERT INTO t2 VALUES (658,188402,37,'admiring','Teresa','untidiness','A'); +INSERT INTO t2 VALUES (659,188503,37,'swaying','Winsett','Brice','W'); +INSERT INTO t2 VALUES (660,188504,37,'Goldstine','convenient','sews','FAS'); +INSERT INTO t2 VALUES (661,188505,37,'fitting','buckboards','participated',''); +INSERT INTO t2 VALUES (662,190701,37,'Norwalk','amenities','Simon','FAS'); +INSERT INTO t2 VALUES (663,190703,50,'weakening','resplendent','certificates',''); +INSERT INTO t2 VALUES (664,191701,37,'analogy','priding','Fitzpatrick',''); +INSERT INTO t2 VALUES (665,191702,37,'deludes','configurations','Evanston','A'); +INSERT INTO t2 VALUES (666,191703,37,'cokes','untidiness','misted',''); +INSERT INTO t2 VALUES (667,196001,37,'Clayton','Brice','textures','A'); +INSERT INTO t2 VALUES (668,196002,37,'exhausts','sews','save',''); +INSERT INTO t2 VALUES (669,196003,37,'causality','participated','count',''); +INSERT INTO t2 VALUES (670,196101,37,'sating','Simon','rightful','A'); +INSERT INTO t2 VALUES (671,196103,37,'icon','certificates','chaperone',''); +INSERT INTO t2 VALUES (672,196104,37,'throttles','Fitzpatrick','Lizzy','A'); +INSERT INTO t2 VALUES (673,196201,37,'communicants','Evanston','clenched','A'); +INSERT INTO t2 VALUES (674,196202,37,'dehydrate','misted','effortlessly',''); +INSERT INTO t2 VALUES (675,196203,37,'priceless','textures','accessed',''); +INSERT INTO t2 VALUES (676,198001,37,'publicly','save','beaters','A'); +INSERT INTO t2 VALUES (677,198003,37,'incidentals','count','Hornblower','FAS'); +INSERT INTO t2 VALUES (678,198004,37,'commonplace','rightful','vests','A'); +INSERT INTO t2 VALUES (679,198005,37,'mumbles','chaperone','indulgences','FAS'); +INSERT INTO t2 VALUES (680,198006,37,'furthermore','Lizzy','infallibly','A'); +INSERT INTO t2 VALUES (681,198007,37,'cautioned','clenched','unwilling','FAS'); +INSERT INTO t2 VALUES (682,198008,37,'parametrized','effortlessly','excrete','FAS'); +INSERT INTO t2 VALUES (683,198009,37,'registration','accessed','spools','A'); +INSERT INTO t2 VALUES (684,198010,37,'sadly','beaters','crunches','FAS'); +INSERT INTO t2 VALUES (685,198011,37,'positioning','Hornblower','overestimating','FAS'); +INSERT INTO t2 VALUES (686,198012,37,'babysitting','vests','ineffective',''); +INSERT INTO t2 VALUES (687,198013,37,'eternal','indulgences','humiliation','A'); +INSERT INTO t2 VALUES (688,198014,37,'hoarder','infallibly','sophomore',''); +INSERT INTO t2 VALUES (689,198015,37,'congregates','unwilling','star',''); +INSERT INTO t2 VALUES (690,198017,37,'rains','excrete','rifles',''); +INSERT INTO t2 VALUES (691,198018,37,'workers','spools','dialysis',''); +INSERT INTO t2 VALUES (692,198019,37,'sags','crunches','arriving',''); +INSERT INTO t2 VALUES (693,198020,37,'unplug','overestimating','indulge',''); +INSERT INTO t2 VALUES (694,198021,37,'garage','ineffective','clockers',''); +INSERT INTO t2 VALUES (695,198022,37,'boulder','humiliation','languages',''); +INSERT INTO t2 VALUES (696,198023,50,'hollowly','sophomore','Antarctica','A'); +INSERT INTO t2 VALUES (697,198024,37,'specifics','star','percentage',''); +INSERT INTO t2 VALUES (698,198101,37,'Teresa','rifles','ceiling','A'); +INSERT INTO t2 VALUES (699,198103,37,'Winsett','dialysis','specification',''); +INSERT INTO t2 VALUES (700,198105,37,'convenient','arriving','regimented','A'); +INSERT INTO t2 VALUES (701,198106,37,'buckboards','indulge','ciphers',''); +INSERT INTO t2 VALUES (702,198201,37,'amenities','clockers','pictures','A'); +INSERT INTO t2 VALUES (703,198204,37,'resplendent','languages','serpents','A'); +INSERT INTO t2 VALUES (704,198301,53,'priding','Antarctica','allot','A'); +INSERT INTO t2 VALUES (705,198302,53,'configurations','percentage','realized','A'); +INSERT INTO t2 VALUES (706,198303,53,'untidiness','ceiling','mayoral','A'); +INSERT INTO t2 VALUES (707,198304,53,'Brice','specification','opaquely','A'); +INSERT INTO t2 VALUES (708,198401,37,'sews','regimented','hostess','FAS'); +INSERT INTO t2 VALUES (709,198402,37,'participated','ciphers','fiftieth',''); +INSERT INTO t2 VALUES (710,198403,37,'Simon','pictures','incorrectly',''); +INSERT INTO t2 VALUES (711,202101,37,'certificates','serpents','decomposition','FAS'); +INSERT INTO t2 VALUES (712,202301,37,'Fitzpatrick','allot','stranglings',''); +INSERT INTO t2 VALUES (713,202302,37,'Evanston','realized','mixture','FAS'); +INSERT INTO t2 VALUES (714,202303,37,'misted','mayoral','electroencephalography','FAS'); +INSERT INTO t2 VALUES (715,202304,37,'textures','opaquely','similarities','FAS'); +INSERT INTO t2 VALUES (716,202305,37,'save','hostess','charges','W'); +INSERT INTO t2 VALUES (717,202601,37,'count','fiftieth','freest','FAS'); +INSERT INTO t2 VALUES (718,202602,37,'rightful','incorrectly','Greenberg','FAS'); +INSERT INTO t2 VALUES (719,202605,37,'chaperone','decomposition','tinting',''); +INSERT INTO t2 VALUES (720,202606,37,'Lizzy','stranglings','expelled','W'); +INSERT INTO t2 VALUES (721,202607,37,'clenched','mixture','warm',''); +INSERT INTO t2 VALUES (722,202901,37,'effortlessly','electroencephalography','smoothed',''); +INSERT INTO t2 VALUES (723,202902,37,'accessed','similarities','deductions','FAS'); +INSERT INTO t2 VALUES (724,202903,37,'beaters','charges','Romano','W'); +INSERT INTO t2 VALUES (725,202904,37,'Hornblower','freest','bitterroot',''); +INSERT INTO t2 VALUES (726,202907,37,'vests','Greenberg','corset',''); +INSERT INTO t2 VALUES (727,202908,37,'indulgences','tinting','securing',''); +INSERT INTO t2 VALUES (728,203101,37,'infallibly','expelled','environing','FAS'); +INSERT INTO t2 VALUES (729,203103,37,'unwilling','warm','cute',''); +INSERT INTO t2 VALUES (730,203104,37,'excrete','smoothed','Crays',''); +INSERT INTO t2 VALUES (731,203105,37,'spools','deductions','heiress','FAS'); +INSERT INTO t2 VALUES (732,203401,37,'crunches','Romano','inform','FAS'); +INSERT INTO t2 VALUES (733,203402,37,'overestimating','bitterroot','avenge',''); +INSERT INTO t2 VALUES (734,203404,37,'ineffective','corset','universals',''); +INSERT INTO t2 VALUES (735,203901,37,'humiliation','securing','Kinsey','W'); +INSERT INTO t2 VALUES (736,203902,37,'sophomore','environing','ravines','FAS'); +INSERT INTO t2 VALUES (737,203903,37,'star','cute','bestseller',''); +INSERT INTO t2 VALUES (738,203906,37,'rifles','Crays','equilibrium',''); +INSERT INTO t2 VALUES (739,203907,37,'dialysis','heiress','extents','0'); +INSERT INTO t2 VALUES (740,203908,37,'arriving','inform','relatively',''); +INSERT INTO t2 VALUES (741,203909,37,'indulge','avenge','pressure','FAS'); +INSERT INTO t2 VALUES (742,206101,37,'clockers','universals','critiques','FAS'); +INSERT INTO t2 VALUES (743,206201,37,'languages','Kinsey','befouled',''); +INSERT INTO t2 VALUES (744,206202,37,'Antarctica','ravines','rightfully','FAS'); +INSERT INTO t2 VALUES (745,206203,37,'percentage','bestseller','mechanizing','FAS'); +INSERT INTO t2 VALUES (746,206206,37,'ceiling','equilibrium','Latinizes',''); +INSERT INTO t2 VALUES (747,206207,37,'specification','extents','timesharing',''); +INSERT INTO t2 VALUES (748,206208,37,'regimented','relatively','Aden',''); +INSERT INTO t2 VALUES (749,208001,37,'ciphers','pressure','embassies',''); +INSERT INTO t2 VALUES (750,208002,37,'pictures','critiques','males','FAS'); +INSERT INTO t2 VALUES (751,208003,37,'serpents','befouled','shapelessly','FAS'); +INSERT INTO t2 VALUES (752,208004,37,'allot','rightfully','genres','FAS'); +INSERT INTO t2 VALUES (753,208008,37,'realized','mechanizing','mastering',''); +INSERT INTO t2 VALUES (754,208009,37,'mayoral','Latinizes','Newtonian',''); +INSERT INTO t2 VALUES (755,208010,37,'opaquely','timesharing','finishers','FAS'); +INSERT INTO t2 VALUES (756,208011,37,'hostess','Aden','abates',''); +INSERT INTO t2 VALUES (757,208101,37,'fiftieth','embassies','teem',''); +INSERT INTO t2 VALUES (758,208102,37,'incorrectly','males','kiting','FAS'); +INSERT INTO t2 VALUES (759,208103,37,'decomposition','shapelessly','stodgy','FAS'); +INSERT INTO t2 VALUES (760,208104,37,'stranglings','genres','scalps','FAS'); +INSERT INTO t2 VALUES (761,208105,37,'mixture','mastering','feed','FAS'); +INSERT INTO t2 VALUES (762,208110,37,'electroencephalography','Newtonian','guitars',''); +INSERT INTO t2 VALUES (763,208111,37,'similarities','finishers','airships',''); +INSERT INTO t2 VALUES (764,208112,37,'charges','abates','store',''); +INSERT INTO t2 VALUES (765,208113,37,'freest','teem','denounces',''); +INSERT INTO t2 VALUES (766,208201,37,'Greenberg','kiting','Pyle','FAS'); +INSERT INTO t2 VALUES (767,208203,37,'tinting','stodgy','Saxony',''); +INSERT INTO t2 VALUES (768,208301,37,'expelled','scalps','serializations','FAS'); +INSERT INTO t2 VALUES (769,208302,37,'warm','feed','Peruvian','FAS'); +INSERT INTO t2 VALUES (770,208305,37,'smoothed','guitars','taxonomically','FAS'); +INSERT INTO t2 VALUES (771,208401,37,'deductions','airships','kingdom','A'); +INSERT INTO t2 VALUES (772,208402,37,'Romano','store','stint','A'); +INSERT INTO t2 VALUES (773,208403,37,'bitterroot','denounces','Sault','A'); +INSERT INTO t2 VALUES (774,208404,37,'corset','Pyle','faithful',''); +INSERT INTO t2 VALUES (775,208501,37,'securing','Saxony','Ganymede','FAS'); +INSERT INTO t2 VALUES (776,208502,37,'environing','serializations','tidiness','FAS'); +INSERT INTO t2 VALUES (777,208503,37,'cute','Peruvian','gainful','FAS'); +INSERT INTO t2 VALUES (778,208504,37,'Crays','taxonomically','contrary','FAS'); +INSERT INTO t2 VALUES (779,208505,37,'heiress','kingdom','Tipperary','FAS'); +INSERT INTO t2 VALUES (780,210101,37,'inform','stint','tropics','W'); +INSERT INTO t2 VALUES (781,210102,37,'avenge','Sault','theorizers',''); +INSERT INTO t2 VALUES (782,210103,37,'universals','faithful','renew','0'); +INSERT INTO t2 VALUES (783,210104,37,'Kinsey','Ganymede','already',''); +INSERT INTO t2 VALUES (784,210105,37,'ravines','tidiness','terminal',''); +INSERT INTO t2 VALUES (785,210106,37,'bestseller','gainful','Hegelian',''); +INSERT INTO t2 VALUES (786,210107,37,'equilibrium','contrary','hypothesizer',''); +INSERT INTO t2 VALUES (787,210401,37,'extents','Tipperary','warningly','FAS'); +INSERT INTO t2 VALUES (788,213201,37,'relatively','tropics','journalizing','FAS'); +INSERT INTO t2 VALUES (789,213203,37,'pressure','theorizers','nested',''); +INSERT INTO t2 VALUES (790,213204,37,'critiques','renew','Lars',''); +INSERT INTO t2 VALUES (791,213205,37,'befouled','already','saplings',''); +INSERT INTO t2 VALUES (792,213206,37,'rightfully','terminal','foothill',''); +INSERT INTO t2 VALUES (793,213207,37,'mechanizing','Hegelian','labeled',''); +INSERT INTO t2 VALUES (794,216101,37,'Latinizes','hypothesizer','imperiously','FAS'); +INSERT INTO t2 VALUES (795,216103,37,'timesharing','warningly','reporters','FAS'); +INSERT INTO t2 VALUES (796,218001,37,'Aden','journalizing','furnishings','FAS'); +INSERT INTO t2 VALUES (797,218002,37,'embassies','nested','precipitable','FAS'); +INSERT INTO t2 VALUES (798,218003,37,'males','Lars','discounts','FAS'); +INSERT INTO t2 VALUES (799,218004,37,'shapelessly','saplings','excises','FAS'); +INSERT INTO t2 VALUES (800,143503,50,'genres','foothill','Stalin',''); +INSERT INTO t2 VALUES (801,218006,37,'mastering','labeled','despot','FAS'); +INSERT INTO t2 VALUES (802,218007,37,'Newtonian','imperiously','ripeness','FAS'); +INSERT INTO t2 VALUES (803,218008,37,'finishers','reporters','Arabia',''); +INSERT INTO t2 VALUES (804,218009,37,'abates','furnishings','unruly',''); +INSERT INTO t2 VALUES (805,218010,37,'teem','precipitable','mournfulness',''); +INSERT INTO t2 VALUES (806,218011,37,'kiting','discounts','boom','FAS'); +INSERT INTO t2 VALUES (807,218020,37,'stodgy','excises','slaughter','A'); +INSERT INTO t2 VALUES (808,218021,50,'scalps','Stalin','Sabine',''); +INSERT INTO t2 VALUES (809,218022,37,'feed','despot','handy','FAS'); +INSERT INTO t2 VALUES (810,218023,37,'guitars','ripeness','rural',''); +INSERT INTO t2 VALUES (811,218024,37,'airships','Arabia','organizer',''); +INSERT INTO t2 VALUES (812,218101,37,'store','unruly','shipyard','FAS'); +INSERT INTO t2 VALUES (813,218102,37,'denounces','mournfulness','civics','FAS'); +INSERT INTO t2 VALUES (814,218103,37,'Pyle','boom','inaccuracy','FAS'); +INSERT INTO t2 VALUES (815,218201,37,'Saxony','slaughter','rules','FAS'); +INSERT INTO t2 VALUES (816,218202,37,'serializations','Sabine','juveniles','FAS'); +INSERT INTO t2 VALUES (817,218203,37,'Peruvian','handy','comprised','W'); +INSERT INTO t2 VALUES (818,218204,37,'taxonomically','rural','investigations',''); +INSERT INTO t2 VALUES (819,218205,37,'kingdom','organizer','stabilizes','A'); +INSERT INTO t2 VALUES (820,218301,37,'stint','shipyard','seminaries','FAS'); +INSERT INTO t2 VALUES (821,218302,37,'Sault','civics','Hunter','A'); +INSERT INTO t2 VALUES (822,218401,37,'faithful','inaccuracy','sporty','FAS'); +INSERT INTO t2 VALUES (823,218402,37,'Ganymede','rules','test','FAS'); +INSERT INTO t2 VALUES (824,218403,37,'tidiness','juveniles','weasels',''); +INSERT INTO t2 VALUES (825,218404,37,'gainful','comprised','CERN',''); +INSERT INTO t2 VALUES (826,218407,37,'contrary','investigations','tempering',''); +INSERT INTO t2 VALUES (827,218408,37,'Tipperary','stabilizes','afore','FAS'); +INSERT INTO t2 VALUES (828,218409,37,'tropics','seminaries','Galatean',''); +INSERT INTO t2 VALUES (829,218410,37,'theorizers','Hunter','techniques','W'); +INSERT INTO t2 VALUES (830,226001,37,'renew','sporty','error',''); +INSERT INTO t2 VALUES (831,226002,37,'already','test','veranda',''); +INSERT INTO t2 VALUES (832,226003,37,'terminal','weasels','severely',''); +INSERT INTO t2 VALUES (833,226004,37,'Hegelian','CERN','Cassites','FAS'); +INSERT INTO t2 VALUES (834,226005,37,'hypothesizer','tempering','forthcoming',''); +INSERT INTO t2 VALUES (835,226006,37,'warningly','afore','guides',''); +INSERT INTO t2 VALUES (836,226007,37,'journalizing','Galatean','vanish','FAS'); +INSERT INTO t2 VALUES (837,226008,37,'nested','techniques','lied','A'); +INSERT INTO t2 VALUES (838,226203,37,'Lars','error','sawtooth','FAS'); +INSERT INTO t2 VALUES (839,226204,37,'saplings','veranda','fated','FAS'); +INSERT INTO t2 VALUES (840,226205,37,'foothill','severely','gradually',''); +INSERT INTO t2 VALUES (841,226206,37,'labeled','Cassites','widens',''); +INSERT INTO t2 VALUES (842,226207,37,'imperiously','forthcoming','preclude',''); +INSERT INTO t2 VALUES (843,226208,37,'reporters','guides','Jobrel',''); +INSERT INTO t2 VALUES (844,226209,37,'furnishings','vanish','hooker',''); +INSERT INTO t2 VALUES (845,226210,37,'precipitable','lied','rainstorm',''); +INSERT INTO t2 VALUES (846,226211,37,'discounts','sawtooth','disconnects',''); +INSERT INTO t2 VALUES (847,228001,37,'excises','fated','cruelty',''); +INSERT INTO t2 VALUES (848,228004,37,'Stalin','gradually','exponentials','A'); +INSERT INTO t2 VALUES (849,228005,37,'despot','widens','affective','A'); +INSERT INTO t2 VALUES (850,228006,37,'ripeness','preclude','arteries',''); +INSERT INTO t2 VALUES (851,228007,37,'Arabia','Jobrel','Crosby','FAS'); +INSERT INTO t2 VALUES (852,228008,37,'unruly','hooker','acquaint',''); +INSERT INTO t2 VALUES (853,228009,37,'mournfulness','rainstorm','evenhandedly',''); +INSERT INTO t2 VALUES (854,228101,37,'boom','disconnects','percentage',''); +INSERT INTO t2 VALUES (855,228108,37,'slaughter','cruelty','disobedience',''); +INSERT INTO t2 VALUES (856,228109,37,'Sabine','exponentials','humility',''); +INSERT INTO t2 VALUES (857,228110,37,'handy','affective','gleaning','A'); +INSERT INTO t2 VALUES (858,228111,37,'rural','arteries','petted','A'); +INSERT INTO t2 VALUES (859,228112,37,'organizer','Crosby','bloater','A'); +INSERT INTO t2 VALUES (860,228113,37,'shipyard','acquaint','minion','A'); +INSERT INTO t2 VALUES (861,228114,37,'civics','evenhandedly','marginal','A'); +INSERT INTO t2 VALUES (862,228115,37,'inaccuracy','percentage','apiary','A'); +INSERT INTO t2 VALUES (863,228116,37,'rules','disobedience','measures',''); +INSERT INTO t2 VALUES (864,228117,37,'juveniles','humility','precaution',''); +INSERT INTO t2 VALUES (865,228118,37,'comprised','gleaning','repelled',''); +INSERT INTO t2 VALUES (866,228119,37,'investigations','petted','primary','FAS'); +INSERT INTO t2 VALUES (867,228120,37,'stabilizes','bloater','coverings',''); +INSERT INTO t2 VALUES (868,228121,37,'seminaries','minion','Artemia','A'); +INSERT INTO t2 VALUES (869,228122,37,'Hunter','marginal','navigate',''); +INSERT INTO t2 VALUES (870,228201,37,'sporty','apiary','spatial',''); +INSERT INTO t2 VALUES (871,228206,37,'test','measures','Gurkha',''); +INSERT INTO t2 VALUES (872,228207,37,'weasels','precaution','meanwhile','A'); +INSERT INTO t2 VALUES (873,228208,37,'CERN','repelled','Melinda','A'); +INSERT INTO t2 VALUES (874,228209,37,'tempering','primary','Butterfield',''); +INSERT INTO t2 VALUES (875,228210,37,'afore','coverings','Aldrich','A'); +INSERT INTO t2 VALUES (876,228211,37,'Galatean','Artemia','previewing','A'); +INSERT INTO t2 VALUES (877,228212,37,'techniques','navigate','glut','A'); +INSERT INTO t2 VALUES (878,228213,37,'error','spatial','unaffected',''); +INSERT INTO t2 VALUES (879,228214,37,'veranda','Gurkha','inmate',''); +INSERT INTO t2 VALUES (880,228301,37,'severely','meanwhile','mineral',''); +INSERT INTO t2 VALUES (881,228305,37,'Cassites','Melinda','impending','A'); +INSERT INTO t2 VALUES (882,228306,37,'forthcoming','Butterfield','meditation','A'); +INSERT INTO t2 VALUES (883,228307,37,'guides','Aldrich','ideas',''); +INSERT INTO t2 VALUES (884,228308,37,'vanish','previewing','miniaturizes','W'); +INSERT INTO t2 VALUES (885,228309,37,'lied','glut','lewdly',''); +INSERT INTO t2 VALUES (886,228310,37,'sawtooth','unaffected','title',''); +INSERT INTO t2 VALUES (887,228311,37,'fated','inmate','youthfulness',''); +INSERT INTO t2 VALUES (888,228312,37,'gradually','mineral','creak','FAS'); +INSERT INTO t2 VALUES (889,228313,37,'widens','impending','Chippewa',''); +INSERT INTO t2 VALUES (890,228314,37,'preclude','meditation','clamored',''); +INSERT INTO t2 VALUES (891,228401,65,'Jobrel','ideas','freezes',''); +INSERT INTO t2 VALUES (892,228402,65,'hooker','miniaturizes','forgivably','FAS'); +INSERT INTO t2 VALUES (893,228403,65,'rainstorm','lewdly','reduce','FAS'); +INSERT INTO t2 VALUES (894,228404,65,'disconnects','title','McGovern','W'); +INSERT INTO t2 VALUES (895,228405,65,'cruelty','youthfulness','Nazis','W'); +INSERT INTO t2 VALUES (896,228406,65,'exponentials','creak','epistle','W'); +INSERT INTO t2 VALUES (897,228407,65,'affective','Chippewa','socializes','W'); +INSERT INTO t2 VALUES (898,228408,65,'arteries','clamored','conceptions',''); +INSERT INTO t2 VALUES (899,228409,65,'Crosby','freezes','Kevin',''); +INSERT INTO t2 VALUES (900,228410,65,'acquaint','forgivably','uncovering',''); +INSERT INTO t2 VALUES (901,230301,37,'evenhandedly','reduce','chews','FAS'); +INSERT INTO t2 VALUES (902,230302,37,'percentage','McGovern','appendixes','FAS'); +INSERT INTO t2 VALUES (903,230303,37,'disobedience','Nazis','raining',''); +INSERT INTO t2 VALUES (904,018062,37,'humility','epistle','infest',''); +INSERT INTO t2 VALUES (905,230501,37,'gleaning','socializes','compartment',''); +INSERT INTO t2 VALUES (906,230502,37,'petted','conceptions','minting',''); +INSERT INTO t2 VALUES (907,230503,37,'bloater','Kevin','ducks',''); +INSERT INTO t2 VALUES (908,230504,37,'minion','uncovering','roped','A'); +INSERT INTO t2 VALUES (909,230505,37,'marginal','chews','waltz',''); +INSERT INTO t2 VALUES (910,230506,37,'apiary','appendixes','Lillian',''); +INSERT INTO t2 VALUES (911,230507,37,'measures','raining','repressions','A'); +INSERT INTO t2 VALUES (912,230508,37,'precaution','infest','chillingly',''); +INSERT INTO t2 VALUES (913,230509,37,'repelled','compartment','noncritical',''); +INSERT INTO t2 VALUES (914,230901,37,'primary','minting','lithograph',''); +INSERT INTO t2 VALUES (915,230902,37,'coverings','ducks','spongers',''); +INSERT INTO t2 VALUES (916,230903,37,'Artemia','roped','parenthood',''); +INSERT INTO t2 VALUES (917,230904,37,'navigate','waltz','posed',''); +INSERT INTO t2 VALUES (918,230905,37,'spatial','Lillian','instruments',''); +INSERT INTO t2 VALUES (919,230906,37,'Gurkha','repressions','filial',''); +INSERT INTO t2 VALUES (920,230907,37,'meanwhile','chillingly','fixedly',''); +INSERT INTO t2 VALUES (921,230908,37,'Melinda','noncritical','relives',''); +INSERT INTO t2 VALUES (922,230909,37,'Butterfield','lithograph','Pandora',''); +INSERT INTO t2 VALUES (923,230910,37,'Aldrich','spongers','watering','A'); +INSERT INTO t2 VALUES (924,230911,37,'previewing','parenthood','ungrateful',''); +INSERT INTO t2 VALUES (925,230912,37,'glut','posed','secures',''); +INSERT INTO t2 VALUES (926,230913,37,'unaffected','instruments','chastisers',''); +INSERT INTO t2 VALUES (927,230914,37,'inmate','filial','icon',''); +INSERT INTO t2 VALUES (928,231304,37,'mineral','fixedly','reuniting','A'); +INSERT INTO t2 VALUES (929,231305,37,'impending','relives','imagining','A'); +INSERT INTO t2 VALUES (930,231306,37,'meditation','Pandora','abiding','A'); +INSERT INTO t2 VALUES (931,231307,37,'ideas','watering','omnisciently',''); +INSERT INTO t2 VALUES (932,231308,37,'miniaturizes','ungrateful','Britannic',''); +INSERT INTO t2 VALUES (933,231309,37,'lewdly','secures','scholastics','A'); +INSERT INTO t2 VALUES (934,231310,37,'title','chastisers','mechanics','A'); +INSERT INTO t2 VALUES (935,231311,37,'youthfulness','icon','humidly','A'); +INSERT INTO t2 VALUES (936,231312,37,'creak','reuniting','masterpiece',''); +INSERT INTO t2 VALUES (937,231313,37,'Chippewa','imagining','however',''); +INSERT INTO t2 VALUES (938,231314,37,'clamored','abiding','Mendelian',''); +INSERT INTO t2 VALUES (939,231315,37,'freezes','omnisciently','jarred',''); +INSERT INTO t2 VALUES (940,232102,37,'forgivably','Britannic','scolds',''); +INSERT INTO t2 VALUES (941,232103,37,'reduce','scholastics','infatuate',''); +INSERT INTO t2 VALUES (942,232104,37,'McGovern','mechanics','willed','A'); +INSERT INTO t2 VALUES (943,232105,37,'Nazis','humidly','joyfully',''); +INSERT INTO t2 VALUES (944,232106,37,'epistle','masterpiece','Microsoft',''); +INSERT INTO t2 VALUES (945,232107,37,'socializes','however','fibrosities',''); +INSERT INTO t2 VALUES (946,232108,37,'conceptions','Mendelian','Baltimorean',''); +INSERT INTO t2 VALUES (947,232601,37,'Kevin','jarred','equestrian',''); +INSERT INTO t2 VALUES (948,232602,37,'uncovering','scolds','Goodrich',''); +INSERT INTO t2 VALUES (949,232603,37,'chews','infatuate','apish','A'); +INSERT INTO t2 VALUES (950,232605,37,'appendixes','willed','Adlerian',''); +INSERT INTO t2 VALUES (5950,1232605,37,'appendixes','willed','Adlerian',''); +INSERT INTO t2 VALUES (5951,1232606,37,'appendixes','willed','Adlerian',''); +INSERT INTO t2 VALUES (5952,1232607,37,'appendixes','willed','Adlerian',''); +INSERT INTO t2 VALUES (5953,1232608,37,'appendixes','willed','Adlerian',''); +INSERT INTO t2 VALUES (5954,1232609,37,'appendixes','willed','Adlerian',''); +INSERT INTO t2 VALUES (951,232606,37,'raining','joyfully','Tropez',''); +INSERT INTO t2 VALUES (952,232607,37,'infest','Microsoft','nouns',''); +INSERT INTO t2 VALUES (953,232608,37,'compartment','fibrosities','distracting',''); +INSERT INTO t2 VALUES (954,232609,37,'minting','Baltimorean','mutton',''); +INSERT INTO t2 VALUES (955,236104,37,'ducks','equestrian','bridgeable','A'); +INSERT INTO t2 VALUES (956,236105,37,'roped','Goodrich','stickers','A'); +INSERT INTO t2 VALUES (957,236106,37,'waltz','apish','transcontinental','A'); +INSERT INTO t2 VALUES (958,236107,37,'Lillian','Adlerian','amateurish',''); +INSERT INTO t2 VALUES (959,236108,37,'repressions','Tropez','Gandhian',''); +INSERT INTO t2 VALUES (960,236109,37,'chillingly','nouns','stratified',''); +INSERT INTO t2 VALUES (961,236110,37,'noncritical','distracting','chamberlains',''); +INSERT INTO t2 VALUES (962,236111,37,'lithograph','mutton','creditably',''); +INSERT INTO t2 VALUES (963,236112,37,'spongers','bridgeable','philosophic',''); +INSERT INTO t2 VALUES (964,236113,37,'parenthood','stickers','ores',''); +INSERT INTO t2 VALUES (965,238005,37,'posed','transcontinental','Carleton',''); +INSERT INTO t2 VALUES (966,238006,37,'instruments','amateurish','tape','A'); +INSERT INTO t2 VALUES (967,238007,37,'filial','Gandhian','afloat','A'); +INSERT INTO t2 VALUES (968,238008,37,'fixedly','stratified','goodness','A'); +INSERT INTO t2 VALUES (969,238009,37,'relives','chamberlains','welcoming',''); +INSERT INTO t2 VALUES (970,238010,37,'Pandora','creditably','Pinsky','FAS'); +INSERT INTO t2 VALUES (971,238011,37,'watering','philosophic','halting',''); +INSERT INTO t2 VALUES (972,238012,37,'ungrateful','ores','bibliography',''); +INSERT INTO t2 VALUES (973,238013,37,'secures','Carleton','decoding',''); +INSERT INTO t2 VALUES (974,240401,41,'chastisers','tape','variance','A'); +INSERT INTO t2 VALUES (975,240402,41,'icon','afloat','allowed','A'); +INSERT INTO t2 VALUES (976,240901,41,'reuniting','goodness','dire','A'); +INSERT INTO t2 VALUES (977,240902,41,'imagining','welcoming','dub','A'); +INSERT INTO t2 VALUES (978,241801,41,'abiding','Pinsky','poisoning',''); +INSERT INTO t2 VALUES (979,242101,41,'omnisciently','halting','Iraqis','A'); +INSERT INTO t2 VALUES (980,242102,41,'Britannic','bibliography','heaving',''); +INSERT INTO t2 VALUES (981,242201,41,'scholastics','decoding','population','A'); +INSERT INTO t2 VALUES (982,242202,41,'mechanics','variance','bomb','A'); +INSERT INTO t2 VALUES (983,242501,41,'humidly','allowed','Majorca','A'); +INSERT INTO t2 VALUES (984,242502,41,'masterpiece','dire','Gershwins',''); +INSERT INTO t2 VALUES (985,246201,41,'however','dub','explorers',''); +INSERT INTO t2 VALUES (986,246202,41,'Mendelian','poisoning','libretto','A'); +INSERT INTO t2 VALUES (987,246203,41,'jarred','Iraqis','occurred',''); +INSERT INTO t2 VALUES (988,246204,41,'scolds','heaving','Lagos',''); +INSERT INTO t2 VALUES (989,246205,41,'infatuate','population','rats',''); +INSERT INTO t2 VALUES (990,246301,41,'willed','bomb','bankruptcies','A'); +INSERT INTO t2 VALUES (991,246302,41,'joyfully','Majorca','crying',''); +INSERT INTO t2 VALUES (992,248001,41,'Microsoft','Gershwins','unexpected',''); +INSERT INTO t2 VALUES (993,248002,41,'fibrosities','explorers','accessed','A'); +INSERT INTO t2 VALUES (994,248003,41,'Baltimorean','libretto','colorful','A'); +INSERT INTO t2 VALUES (995,248004,41,'equestrian','occurred','versatility','A'); +INSERT INTO t2 VALUES (996,248005,41,'Goodrich','Lagos','cosy',''); +INSERT INTO t2 VALUES (997,248006,41,'apish','rats','Darius','A'); +INSERT INTO t2 VALUES (998,248007,41,'Adlerian','bankruptcies','mastering','A'); +INSERT INTO t2 VALUES (999,248008,41,'Tropez','crying','Asiaticizations','A'); +INSERT INTO t2 VALUES (1000,248009,41,'nouns','unexpected','offerers','A'); +INSERT INTO t2 VALUES (1001,248010,41,'distracting','accessed','uncles','A'); +INSERT INTO t2 VALUES (1002,248011,41,'mutton','colorful','sleepwalk',''); +INSERT INTO t2 VALUES (1003,248012,41,'bridgeable','versatility','Ernestine',''); +INSERT INTO t2 VALUES (1004,248013,41,'stickers','cosy','checksumming',''); +INSERT INTO t2 VALUES (1005,248014,41,'transcontinental','Darius','stopped',''); +INSERT INTO t2 VALUES (1006,248015,41,'amateurish','mastering','sicker',''); +INSERT INTO t2 VALUES (1007,248016,41,'Gandhian','Asiaticizations','Italianization',''); +INSERT INTO t2 VALUES (1008,248017,41,'stratified','offerers','alphabetic',''); +INSERT INTO t2 VALUES (1009,248018,41,'chamberlains','uncles','pharmaceutic',''); +INSERT INTO t2 VALUES (1010,248019,41,'creditably','sleepwalk','creator',''); +INSERT INTO t2 VALUES (1011,248020,41,'philosophic','Ernestine','chess',''); +INSERT INTO t2 VALUES (1012,248021,41,'ores','checksumming','charcoal',''); +INSERT INTO t2 VALUES (1013,248101,41,'Carleton','stopped','Epiphany','A'); +INSERT INTO t2 VALUES (1014,248102,41,'tape','sicker','bulldozes','A'); +INSERT INTO t2 VALUES (1015,248201,41,'afloat','Italianization','Pygmalion','A'); +INSERT INTO t2 VALUES (1016,248202,41,'goodness','alphabetic','caressing','A'); +INSERT INTO t2 VALUES (1017,248203,41,'welcoming','pharmaceutic','Palestine','A'); +INSERT INTO t2 VALUES (1018,248204,41,'Pinsky','creator','regimented','A'); +INSERT INTO t2 VALUES (1019,248205,41,'halting','chess','scars','A'); +INSERT INTO t2 VALUES (1020,248206,41,'bibliography','charcoal','realest','A'); +INSERT INTO t2 VALUES (1021,248207,41,'decoding','Epiphany','diffusing','A'); +INSERT INTO t2 VALUES (1022,248208,41,'variance','bulldozes','clubroom','A'); +INSERT INTO t2 VALUES (1023,248209,41,'allowed','Pygmalion','Blythe','A'); +INSERT INTO t2 VALUES (1024,248210,41,'dire','caressing','ahead',''); +INSERT INTO t2 VALUES (1025,248211,50,'dub','Palestine','reviver',''); +INSERT INTO t2 VALUES (1026,250501,34,'poisoning','regimented','retransmitting','A'); +INSERT INTO t2 VALUES (1027,250502,34,'Iraqis','scars','landslide',''); +INSERT INTO t2 VALUES (1028,250503,34,'heaving','realest','Eiffel',''); +INSERT INTO t2 VALUES (1029,250504,34,'population','diffusing','absentee',''); +INSERT INTO t2 VALUES (1030,250505,34,'bomb','clubroom','aye',''); +INSERT INTO t2 VALUES (1031,250601,34,'Majorca','Blythe','forked','A'); +INSERT INTO t2 VALUES (1032,250602,34,'Gershwins','ahead','Peruvianizes',''); +INSERT INTO t2 VALUES (1033,250603,34,'explorers','reviver','clerked',''); +INSERT INTO t2 VALUES (1034,250604,34,'libretto','retransmitting','tutor',''); +INSERT INTO t2 VALUES (1035,250605,34,'occurred','landslide','boulevard',''); +INSERT INTO t2 VALUES (1036,251001,34,'Lagos','Eiffel','shuttered',''); +INSERT INTO t2 VALUES (1037,251002,34,'rats','absentee','quotes','A'); +INSERT INTO t2 VALUES (1038,251003,34,'bankruptcies','aye','Caltech',''); +INSERT INTO t2 VALUES (1039,251004,34,'crying','forked','Mossberg',''); +INSERT INTO t2 VALUES (1040,251005,34,'unexpected','Peruvianizes','kept',''); +INSERT INTO t2 VALUES (1041,251301,34,'accessed','clerked','roundly',''); +INSERT INTO t2 VALUES (1042,251302,34,'colorful','tutor','features','A'); +INSERT INTO t2 VALUES (1043,251303,34,'versatility','boulevard','imaginable','A'); +INSERT INTO t2 VALUES (1044,251304,34,'cosy','shuttered','controller',''); +INSERT INTO t2 VALUES (1045,251305,34,'Darius','quotes','racial',''); +INSERT INTO t2 VALUES (1046,251401,34,'mastering','Caltech','uprisings','A'); +INSERT INTO t2 VALUES (1047,251402,34,'Asiaticizations','Mossberg','narrowed','A'); +INSERT INTO t2 VALUES (1048,251403,34,'offerers','kept','cannot','A'); +INSERT INTO t2 VALUES (1049,251404,34,'uncles','roundly','vest',''); +INSERT INTO t2 VALUES (1050,251405,34,'sleepwalk','features','famine',''); +INSERT INTO t2 VALUES (1051,251406,34,'Ernestine','imaginable','sugars',''); +INSERT INTO t2 VALUES (1052,251801,34,'checksumming','controller','exterminated','A'); +INSERT INTO t2 VALUES (1053,251802,34,'stopped','racial','belays',''); +INSERT INTO t2 VALUES (1054,252101,34,'sicker','uprisings','Hodges','A'); +INSERT INTO t2 VALUES (1055,252102,34,'Italianization','narrowed','translatable',''); +INSERT INTO t2 VALUES (1056,252301,34,'alphabetic','cannot','duality','A'); +INSERT INTO t2 VALUES (1057,252302,34,'pharmaceutic','vest','recording','A'); +INSERT INTO t2 VALUES (1058,252303,34,'creator','famine','rouses','A'); +INSERT INTO t2 VALUES (1059,252304,34,'chess','sugars','poison',''); +INSERT INTO t2 VALUES (1060,252305,34,'charcoal','exterminated','attitude',''); +INSERT INTO t2 VALUES (1061,252306,34,'Epiphany','belays','dusted',''); +INSERT INTO t2 VALUES (1062,252307,34,'bulldozes','Hodges','encompasses',''); +INSERT INTO t2 VALUES (1063,252308,34,'Pygmalion','translatable','presentation',''); +INSERT INTO t2 VALUES (1064,252309,34,'caressing','duality','Kantian',''); +INSERT INTO t2 VALUES (1065,256001,34,'Palestine','recording','imprecision','A'); +INSERT INTO t2 VALUES (1066,256002,34,'regimented','rouses','saving',''); +INSERT INTO t2 VALUES (1067,256003,34,'scars','poison','maternal',''); +INSERT INTO t2 VALUES (1068,256004,34,'realest','attitude','hewed',''); +INSERT INTO t2 VALUES (1069,256005,34,'diffusing','dusted','kerosene',''); +INSERT INTO t2 VALUES (1070,258001,34,'clubroom','encompasses','Cubans',''); +INSERT INTO t2 VALUES (1071,258002,34,'Blythe','presentation','photographers',''); +INSERT INTO t2 VALUES (1072,258003,34,'ahead','Kantian','nymph','A'); +INSERT INTO t2 VALUES (1073,258004,34,'reviver','imprecision','bedlam','A'); +INSERT INTO t2 VALUES (1074,258005,34,'retransmitting','saving','north','A'); +INSERT INTO t2 VALUES (1075,258006,34,'landslide','maternal','Schoenberg','A'); +INSERT INTO t2 VALUES (1076,258007,34,'Eiffel','hewed','botany','A'); +INSERT INTO t2 VALUES (1077,258008,34,'absentee','kerosene','curs',''); +INSERT INTO t2 VALUES (1078,258009,34,'aye','Cubans','solidification',''); +INSERT INTO t2 VALUES (1079,258010,34,'forked','photographers','inheritresses',''); +INSERT INTO t2 VALUES (1080,258011,34,'Peruvianizes','nymph','stiller',''); +INSERT INTO t2 VALUES (1081,258101,68,'clerked','bedlam','t1','A'); +INSERT INTO t2 VALUES (1082,258102,68,'tutor','north','suite','A'); +INSERT INTO t2 VALUES (1083,258103,34,'boulevard','Schoenberg','ransomer',''); +INSERT INTO t2 VALUES (1084,258104,68,'shuttered','botany','Willy',''); +INSERT INTO t2 VALUES (1085,258105,68,'quotes','curs','Rena','A'); +INSERT INTO t2 VALUES (1086,258106,68,'Caltech','solidification','Seattle','A'); +INSERT INTO t2 VALUES (1087,258107,68,'Mossberg','inheritresses','relaxes','A'); +INSERT INTO t2 VALUES (1088,258108,68,'kept','stiller','exclaim',''); +INSERT INTO t2 VALUES (1089,258109,68,'roundly','t1','implicated','A'); +INSERT INTO t2 VALUES (1090,258110,68,'features','suite','distinguish',''); +INSERT INTO t2 VALUES (1091,258111,68,'imaginable','ransomer','assayed',''); +INSERT INTO t2 VALUES (1092,258112,68,'controller','Willy','homeowner',''); +INSERT INTO t2 VALUES (1093,258113,68,'racial','Rena','and',''); +INSERT INTO t2 VALUES (1094,258201,34,'uprisings','Seattle','stealth',''); +INSERT INTO t2 VALUES (1095,258202,34,'narrowed','relaxes','coinciding','A'); +INSERT INTO t2 VALUES (1096,258203,34,'cannot','exclaim','founder','A'); +INSERT INTO t2 VALUES (1097,258204,34,'vest','implicated','environing',''); +INSERT INTO t2 VALUES (1098,258205,34,'famine','distinguish','jewelry',''); +INSERT INTO t2 VALUES (1099,258301,34,'sugars','assayed','lemons','A'); +INSERT INTO t2 VALUES (1100,258401,34,'exterminated','homeowner','brokenness','A'); +INSERT INTO t2 VALUES (1101,258402,34,'belays','and','bedpost','A'); +INSERT INTO t2 VALUES (1102,258403,34,'Hodges','stealth','assurers','A'); +INSERT INTO t2 VALUES (1103,258404,34,'translatable','coinciding','annoyers',''); +INSERT INTO t2 VALUES (1104,258405,34,'duality','founder','affixed',''); +INSERT INTO t2 VALUES (1105,258406,34,'recording','environing','warbling',''); +INSERT INTO t2 VALUES (1106,258407,34,'rouses','jewelry','seriously',''); +INSERT INTO t2 VALUES (1107,228123,37,'poison','lemons','boasted',''); +INSERT INTO t2 VALUES (1108,250606,34,'attitude','brokenness','Chantilly',''); +INSERT INTO t2 VALUES (1109,208405,37,'dusted','bedpost','Iranizes',''); +INSERT INTO t2 VALUES (1110,212101,37,'encompasses','assurers','violinist',''); +INSERT INTO t2 VALUES (1111,218206,37,'presentation','annoyers','extramarital',''); +INSERT INTO t2 VALUES (1112,150401,37,'Kantian','affixed','spates',''); +INSERT INTO t2 VALUES (1113,248212,41,'imprecision','warbling','cloakroom',''); +INSERT INTO t2 VALUES (1114,128026,00,'saving','seriously','gazer',''); +INSERT INTO t2 VALUES (1115,128024,00,'maternal','boasted','hand',''); +INSERT INTO t2 VALUES (1116,128027,00,'hewed','Chantilly','tucked',''); +INSERT INTO t2 VALUES (1117,128025,00,'kerosene','Iranizes','gems',''); +INSERT INTO t2 VALUES (1118,128109,00,'Cubans','violinist','clinker',''); +INSERT INTO t2 VALUES (1119,128705,00,'photographers','extramarital','refiner',''); +INSERT INTO t2 VALUES (1120,126303,00,'nymph','spates','callus',''); +INSERT INTO t2 VALUES (1121,128308,00,'bedlam','cloakroom','leopards',''); +INSERT INTO t2 VALUES (1122,128204,00,'north','gazer','comfortingly',''); +INSERT INTO t2 VALUES (1123,128205,00,'Schoenberg','hand','generically',''); +INSERT INTO t2 VALUES (1124,128206,00,'botany','tucked','getters',''); +INSERT INTO t2 VALUES (1125,128207,00,'curs','gems','sexually',''); +INSERT INTO t2 VALUES (1126,118205,00,'solidification','clinker','spear',''); +INSERT INTO t2 VALUES (1127,116801,00,'inheritresses','refiner','serums',''); +INSERT INTO t2 VALUES (1128,116803,00,'stiller','callus','Italianization',''); +INSERT INTO t2 VALUES (1129,116804,00,'t1','leopards','attendants',''); +INSERT INTO t2 VALUES (1130,116802,00,'suite','comfortingly','spies',''); +INSERT INTO t2 VALUES (1131,128605,00,'ransomer','generically','Anthony',''); +INSERT INTO t2 VALUES (1132,118308,00,'Willy','getters','planar',''); +INSERT INTO t2 VALUES (1133,113702,00,'Rena','sexually','cupped',''); +INSERT INTO t2 VALUES (1134,113703,00,'Seattle','spear','cleanser',''); +INSERT INTO t2 VALUES (1135,112103,00,'relaxes','serums','commuters',''); +INSERT INTO t2 VALUES (1136,118009,00,'exclaim','Italianization','honeysuckle',''); +INSERT INTO t2 VALUES (5136,1118009,00,'exclaim','Italianization','honeysuckle',''); +INSERT INTO t2 VALUES (1137,138011,00,'implicated','attendants','orphanage',''); +INSERT INTO t2 VALUES (1138,138010,00,'distinguish','spies','skies',''); +INSERT INTO t2 VALUES (1139,138012,00,'assayed','Anthony','crushers',''); +INSERT INTO t2 VALUES (1140,068304,00,'homeowner','planar','Puritan',''); +INSERT INTO t2 VALUES (1141,078009,00,'and','cupped','squeezer',''); +INSERT INTO t2 VALUES (1142,108013,00,'stealth','cleanser','bruises',''); +INSERT INTO t2 VALUES (1143,084004,00,'coinciding','commuters','bonfire',''); +INSERT INTO t2 VALUES (1144,083402,00,'founder','honeysuckle','Colombo',''); +INSERT INTO t2 VALUES (1145,084003,00,'environing','orphanage','nondecreasing',''); +INSERT INTO t2 VALUES (1146,088504,00,'jewelry','skies','innocents',''); +INSERT INTO t2 VALUES (1147,088005,00,'lemons','crushers','masked',''); +INSERT INTO t2 VALUES (1148,088007,00,'brokenness','Puritan','file',''); +INSERT INTO t2 VALUES (1149,088006,00,'bedpost','squeezer','brush',''); +INSERT INTO t2 VALUES (1150,148025,00,'assurers','bruises','mutilate',''); +INSERT INTO t2 VALUES (1151,148024,00,'annoyers','bonfire','mommy',''); +INSERT INTO t2 VALUES (1152,138305,00,'affixed','Colombo','bulkheads',''); +INSERT INTO t2 VALUES (1153,138306,00,'warbling','nondecreasing','undeclared',''); +INSERT INTO t2 VALUES (1154,152701,00,'seriously','innocents','displacements',''); +INSERT INTO t2 VALUES (1155,148505,00,'boasted','masked','nieces',''); +INSERT INTO t2 VALUES (1156,158003,00,'Chantilly','file','coeducation',''); +INSERT INTO t2 VALUES (1157,156201,00,'Iranizes','brush','brassy',''); +INSERT INTO t2 VALUES (1158,156202,00,'violinist','mutilate','authenticator',''); +INSERT INTO t2 VALUES (1159,158307,00,'extramarital','mommy','Washoe',''); +INSERT INTO t2 VALUES (1160,158402,00,'spates','bulkheads','penny',''); +INSERT INTO t2 VALUES (1161,158401,00,'cloakroom','undeclared','Flagler',''); +INSERT INTO t2 VALUES (1162,068013,00,'gazer','displacements','stoned',''); +INSERT INTO t2 VALUES (1163,068012,00,'hand','nieces','cranes',''); +INSERT INTO t2 VALUES (1164,068203,00,'tucked','coeducation','masterful',''); +INSERT INTO t2 VALUES (1165,088205,00,'gems','brassy','biracial',''); +INSERT INTO t2 VALUES (1166,068704,00,'clinker','authenticator','steamships',''); +INSERT INTO t2 VALUES (1167,068604,00,'refiner','Washoe','windmills',''); +INSERT INTO t2 VALUES (1168,158502,00,'callus','penny','exploit',''); +INSERT INTO t2 VALUES (1169,123103,00,'leopards','Flagler','riverfront',''); +INSERT INTO t2 VALUES (1170,148026,00,'comfortingly','stoned','sisterly',''); +INSERT INTO t2 VALUES (1171,123302,00,'generically','cranes','sharpshoot',''); +INSERT INTO t2 VALUES (1172,076503,00,'getters','masterful','mittens',''); +INSERT INTO t2 VALUES (1173,126304,00,'sexually','biracial','interdependency',''); +INSERT INTO t2 VALUES (1174,068306,00,'spear','steamships','policy',''); +INSERT INTO t2 VALUES (1175,143504,00,'serums','windmills','unleashing',''); +INSERT INTO t2 VALUES (1176,160201,00,'Italianization','exploit','pretenders',''); +INSERT INTO t2 VALUES (1177,148028,00,'attendants','riverfront','overstatements',''); +INSERT INTO t2 VALUES (1178,148027,00,'spies','sisterly','birthed',''); +INSERT INTO t2 VALUES (1179,143505,00,'Anthony','sharpshoot','opportunism',''); +INSERT INTO t2 VALUES (1180,108014,00,'planar','mittens','showroom',''); +INSERT INTO t2 VALUES (1181,076104,00,'cupped','interdependency','compromisingly',''); +INSERT INTO t2 VALUES (1182,078106,00,'cleanser','policy','Medicare',''); +INSERT INTO t2 VALUES (1183,126102,00,'commuters','unleashing','corresponds',''); +INSERT INTO t2 VALUES (1184,128029,00,'honeysuckle','pretenders','hardware',''); +INSERT INTO t2 VALUES (1185,128028,00,'orphanage','overstatements','implant',''); +INSERT INTO t2 VALUES (1186,018410,00,'skies','birthed','Alicia',''); +INSERT INTO t2 VALUES (1187,128110,00,'crushers','opportunism','requesting',''); +INSERT INTO t2 VALUES (1188,148506,00,'Puritan','showroom','produced',''); +INSERT INTO t2 VALUES (1189,123303,00,'squeezer','compromisingly','criticizes',''); +INSERT INTO t2 VALUES (1190,123304,00,'bruises','Medicare','backer',''); +INSERT INTO t2 VALUES (1191,068504,00,'bonfire','corresponds','positively',''); +INSERT INTO t2 VALUES (1192,068305,00,'Colombo','hardware','colicky',''); +INSERT INTO t2 VALUES (1193,000000,00,'nondecreasing','implant','thrillingly',''); +--enable_query_log + +# +# Search with a key +# + +select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"; +select fld3 from t2 where fld3 like "%cultivation" ; + +# +# Search with a key using sorting and limit the same time +# + +select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3; +select fld3,companynr from t2 where companynr = 58 order by fld3; + +select fld3 from t2 order by fld3 desc limit 10; +select fld3 from t2 order by fld3 desc limit 5; +select fld3 from t2 order by fld3 desc limit 5,5; + +# +# Update +# + +UPDATE t2 SET fld3="foo" WHERE fld3="b%"; +select fld3 from t2; + + +# +# Update randomly +# + +UPDATE t2 SET fld3="bar" WHERE fld3="s%"; +select fld3 from t2; + +# +# Delete with constant +# + +DELETE FROM t2 WHERE fld3="r%"; +SELECT fld3 FROM t2; + +# +# Delete with Random +# + +DELETE FROM t2 WHERE fld3="d%" ORDER BY RAND(); +SELECT fld3 FROM t2; + +# +# Rename table +# + +DROP TABLE t1; +ALTER TABLE t2 RENAME t1 + +# +# Drop and recreate +# + + +DROP TABLE t1; +CREATE TABLE t1 ( + Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, + Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL +) ENGINE = CSV; + +INSERT INTO t1 VALUES (9410,9412); + +select period from t1; + +drop table if exists t1,t2,t3,t4; diff --git a/mysql-test/t/ctype_create.test b/mysql-test/t/ctype_create.test index 6d7ed6fc205..9a5cb025474 100644 --- a/mysql-test/t/ctype_create.test +++ b/mysql-test/t/ctype_create.test @@ -71,6 +71,18 @@ SHOW CREATE TABLE t1; DROP TABLE t1; # +# Bug# +# CREATE TABLE and CREATE DATABASE didn't fail in some cases +# +--error 1302 +create table t1 (a char) character set latin1 character set latin2; +--error 1253 +create table t1 (a char) character set latin1 collate latin2_bin; +--error 1302 +create database d1 default character set latin1 character set latin2; +--error 1253 +create database d1 default character set latin1 collate latin2_bin; + # # DROP DATABASE mysqltest1; diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test index de6332f272c..82d0643b577 100644 --- a/mysql-test/t/ctype_recoding.test +++ b/mysql-test/t/ctype_recoding.test @@ -98,6 +98,20 @@ SET NAMES utf8; SET character_set_connection=binary; SELECT 'тест' as s; +# Bug#4417, another aspect: +# Check that both "SHOW CREATE TABLE" and "SHOW COLUMNS" +# return column names and default values in UTF8 after "SET NAMES BINARY" + +SET NAMES latin1; +CREATE TABLE t1 (`` CHAR(128) DEFAULT '', `1` ENUM('1','2') DEFAULT '2'); +SHOW CREATE TABLE t1; +SHOW COLUMNS FROM t1; +SET NAMES binary; +SHOW CREATE TABLE t1; +SHOW COLUMNS FROM t1; +DROP TABLE t1; + + # # Test that we allow only well-formed UTF8 identitiers # diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test index 0ab46a5a637..187d21f9ab7 100644 --- a/mysql-test/t/ctype_uca.test +++ b/mysql-test/t/ctype_uca.test @@ -176,7 +176,7 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_turkish_ci; select group_concat(c1 order by c1) from t1 group by c1 collate utf8_czech_ci; select group_concat(c1 order by c1) from t1 group by c1 collate utf8_danish_ci; select group_concat(c1 order by c1) from t1 group by c1 collate utf8_lithuanian_ci; ---select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovak_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovak_ci; select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish2_ci; select group_concat(c1 order by c1) from t1 group by c1 collate utf8_roman_ci; diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index b8574fb7623..d9ef91496e9 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -293,3 +293,25 @@ SELECT HEX(a) FROM t1; DROP TABLE t1; -- the same should be also done with enum and set + + +# +# Bug #5024 Server crashes with queries on fields +# with certain charset/collation settings +# + +create table t1 (s1 char character set `ucs2` collate `ucs2_czech_ci`); +insert into t1 values ('0'),('1'),('2'),('a'),('b'),('c'); +select s1 from t1 where s1 > 'a' order by s1; +drop table t1; + +# +# Bug #5081 : UCS2 fields are filled with '0x2020' +# after extending field length +# +create table t1(a char(1)) default charset = ucs2; +insert into t1 values ('a'),('b'),('c'); +alter table t1 modify a char(5); +select a, hex(a) from t1; +drop table t1; + diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index 07baee1b3bd..2c531d4e5d2 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -3,7 +3,7 @@ # --disable_warnings -drop table if exists t1; +drop table if exists t1,t2; --enable_warnings set names utf8; @@ -45,6 +45,15 @@ SELECT 'a\0' < 'a '; SELECT 'a\t' < 'a'; SELECT 'a\t' < 'a '; +# +# The same for binary collation +# +SELECT 'a' = 'a ' collate utf8_bin; +SELECT 'a\0' < 'a' collate utf8_bin; +SELECT 'a\0' < 'a ' collate utf8_bin; +SELECT 'a\t' < 'a' collate utf8_bin; +SELECT 'a\t' < 'a ' collate utf8_bin; + CREATE TABLE t1 (a char(10) character set utf8 not null); INSERT INTO t1 VALUES ('a'),('a\0'),('a\t'),('a '); SELECT hex(a),STRCMP(a,'a'), STRCMP(a,'a ') FROM t1; @@ -63,6 +72,12 @@ select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es'); select insert("aa",100,1,"b"),insert("aa",1,3,"b"); # +# LELF() didn't work well with utf8 in some cases too. +# +select char_length(left(@a:='тест',5)), length(@a), @a; + + +# # CREATE ... SELECT # create table t1 select date_format("2004-01-19 10:10:10", "%Y-%m-%d"); @@ -165,3 +180,315 @@ select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8_unicode_ci); ALTER TABLE t1 ADD COLUMN b CHAR(20); DROP TABLE t1; + +# Customer Support Center issue # 3299 +# ENUM and SET multibyte fields computed their length wronly +# when converted into a char field +set names utf8; +create table t1 (a enum('aaaa','проба') character set utf8); +show create table t1; +insert into t1 values ('проба'); +select * from t1; +create table t2 select ifnull(a,a) from t1; +show create table t2; +select * from t2; +drop table t1; +drop table t2; + +# +# Bug 4521: unique key prefix interacts poorly with utf8 +# MYISAM: keys with prefix compression, case insensitive collation. +# +create table t1 (c varchar(30) character set utf8, unique(c(10))); +insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z'); +insert into t1 values ('aaaaaaaaaa'); +--error 1062 +insert into t1 values ('aaaaaaaaaaa'); +--error 1062 +insert into t1 values ('aaaaaaaaaaaa'); +insert into t1 values (repeat('b',20)); +select c c1 from t1 where c='1'; +select c c2 from t1 where c='2'; +select c c3 from t1 where c='3'; +select c cx from t1 where c='x'; +select c cy from t1 where c='y'; +select c cz from t1 where c='z'; +select c ca10 from t1 where c='aaaaaaaaaa'; +select c cb20 from t1 where c=repeat('b',20); +drop table t1; + +# +# Bug 4521: unique key prefix interacts poorly with utf8 +# MYISAM: fixed length keys, case insensitive collation +# +create table t1 (c char(3) character set utf8, unique (c(2))); +insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z'); +insert into t1 values ('a'); +insert into t1 values ('aa'); +--error 1062 +insert into t1 values ('aaa'); +insert into t1 values ('b'); +insert into t1 values ('bb'); +--error 1062 +insert into t1 values ('bbb'); +insert into t1 values ('а'); +insert into t1 values ('аа'); +--error 1062 +insert into t1 values ('ааа'); +insert into t1 values ('б'); +insert into t1 values ('бб'); +--error 1062 +insert into t1 values ('ббб'); +insert into t1 values ('ꪪ'); +insert into t1 values ('ꪪꪪ'); +--error 1062 +insert into t1 values ('ꪪꪪꪪ'); +drop table t1; + +# +# Bug 4531: unique key prefix interacts poorly with utf8 +# Check HEAP+HASH, case insensitive collation +# +create table t1 ( +c char(10) character set utf8, +unique key a using hash (c(1)) +) engine=heap; +show create table t1; +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +--error 1062 +insert into t1 values ('aa'); +--error 1062 +insert into t1 values ('aaa'); +insert into t1 values ('б'); +--error 1062 +insert into t1 values ('бб'); +--error 1062 +insert into t1 values ('ббб'); +select c as c_all from t1 order by c; +select c as c_a from t1 where c='a'; +select c as c_a from t1 where c='б'; +drop table t1; + +# +# Bug 4531: unique key prefix interacts poorly with utf8 +# Check HEAP+BTREE, case insensitive collation +# +create table t1 ( +c char(10) character set utf8, +unique key a using btree (c(1)) +) engine=heap; +show create table t1; +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +--error 1062 +insert into t1 values ('aa'); +--error 1062 +insert into t1 values ('aaa'); +insert into t1 values ('б'); +--error 1062 +insert into t1 values ('бб'); +--error 1062 +insert into t1 values ('ббб'); +select c as c_all from t1 order by c; +select c as c_a from t1 where c='a'; +select c as c_a from t1 where c='б'; +drop table t1; + +# +# Bug 4531: unique key prefix interacts poorly with utf8 +# Check BDB, case insensitive collation +# +--disable_warnings +create table t1 ( +c char(10) character set utf8, +unique key a (c(1)) +) engine=bdb; +--enable_warnings +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +--error 1062 +insert into t1 values ('aa'); +--error 1062 +insert into t1 values ('aaa'); +insert into t1 values ('б'); +--error 1062 +insert into t1 values ('бб'); +--error 1062 +insert into t1 values ('ббб'); +select c as c_all from t1 order by c; +select c as c_a from t1 where c='a'; +select c as c_a from t1 where c='б'; +drop table t1; + +# +# Bug 4521: unique key prefix interacts poorly with utf8 +# MYISAM: keys with prefix compression, binary collation. +# +create table t1 (c varchar(30) character set utf8 collate utf8_bin, unique(c(10))); +insert into t1 values ('1'),('2'),('3'),('x'),('y'),('z'); +insert into t1 values ('aaaaaaaaaa'); +--error 1062 +insert into t1 values ('aaaaaaaaaaa'); +--error 1062 +insert into t1 values ('aaaaaaaaaaaa'); +insert into t1 values (repeat('b',20)); +select c c1 from t1 where c='1'; +select c c2 from t1 where c='2'; +select c c3 from t1 where c='3'; +select c cx from t1 where c='x'; +select c cy from t1 where c='y'; +select c cz from t1 where c='z'; +select c ca10 from t1 where c='aaaaaaaaaa'; +select c cb20 from t1 where c=repeat('b',20); +drop table t1; + +# +# Bug 4521: unique key prefix interacts poorly with utf8 +# MYISAM: fixed length keys, binary collation +# +create table t1 (c char(3) character set utf8 collate utf8_bin, unique (c(2))); +insert into t1 values ('1'),('2'),('3'),('4'),('x'),('y'),('z'); +insert into t1 values ('a'); +insert into t1 values ('aa'); +--error 1062 +insert into t1 values ('aaa'); +insert into t1 values ('b'); +insert into t1 values ('bb'); +--error 1062 +insert into t1 values ('bbb'); +insert into t1 values ('а'); +insert into t1 values ('аа'); +--error 1062 +insert into t1 values ('ааа'); +insert into t1 values ('б'); +insert into t1 values ('бб'); +--error 1062 +insert into t1 values ('ббб'); +insert into t1 values ('ꪪ'); +insert into t1 values ('ꪪꪪ'); +--error 1062 +insert into t1 values ('ꪪꪪꪪ'); +drop table t1; + +# +# Bug 4531: unique key prefix interacts poorly with utf8 +# Check HEAP+HASH, binary collation +# +create table t1 ( +c char(10) character set utf8 collate utf8_bin, +unique key a using hash (c(1)) +) engine=heap; +show create table t1; +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +--error 1062 +insert into t1 values ('aa'); +--error 1062 +insert into t1 values ('aaa'); +insert into t1 values ('б'); +--error 1062 +insert into t1 values ('бб'); +--error 1062 +insert into t1 values ('ббб'); +select c as c_all from t1 order by c; +select c as c_a from t1 where c='a'; +select c as c_a from t1 where c='б'; +drop table t1; + +# +# Bug 4531: unique key prefix interacts poorly with utf8 +# Check HEAP+BTREE, binary collation +# +create table t1 ( +c char(10) character set utf8 collate utf8_bin, +unique key a using btree (c(1)) +) engine=heap; +show create table t1; +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +--error 1062 +insert into t1 values ('aa'); +--error 1062 +insert into t1 values ('aaa'); +insert into t1 values ('б'); +--error 1062 +insert into t1 values ('бб'); +--error 1062 +insert into t1 values ('ббб'); +select c as c_all from t1 order by c; +select c as c_a from t1 where c='a'; +select c as c_a from t1 where c='б'; +drop table t1; + +# +# Bug 4531: unique key prefix interacts poorly with utf8 +# Check BDB, binary collation +# +--disable_warnings +create table t1 ( +c char(10) character set utf8 collate utf8_bin, +unique key a (c(1)) +) engine=bdb; +--enable_warnings +insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); +--error 1062 +insert into t1 values ('aa'); +--error 1062 +insert into t1 values ('aaa'); +insert into t1 values ('б'); +--error 1062 +insert into t1 values ('бб'); +--error 1062 +insert into t1 values ('ббб'); +select c as c_all from t1 order by c; +select c as c_a from t1 where c='a'; +select c as c_a from t1 where c='б'; +drop table t1; + + +# Bug#4594: column index make = failed for gbk, but like works +# Check MYISAM +# +create table t1 ( + str varchar(255) character set utf8 not null, + key str (str(2)) +) engine=myisam; +INSERT INTO t1 VALUES ('str'); +INSERT INTO t1 VALUES ('str2'); +select * from t1 where str='str'; +drop table t1; + +# the same for HEAP+BTREE +# + +create table t1 ( + str varchar(255) character set utf8 not null, + key str using btree (str(2)) +) engine=heap; +INSERT INTO t1 VALUES ('str'); +INSERT INTO t1 VALUES ('str2'); +select * from t1 where str='str'; +drop table t1; + +# the same for HEAP+HASH +# + +create table t1 ( + str varchar(255) character set utf8 not null, + key str using hash (str(2)) +) engine=heap; +INSERT INTO t1 VALUES ('str'); +INSERT INTO t1 VALUES ('str2'); +select * from t1 where str='str'; +drop table t1; + +# the same for BDB +# + +--disable_warnings +create table t1 ( + str varchar(255) character set utf8 not null, + key str (str(2)) +) engine=bdb; +--enable_warnings +INSERT INTO t1 VALUES ('str'); +INSERT INTO t1 VALUES ('str2'); +select * from t1 where str='str'; +drop table t1; + diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test index 1fc04cb907b..f769fe7af04 100644 --- a/mysql-test/t/date_formats.test +++ b/mysql-test/t/date_formats.test @@ -132,16 +132,23 @@ insert into t1 values ('2003-01-02 11:11:12Pm', '%Y-%m-%d %h:%i:%S%p'), ('10:20:10', '%H:%i:%s'), ('10:20:10', '%h:%i:%s.%f'), +('10:20:10', '%T'), ('10:20:10AM', '%h:%i:%s%p'), +('10:20:10AM', '%r'), ('10:20:10.44AM', '%h:%i:%s.%f%p'), ('15-01-2001 12:59:58', '%d-%m-%Y %H:%i:%S'), ('15 September 2001', '%d %M %Y'), ('15 SEPTEMB 2001', '%d %M %Y'), ('15 MAY 2001', '%d %b %Y'), +('15th May 2001', '%D %b %Y'), ('Sunday 15 MAY 2001', '%W %d %b %Y'), ('Sund 15 MAY 2001', '%W %d %b %Y'), ('Tuesday 00 2002', '%W %U %Y'), ('Thursday 53 1998', '%W %u %Y'), +('Sunday 01 2001', '%W %v %x'), +('Tuesday 52 2001', '%W %V %X'), +('060 2004', '%j %Y'), +('4 53 1998', '%w %u %Y'), ('15-01-2001', '%d-%m-%Y %H:%i:%S'), ('15-01-20', '%d-%m-%y'), ('15-2001-1', '%d-%Y-%c'); @@ -156,7 +163,7 @@ select date,format,DATE(str_to_date(date, format)) as date2 from t1; select date,format,TIME(str_to_date(date, format)) as time from t1; select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1; -# Test wrong dates +# Test wrong dates or converion specifiers truncate table t1; insert into t1 values @@ -169,10 +176,13 @@ insert into t1 values ('15 Septembei 2001', '%d %M %Y'), ('15 Ju 2001', '%d %M %Y'), ('Sund 15 MA', '%W %d %b %Y'), -('Sunday 01 2001', '%W %V %X'), ('Thursdai 12 1998', '%W %u %Y'), -(NULL, get_format(DATE,'USA')), -('Tuesday 52 2001', '%W %V %X'); +('Sunday 01 2001', '%W %v %X'), +('Tuesday 52 2001', '%W %V %x'), +('Tuesday 52 2001', '%W %V %Y'), +('Tuesday 52 2001', '%W %u %x'), +('7 53 1998', '%w %u %Y'), +(NULL, get_format(DATE,'USA')); select date,format,str_to_date(date, format) as str_to_date from t1; select date,format,concat(str_to_date(date, format),'') as con from t1; @@ -196,6 +206,7 @@ drop table t1; select get_format(DATE, 'USA') as a; select get_format(TIME, 'internal') as a; select get_format(DATETIME, 'eur') as a; +select get_format(TIMESTAMP, 'eur') as a; select get_format(DATE, 'TEST') as a; select str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA')); diff --git a/mysql-test/t/endspace.test b/mysql-test/t/endspace.test index a9933ff93b5..9ee5e32967a 100644 --- a/mysql-test/t/endspace.test +++ b/mysql-test/t/endspace.test @@ -31,19 +31,25 @@ explain select * from t1 order by text1; alter table t1 modify text1 char(32) binary not null; check table t1; select * from t1 ignore key (key1) where text1='teststring' or text1 like 'teststring_%'; -select * from t1 where text1='teststring' or text1 like 'teststring_%'; -select * from t1 where text1='teststring' or text1 > 'teststring\t'; +select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%'; +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; select text1, length(text1) from t1 order by text1; select text1, length(text1) from t1 order by binary text1; alter table t1 modify text1 blob not null, drop key key1, add key key1 (text1(20)); insert into t1 values ('teststring '); select concat('|', text1, '|') from t1 order by text1; +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; +select concat('|', text1, '|') from t1 where text1='teststring'; +select concat('|', text1, '|') from t1 where text1='teststring '; alter table t1 modify text1 text not null, pack_keys=1; +select concat('|', text1, '|') from t1 where text1='teststring'; +select concat('|', text1, '|') from t1 where text1='teststring '; +explain select concat('|', text1, '|') from t1 where text1='teststring '; select * from t1 where text1 like 'teststring_%'; select * from t1 where text1='teststring' or text1 like 'teststring_%'; -select * from t1 where text1='teststring' or text1 > 'teststring\t'; +select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; select concat('|', text1, '|') from t1 order by text1; drop table t1; diff --git a/mysql-test/t/exampledb.test b/mysql-test/t/exampledb.test new file mode 100644 index 00000000000..c60a9d7f930 --- /dev/null +++ b/mysql-test/t/exampledb.test @@ -0,0 +1,16 @@ +# +# Simple test for the example storage engine +# Taken fromm the select test +# +-- source include/have_exampledb.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +CREATE TABLE t1 ( + Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, + Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL +) ENGINE=example; + +drop table t1; diff --git a/mysql-test/t/flush_block_commit.test b/mysql-test/t/flush_block_commit.test new file mode 100644 index 00000000000..3d13086f517 --- /dev/null +++ b/mysql-test/t/flush_block_commit.test @@ -0,0 +1,52 @@ +# Let's see if FLUSH TABLES WITH READ LOCK blocks COMMIT of existing +# transactions. +# We verify that we did not introduce a deadlock. + +-- source include/have_innodb.inc + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); +connect (con3,localhost,root,,); +connection con1; + +--disable_warnings +drop table if exists t1; +--enable_warnings +create table t1 (a int) engine=innodb; + +# blocks COMMIT ? + +begin; +insert into t1 values(1); +connection con2; +flush tables with read lock; +select * from t1; +connection con1; +send commit; # blocked by con2 +sleep 1; +connection con2; +select * from t1; # verify con1 was blocked and data did not move +unlock tables; +connection con1; +reap; + +# No deadlock ? + +connection con1; +begin; +select * from t1 for update; +connection con2; +begin; +send select * from t1 for update; # blocked by con1 +sleep 1; +connection con3; +send flush tables with read lock; # blocked by con2 +connection con1; +commit; # should not be blocked by con3 +connection con2; +reap; +connection con3; +reap; +unlock tables; +connection con1; +drop table t1; diff --git a/mysql-test/t/fulltext2.test b/mysql-test/t/fulltext2.test index cab1d096fe7..1d3a5307412 100644 --- a/mysql-test/t/fulltext2.test +++ b/mysql-test/t/fulltext2.test @@ -44,6 +44,9 @@ while ($1) # converting to two-level repair table t1 quick; +check table t1; +optimize table t1; # BUG#5327 - mi_sort_index() of 2-level tree +check table t1; select count(*) from t1 where match a against ('aaaxxx'); select count(*) from t1 where match a against ('aaayyy'); @@ -102,6 +105,11 @@ CREATE TABLE t1 ( FULLTEXT KEY (a) ) ENGINE=MyISAM; +# +# now same as about but w/o repair table +# 2-level tree created by mi_write +# + # two-level entry, second-level tree with depth 2 --disable_query_log let $1=260; diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 62343fa2af8..3f671377c4e 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -169,9 +169,11 @@ create table t2 (a int, c int); insert into t2 values (1, 5), (2, 4), (3, 3), (3,3); select group_concat(c) from t1; select group_concat(c order by (select c from t2 where t2.a=t1.a limit 1)) as grp from t1; - select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a)) as grp from t1; select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a) desc) as grp from t1; +select t1.a, group_concat(c order by (select c from t2 where t2.a=t1.a limit 1)) as grp from t1 group by 1; +select t1.a, group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a)) as grp from t1 group by 1; +select t1.a, group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a) desc) as grp from t1 group by 1; # The following returns random results as we are sorting on blob addresses # select group_concat(c order by (select group_concat(c order by a) from t2 where t2.a=t1.a)) as grp from t1; @@ -201,3 +203,40 @@ SELECT GROUP_CONCAT(a SEPARATOR '||') AS names FROM t1 SELECT GROUP_CONCAT(a SEPARATOR '###') AS names FROM t1 HAVING LEFT(names, 1) ='J'; DROP TABLE t1; + +# +# check blobs +# + +CREATE TABLE t1 ( a int, b TEXT ); +INSERT INTO t1 VALUES (1,'First Row'), (2,'Second Row'); +SELECT GROUP_CONCAT(b ORDER BY b) FROM t1 GROUP BY a; +DROP TABLE t1; + +# +# check null values #1 +# + +--disable_warnings +CREATE TABLE t1 (a_id tinyint(4) NOT NULL default '0', PRIMARY KEY (a_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES (1),(2),(3); +CREATE TABLE t2 (b_id tinyint(4) NOT NULL default '0',b_a tinyint(4) NOT NULL default '0', PRIMARY KEY (b_id), KEY (b_a), + CONSTRAINT fk_b_a FOREIGN KEY (b_a) REFERENCES t1 (a_id) ON DELETE CASCADE ON UPDATE NO ACTION) ENGINE=InnoDB DEFAULT CHARSET=latin1; +--enable_warnings +INSERT INTO t2 VALUES (1,1),(2,1),(3,1),(4,2),(5,2); +SELECT * FROM (SELECT t1.*,GROUP_CONCAT(t2.b_id SEPARATOR ',') as b_list FROM (t1 LEFT JOIN (t2) on t1.a_id = t2.b_a) GROUP BY t1.a_id ) AS xyz; +DROP TABLE t2; +DROP TABLE t1; + +# +# check null values #2 +# + +CREATE TABLE t1 (A_ID INT NOT NULL,A_DESC CHAR(3) NOT NULL,PRIMARY KEY (A_ID)); +INSERT INTO t1 VALUES (1,'ABC'), (2,'EFG'), (3,'HIJ'); +CREATE TABLE t2 (A_ID INT NOT NULL,B_DESC CHAR(3) NOT NULL,PRIMARY KEY (A_ID,B_DESC)); +INSERT INTO t2 VALUES (1,'A'),(1,'B'),(3,'F'); +SELECT t1.A_ID, GROUP_CONCAT(t2.B_DESC) AS B_DESC FROM t1 LEFT JOIN t2 ON t1.A_ID=t2.A_ID GROUP BY t1.A_ID ORDER BY t1.A_DESC; +DROP TABLE t1; +DROP TABLE t2; + diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test index 855a7cbd28f..22079377ad2 100644 --- a/mysql-test/t/func_in.test +++ b/mysql-test/t/func_in.test @@ -75,6 +75,13 @@ select * from t1 where 'a' in (a,b,c collate latin1_bin); explain extended select * from t1 where 'a' in (a,b,c collate latin1_bin); drop table t1; +set names utf8; +create table t1 (a char(10) character set utf8 not null); +insert into t1 values ('bbbb'),(_koi8r''),(_latin1''); +select a from t1 where a in ('bbbb',_koi8r'',_latin1'') order by a; +drop table t1; +set names latin1; + select '1.0' in (1,2); select 1 in ('1.0',2); select 1 in (1,'2.0'); diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test index ad83202afa0..4ca2f28fa6e 100644 --- a/mysql-test/t/func_like.test +++ b/mysql-test/t/func_like.test @@ -90,3 +90,9 @@ select * from t1 where a like '%PES%'; select * from t1 where a like '%PESKA%'; select * from t1 where a like '%ESKA%'; DROP TABLE t1; + +# +# LIKE crashed for binary collations in some cases +# +select _cp866'aaaaaaaaa' like _cp866'%aaaa%' collate cp866_bin; + diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 36ad2dfb0a2..e58c097b5a6 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -26,8 +26,8 @@ explain extended select pow(10,log10(10)),power(2,4); set @@rand_seed1=10000000,@@rand_seed2=1000000; select rand(999999),rand(); explain extended select rand(999999),rand(); -select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1); -explain extended select pi(),sin(pi()/2),cos(pi()/2),abs(tan(pi())),cot(1),asin(1),acos(0),atan(1); +select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6); +explain extended select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6); select degrees(pi()),radians(360); # diff --git a/mysql-test/t/func_set.test b/mysql-test/t/func_set.test index 03843fd3da5..d669739bcb4 100644 --- a/mysql-test/t/func_set.test +++ b/mysql-test/t/func_set.test @@ -31,11 +31,19 @@ drop table if exists t1,t2; --enable_warnings create table t1 (id int(10) not null unique); -create table t2 (id int(10) not null primary key, -val int(10) not null); +create table t2 (id int(10) not null primary key, val int(10) not null); insert into t1 values (1),(2),(4); insert into t2 values (1,1),(2,1),(3,1),(4,2); select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id; select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id; drop table t1,t2; + +# +# Bug4340: find_in_set is case insensitive even on binary operators +# + +select find_in_set(binary 'a',binary 'A,B,C'); +select find_in_set('a',binary 'A,B,C'); +select find_in_set(binary 'a', 'A,B,C'); + diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 61d0326f7dd..e7852df40b3 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -402,3 +402,9 @@ insert into t1 values ('-21474836461','-21474836461'); show warnings; select * from t1; drop table t1; + +# +# Bug #4878: LEFT() in integer/float context +# + +select left(1234, 3) + 0; diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 590007caba1..e35b9996a44 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -172,3 +172,21 @@ insert IGNORE into t1 values ('Garbage'); alter table t1 add spatial index(a); drop table t1; + +# +# Bug #5219: problem with range optimizer +# + +create table t1(a geometry not null, spatial index(a)); +insert into t1 values +(GeomFromText('POINT(1 1)')), (GeomFromText('POINT(3 3)')), +(GeomFromText('POINT(4 4)')), (GeomFromText('POINT(6 6)')); +select AsText(a) from t1 where + MBRContains(GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) + or + MBRContains(GeomFromText('Polygon((2 2, 2 5, 5 5, 5 2, 2 2))'), a); +select AsText(a) from t1 where + MBRContains(GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) + and + MBRContains(GeomFromText('Polygon((0 0, 0 7, 7 7, 7 0, 0 0))'), a); +drop table t1; diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index eb8704ac845..a892b761964 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -175,6 +175,22 @@ DROP DATABASE ; SET NAMES latin1; # +# Bug #4898: User privileges depending on ORDER BY Settings of table db +# +insert into mysql.user (host, user) values ('localhost', 'test11'); +insert into mysql.db (host, db, user, select_priv) values +('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); +alter table mysql.db order by db asc; +flush privileges; +show grants for test11@localhost; +alter table mysql.db order by db desc; +flush privileges; +show grants for test11@localhost; +delete from mysql.user where user='test11'; +delete from mysql.db where user='test11'; + + +# # just SHOW PRIVILEGES test # SHOW PRIVILEGES; diff --git a/mysql-test/t/grant_cache.test b/mysql-test/t/grant_cache.test index fc06e04f014..1ec4a52fdd1 100644 --- a/mysql-test/t/grant_cache.test +++ b/mysql-test/t/grant_cache.test @@ -67,7 +67,8 @@ show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; show status like "Qcache_not_cached"; -connect (unkuser,localhost,,,,$MASTER_MYPORT,$MASTER_MYSOCK); +# Don't use '' as user because it will pick Unix login +connect (unkuser,localhost,unkuser,,,$MASTER_MYPORT,$MASTER_MYSOCK); connection unkuser; show grants for current_user(); diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test index 7e4cbe76cca..12a44fd75dc 100644 --- a/mysql-test/t/having.test +++ b/mysql-test/t/having.test @@ -75,3 +75,50 @@ select id, sum(qty) as sqty from t1 group by id having sqty>2; select sum(qty) as sqty from t1 group by id having count(id) > 0; select sum(qty) as sqty from t1 group by id having count(distinct id) > 0; drop table t1; + +# +# Test case for Bug #4358 Problem with HAVING clause that uses alias from the +# select list and TEXT field +# + +CREATE TABLE t1 ( + `id` bigint(20) NOT NULL default '0', + `description` text +) ENGINE=MyISAM; + +CREATE TABLE t2 ( + `id` bigint(20) NOT NULL default '0', + `description` varchar(20) +) ENGINE=MyISAM; + +INSERT INTO t1 VALUES (1, 'test'); +INSERT INTO t2 VALUES (1, 'test'); + +CREATE TABLE t3 ( + `id` bigint(20) NOT NULL default '0', + `order_id` bigint(20) NOT NULL default '0' +) ENGINE=MyISAM; + +select + a.id, a.description, + count(b.id) as c +from t1 a left join t3 b on a.id=b.order_id +group by a.id, a.description +having (a.description is not null) and (c=0); + +select + a.*, + count(b.id) as c +from t2 a left join t3 b on a.id=b.order_id +group by a.id, a.description +having (a.description is not null) and (c=0); + +INSERT INTO t1 VALUES (2, 'test2'); + +select + a.id, a.description, + count(b.id) as c +from t1 a left join t3 b on a.id=b.order_id +group by a.id, a.description +having (a.description is not null) and (c=0); +drop table t1,t2,t3; diff --git a/mysql-test/t/heap.test b/mysql-test/t/heap.test index d867d5f4323..37fc5a43227 100644 --- a/mysql-test/t/heap.test +++ b/mysql-test/t/heap.test @@ -150,3 +150,17 @@ INSERT into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11); DELETE from t1 where a < 100; SELECT * from t1; DROP TABLE t1; + +# +# Bug#4411 Server hangs when trying to SELECT MAX(id) from an empty HEAP table +# +CREATE TABLE `job_titles` ( + `job_title_id` int(6) unsigned NOT NULL default '0', + `job_title` char(18) NOT NULL default '', + PRIMARY KEY (`job_title_id`), + UNIQUE KEY `job_title_id` (`job_title_id`,`job_title`) +) ENGINE=HEAP; + +SELECT MAX(job_title_id) FROM job_titles; + +DROP TABLE job_titles; diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test index bba5cdeee58..1d18e020543 100644 --- a/mysql-test/t/join.test +++ b/mysql-test/t/join.test @@ -285,6 +285,16 @@ SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1; drop table t1,t2; # +# dummy natural join (no common columns) Bug #4807 +# + +CREATE TABLE t1 (a int); +CREATE TABLE t2 (b int); +CREATE TABLE t3 (c int); +SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3; +DROP TABLE t1, t2, t3; + +# # Test combination of join methods # diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index 4ffe1c075b6..0c4c9614d88 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -451,3 +451,53 @@ select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is explain select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null; drop table t1, t2, t3; + +# Test for BUG#5088 + +create table t1 ( + match_id tinyint(3) unsigned not null auto_increment, + home tinyint(3) unsigned default '0', + unique key match_id (match_id), + key match_id_2 (match_id) +); + +insert into t1 values("1", "2"); + +create table t2 ( + player_id tinyint(3) unsigned default '0', + match_1_h tinyint(3) unsigned default '0', + key player_id (player_id) +); + +insert into t2 values("1", "5"); +insert into t2 values("2", "9"); +insert into t2 values("3", "3"); +insert into t2 values("4", "7"); +insert into t2 values("5", "6"); +insert into t2 values("6", "8"); +insert into t2 values("7", "4"); +insert into t2 values("8", "12"); +insert into t2 values("9", "11"); +insert into t2 values("10", "10"); + +explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from + (t2 s left join t1 m on m.match_id = 1) + order by m.match_id desc; + +explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from + (t2 s left join t1 m on m.match_id = 1) + order by UUX desc; + +select s.*, '*', m.*, (s.match_1_h - m.home) UUX from + (t2 s left join t1 m on m.match_id = 1) + order by UUX desc; + +explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from + t2 s straight_join t1 m where m.match_id = 1 + order by UUX desc; + +select s.*, '*', m.*, (s.match_1_h - m.home) UUX from + t2 s straight_join t1 m where m.match_id = 1 + order by UUX desc; + +drop table t1, t2; diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test index 8d399abfec9..ce10f07cf07 100644 --- a/mysql-test/t/key.test +++ b/mysql-test/t/key.test @@ -97,7 +97,7 @@ CREATE TABLE t1 ( PRIMARY KEY (name,author,category) ); INSERT INTO t1 VALUES -('patnom','patauteur',0,'p.favre@cryo-networks.fr',NULL,NULL,'#p2sndnq6ae5g1u6t','essai\nsalut','scol://195.242.78.119:patauteur.patnom',NULL,NULL,NULL,950036174,-882087474,NULL,3,0,3,'1','Pub/patnom/futur_divers.scs',NULL,'pat','CC1'); +('patnom','patauteur',0,'p.favre@cryo-networks.fr',NULL,NULL,'#p2sndnq6ae5g1u6t','essai salut','scol://195.242.78.119:patauteur.patnom',NULL,NULL,NULL,950036174,-882087474,NULL,3,0,3,'1','Pub/patnom/futur_divers.scs',NULL,'pat','CC1'); INSERT INTO t1 VALUES ('LeNomDeMonSite','Marc',0,'m.barilley@cryo-networks.fr',NULL,NULL,NULL,NULL,'scol://195.242.78.119:Marc.LeNomDeMonSite',NULL,NULL,NULL,950560434,-881563214,NULL,3,0,3,'1','Pub/LeNomDeMonSite/domus_hibere.scs',NULL,'Marq','CC1'); select * from t1 where name='patnom' and author='patauteur' and category=0; @@ -228,3 +228,27 @@ EXPLAIN SELECT numeropost FROM t1 WHERE numreponse='1'; FLUSH TABLES; SELECT numeropost FROM t1 WHERE numreponse='1'; drop table t1; + +# +# UNIQUE prefix keys and multi-byte charsets +# + +create table t1 (c varchar(30) character set utf8, t text character set utf8, unique (c(2)), unique (t(3))) engine=myisam; +show create table t1; +insert t1 values ('cccc', 'tttt'), + (0xD0B1212223D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1212223D0B1D0B1D0B1D0B1), + (0xD0B1222123D0B1D0B1D0B1D0B1D0B1, 0xD0B1D0B1222123D0B1D0B1D0B1D0B1); +--error 1062 +insert t1 (c) values ('cc22'); +--error 1062 +insert t1 (t) values ('ttt22'); +--error 1062 +insert t1 (c) values (0xD0B1212322D0B1D0B1D0B1D0B1D0B1); +--error 1062 +insert t1 (t) values (0xD0B1D0B1212322D0B1D0B1D0B1D0B1); +select c from t1 where c='cccc'; +select t from t1 where t='tttt'; +select c from t1 where c=0xD0B1212223D0B1D0B1D0B1D0B1D0B1; +select t from t1 where t=0xD0B1D0B1212223D0B1D0B1D0B1D0B1; +drop table t1; + diff --git a/mysql-test/t/lowercase_table.test b/mysql-test/t/lowercase_table.test index db46f3d432d..a9c0c976afc 100644 --- a/mysql-test/t/lowercase_table.test +++ b/mysql-test/t/lowercase_table.test @@ -4,6 +4,9 @@ --disable_warnings drop table if exists t1,t2,t3,t4; +# Clear up from other tests (to ensure that SHOW TABLES below is right) +drop table if exists t0,t5,t6,t7,t8,t9; +drop database if exists mysqltest; --enable_warnings create table T1 (id int primary key, Word varchar(40) not null, Index(Word)); @@ -32,6 +35,23 @@ select count(bags.a) from t1 as Bags; drop table t1; # +# Test all caps database name +# +create database mysqltest; +use MYSQLTEST; +create table t1 (a int); +select T1.a from MYSQLTEST.T1; +select t1.a from MYSQLTEST.T1; +select mysqltest.t1.* from MYSQLTEST.t1; +select MYSQLTEST.t1.* from MYSQLTEST.t1; +select MYSQLTEST.T1.* from MYSQLTEST.T1; +select MYSQLTEST.T1.* from T1; +alter table t1 rename to T1; +select MYSQLTEST.t1.* from MYSQLTEST.t1; +drop database mysqltest; +use test; + +# # multiupdate/delete & --lower-case-table-names # create table t1 (a int); diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index cf55c26fb69..9580c1ab44c 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -271,3 +271,17 @@ select * from t3 where x = 1 and y < 5 order by y; # Bug is that followng query returns empty set while it must be same as above select * from t3 where x = 1 and y < 5 order by y desc; drop table t1,t2,t3; + +# +# Bug#5232: CREATE TABLE ... SELECT +# + +create table t1 (a int); +create table t2 (a int); +insert into t1 values (0); +insert into t2 values (1); +--error 1093 +create table t3 engine=merge union=(t1, t2) select * from t1; +--error 1093 +create table t3 engine=merge union=(t1, t2) select * from t2; +drop table t1, t2; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 298a8b1b61b..f9081e8769b 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -423,6 +423,18 @@ select * from t1 where a='807780' and b='477' and c='165'; drop table t1; # +# space-stripping in _mi_prefix_search: BUG#5284 +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a)); +INSERT t1 VALUES ("can \tcan"); +INSERT t1 VALUES ("can can"); +INSERT t1 VALUES ("can"); +SELECT * FROM t1; +CHECK TABLE t1; +DROP TABLE t1; + +# # Verify blob handling # create table t1 (a blob); @@ -502,3 +514,12 @@ alter table t1 disable keys; show keys from t1; drop table t1,t2; +# +# index search for NULL in blob. Bug #4816 +# +create table t1 ( a tinytext, b char(1), index idx (a(1),b) ); +insert into t1 values (null,''), (null,''); +explain select count(*) from t1 where a is null; +select count(*) from t1 where a is null; +drop table t1; + diff --git a/mysql-test/t/mysql_protocols.test b/mysql-test/t/mysql_protocols.test new file mode 100644 index 00000000000..942ba2722d8 --- /dev/null +++ b/mysql-test/t/mysql_protocols.test @@ -0,0 +1,10 @@ + +# test for Bug #4998 "--protocol doesn't reject bad values" + +--exec echo "select ' ok' as '<default>'" | $MYSQL +--exec echo "select ' ok' as 'TCP'" | $MYSQL --protocol=TCP +--exec echo "select ' ok' as 'SOCKET'" | $MYSQL --protocol=SOCKET +--exec echo "select ' ok' as 'PIPE'" | $MYSQL --protocol=PIPE 2>&1 +--exec echo "select ' ok' as 'MEMORY'" | $MYSQL --protocol=MEMORY 2>&1 +--exec echo "select ' ok' as 'NullS'" | $MYSQL --protocol=NullS 2>&1 + diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test new file mode 100644 index 00000000000..c6cff7558d4 --- /dev/null +++ b/mysql-test/t/mysqlbinlog2.test @@ -0,0 +1,156 @@ +# Test for the new options --start-datetime, stop-datetime, +# and a few others. + +--disable_warnings +drop table if exists t1; +--enable_warnings +reset master; + +# We need this for getting fixed timestamps inside of this test. +# I use a date in the future to keep a growing timestamp along the +# binlog (including the Start_log_event). This test will work +# unchanged everywhere, because mysql-test-run has fixed TZ, which it +# exports (so mysqlbinlog has same fixed TZ). +set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22"); +set timestamp=@a; +create table t1 (a int auto_increment not null primary key, b char(3)); +insert into t1 values(null, "a"); +insert into t1 values(null, "b"); +set timestamp=@a+2; +insert into t1 values(null, "c"); +set timestamp=@a+4; +insert into t1 values(null, "d"); +insert into t1 values(null, "e"); + +flush logs; +set timestamp=@a+1; # this could happen on a slave +insert into t1 values(null, "f"); + +# delimiters are for easier debugging in future + +--disable_query_log +select "--- Local --" as ""; +--enable_query_log + +# +# We should use --short-form everywhere because in other case output will +# be time dependent (the Start events). Better than nothing. +# + +--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 + +--disable_query_log +select "--- offset --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --offset=2 $MYSQL_TEST_DIR/var/log/master-bin.000001 +--disable_query_log +select "--- start-position --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --start-position=497 $MYSQL_TEST_DIR/var/log/master-bin.000001 +--disable_query_log +select "--- stop-position --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --stop-position=497 $MYSQL_TEST_DIR/var/log/master-bin.000001 +--disable_query_log +select "--- start-datetime --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001 +--disable_query_log +select "--- stop-datetime --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001 + +--disable_query_log +select "--- Local with 2 binlogs on command line --" as ""; +--enable_query_log + +# This is to verify that some options apply only to first, or last binlog + +--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 + +--disable_query_log +select "--- offset --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --offset=2 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--disable_query_log +select "--- start-position --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --start-position=497 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--disable_query_log +select "--- stop-position --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --stop-position=32 $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--disable_query_log +select "--- start-datetime --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 +--disable_query_log +select "--- stop-datetime --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQL_TEST_DIR/var/log/master-bin.000001 $MYSQL_TEST_DIR/var/log/master-bin.000002 + +--disable_query_log +select "--- Remote --" as ""; +--enable_query_log + +--exec $MYSQL_BINLOG --short-form --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 + +--disable_query_log +select "--- offset --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --offset=2 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--disable_query_log +select "--- start-position --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --start-position=497 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--disable_query_log +select "--- stop-position --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --stop-position=497 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--disable_query_log +select "--- start-datetime --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--disable_query_log +select "--- stop-datetime --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 + +--disable_query_log +select "--- Remote with 2 binlogs on command line --" as ""; +--enable_query_log + +--exec $MYSQL_BINLOG --short-form --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 + +--disable_query_log +select "--- offset --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --offset=2 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 +--disable_query_log +select "--- start-position --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --start-position=497 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 +--disable_query_log +select "--- stop-position --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form --stop-position=32 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 +--disable_query_log +select "--- start-datetime --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form "--start-datetime=20200121153224" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 +--disable_query_log +select "--- stop-datetime --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020/01/21 15@32@24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 + +--disable_query_log +select "--- to-last-log --" as ""; +--enable_query_log + +--exec $MYSQL_BINLOG --short-form --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --to-last-log master-bin.000001 + +# clean up +--disable_query_log +select "--- end of test --" as ""; +--enable_query_log +drop table t1; diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test index f95aa82b7cc..ffcd0b99745 100644 --- a/mysql-test/t/ndb_alter_table.test +++ b/mysql-test/t/ndb_alter_table.test @@ -29,13 +29,23 @@ col2 varchar(30) not null, col3 varchar (20) not null, col4 varchar(4) not null, col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, -col6 int not null, to_be_deleted int); -insert into t1 values (2,4,3,5,"PENDING",1,7); +col6 int not null, to_be_deleted int) ENGINE=ndbcluster; +show table status; +insert into t1 values +(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); +show table status; +select * from t1 order by col1; alter table t1 add column col4_5 varchar(20) not null after col4, add column col7 varchar(30) not null after col5, add column col8 datetime not null, drop column to_be_deleted, change column col2 fourth varchar(30) not null after col3, modify column col6 int not null first; -select * from t1; +show table status; +select * from t1 order by col1; +insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); +show table status; +select * from t1 order by col1; drop table t1; + + diff --git a/mysql-test/t/ndb_autodiscover.test b/mysql-test/t/ndb_autodiscover.test index d04599f223e..371a130291b 100644 --- a/mysql-test/t/ndb_autodiscover.test +++ b/mysql-test/t/ndb_autodiscover.test @@ -50,7 +50,7 @@ flush tables; system rm var/master-data/test/t1.frm ; update t1 set name="Autodiscover" where id = 2; show status like 'handler_discover%'; -select * from t1 order by name; +select * from t1 order by id; show status like 'handler_discover%'; # diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test index 271357ed561..0487e18cdb9 100644 --- a/mysql-test/t/ndb_basic.test +++ b/mysql-test/t/ndb_basic.test @@ -2,6 +2,7 @@ --disable_warnings DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists mysqltest; --enable_warnings # @@ -14,31 +15,34 @@ DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; # CREATE TABLE t1 ( pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL + attr1 INT NOT NULL, + attr2 INT, + attr3 VARCHAR(10) ) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412); +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -SELECT pk1 FROM t1; -SELECT * FROM t1; -SELECT t1.* FROM t1; +SELECT pk1 FROM t1 ORDER BY pk1; +SELECT * FROM t1 ORDER BY pk1; +SELECT t1.* FROM t1 ORDER BY pk1; # Update on record by primary key UPDATE t1 SET attr1=1 WHERE pk1=9410; -SELECT * FROM t1; +SELECT * FROM t1 ORDER BY pk1; -# Can't UPDATE PK! Test that correct error is returned --- error 1112 +# Update primary key UPDATE t1 SET pk1=2 WHERE attr1=1; -SELECT * FROM t1; +SELECT * FROM t1 ORDER BY pk1; +UPDATE t1 SET pk1=pk1 + 1; +SELECT * FROM t1 ORDER BY pk1; # Delete the record DELETE FROM t1; SELECT * FROM t1; # Insert more records and update them all at once -INSERT INTO t1 VALUES (9410,9412), (9411, 9413), (9408, 8765), -(7,8), (8,9), (9,10), (10,11), (11,12), (12,13), (13,14); +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), +(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); UPDATE t1 SET attr1 = 9999; SELECT * FROM t1 ORDER BY pk1; @@ -58,13 +62,13 @@ SELECT * FROM t1; # Insert three records with attr1=4 and two with attr1=5 # Delete all with attr1=4 -INSERT INTO t1 values (1, 4), (2, 4), (3, 5), (4, 4), (5, 5); +INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); DELETE FROM t1 WHERE attr1=4; SELECT * FROM t1 order by pk1; DELETE FROM t1; # Insert two records and delete one -INSERT INTO t1 VALUES (9410,9412), (9411, 9413); +INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); DELETE FROM t1 WHERE pk1 = 9410; SELECT * FROM t1; DROP TABLE t1; @@ -82,9 +86,10 @@ UPDATE t1 SET id=1234 WHERE id2=7890; SELECT * FROM t1; DELETE FROM t1; -INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890); -SELECT * FROM t1; +INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); +SELECT * FROM t1 ORDER BY id; DELETE FROM t1 WHERE id = 3456; +SELECT * FROM t1 ORDER BY id; DROP TABLE t1; @@ -216,6 +221,12 @@ while ($1) } enable_query_log; +delete from t2 where a > 5; +select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; +select a, b FROM t2 outer_table where +a = (select a from t2 where b = outer_table.b ) order by a; + + delete from t2; delete from t3; delete from t4; @@ -315,3 +326,34 @@ delete from t7 where b=23; select * from t7; drop table t7; + +# +# Test multiple databases in one statement +# + +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL, + attr2 INT, + attr3 VARCHAR(10) +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); + +create database mysqltest; +use mysqltest; + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + +insert into t2 select pk1,attr1,attr2 from test.t1; +select * from t2 order by a; +select b from test.t1, t2 where c = test.t1.attr2; +select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; + +drop table test.t1, t2; +drop database mysqltest; + diff --git a/mysql-test/t/ndb_blob.test b/mysql-test/t/ndb_blob.test new file mode 100644 index 00000000000..36c823bda41 --- /dev/null +++ b/mysql-test/t/ndb_blob.test @@ -0,0 +1,275 @@ +--source include/have_ndb.inc + +--disable_warnings +drop table if exists t1; +drop database if exists mysqltest; +--enable_warnings + +# +# Minimal NDB blobs test. +# +# On NDB API level there is an extensive test program "testBlobs". +# A prerequisite for this handler test is that "testBlobs" succeeds. +# + +# make test harder with autocommit off +set autocommit=0; + +create table t1 ( + a int not null primary key, + b text not null, + c int not null, + d longblob, + key (c) +) engine=ndbcluster; + +# -- values -- + +# x0 size 256 (current inline size) +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); + +# b1 length 2000+256 (blob part aligned) +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +# d1 length 3000 +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); + +# b2 length 20000 +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +# d2 length 30000 +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); + +select length(@x0),length(@b1),length(@d1) from dual; +select length(@x0),length(@b2),length(@d2) from dual; + +# -- pk ops -- + +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1 where a = 1; + +# pk read +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=1; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=2; + +# pk update +update t1 set b=@b2,d=@d2 where a=1; +update t1 set b=@b1,d=@d1 where a=2; +commit; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=1; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=2; + +# pk update +update t1 set b=concat(b,b),d=concat(d,d) where a=1; +update t1 set b=concat(b,b),d=concat(d,d) where a=2; +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 where a=1; +select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) +from t1 where a=2; + +# pk update to null +update t1 set d=null where a=1; +commit; +select a from t1 where d is null; + +# pk delete +delete from t1 where a=1; +delete from t1 where a=2; +commit; +select count(*) from t1; + +# -- hash index ops -- + +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1 where c = 111; + +# hash key read +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c=111; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where c=222; + +# hash key update +update t1 set b=@b2,d=@d2 where c=111; +update t1 set b=@b1,d=@d1 where c=222; +commit; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where c=111; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c=222; + +# hash key update to null +update t1 set d=null where c=111; +commit; +select a from t1 where d is null; + +# hash key delete +delete from t1 where c=111; +delete from t1 where c=222; +commit; +select count(*) from t1; + +# -- table scan ops, short values -- + +insert into t1 values(1,'b1',111,'dd1'); +insert into t1 values(2,'b2',222,'dd2'); +insert into t1 values(3,'b3',333,'dd3'); +insert into t1 values(4,'b4',444,'dd4'); +insert into t1 values(5,'b5',555,'dd5'); +insert into t1 values(6,'b6',666,'dd6'); +insert into t1 values(7,'b7',777,'dd7'); +insert into t1 values(8,'b8',888,'dd8'); +insert into t1 values(9,'b9',999,'dd9'); +commit; +explain select * from t1; + +# table scan read +select * from t1 order by a; + +# table scan update +update t1 set b=concat(a,'x',b),d=concat(a,'x',d); +commit; +select * from t1 order by a; + +# table scan delete +delete from t1; +commit; +select count(*) from t1; + +# -- table scan ops, long values -- + +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1; + +# table scan read +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 order by a; + +# table scan update +update t1 set b=concat(b,b),d=concat(d,d); +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 order by a; + +# table scan delete +delete from t1; +commit; +select count(*) from t1; + +# -- range scan ops, short values -- + +insert into t1 values(1,'b1',111,'dd1'); +insert into t1 values(2,'b2',222,'dd2'); +insert into t1 values(3,'b3',333,'dd3'); +insert into t1 values(4,'b4',444,'dd4'); +insert into t1 values(5,'b5',555,'dd5'); +insert into t1 values(6,'b6',666,'dd6'); +insert into t1 values(7,'b7',777,'dd7'); +insert into t1 values(8,'b8',888,'dd8'); +insert into t1 values(9,'b9',999,'dd9'); +commit; +explain select * from t1 where c >= 100 order by a; + +# range scan read +select * from t1 where c >= 100 order by a; + +# range scan update +update t1 set b=concat(a,'x',b),d=concat(a,'x',d) +where c >= 100; +commit; +select * from t1 where c >= 100 order by a; + +# alter table + +select * from t1 order by a; +alter table t1 add x int; +select * from t1 order by a; +alter table t1 drop x; +select * from t1 order by a; + +# multi db + +create database mysqltest; +use mysqltest; + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + +insert into t2 values (1,1,1),(2,2,2); +select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; + +drop table t2; +use test; + +# range scan delete +delete from t1 where c >= 100; +commit; +select count(*) from t1; + +# -- range scan ops, long values -- + +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1 where c >= 100 order by a; + +# range scan read +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c >= 100 order by a; + +# range scan update +update t1 set b=concat(b,b),d=concat(d,d); +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 where c >= 100 order by a; + +# range scan delete +delete from t1 where c >= 100; +commit; +select count(*) from t1; + +# -- rollback -- + +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +# 626 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 0; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 1; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 2; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 order by a; +rollback; +select count(*) from t1; +drop table t1; +drop database mysqltest; diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test index feb4476f5e7..00807bfcb98 100644 --- a/mysql-test/t/ndb_index_ordered.test +++ b/mysql-test/t/ndb_index_ordered.test @@ -42,7 +42,11 @@ update t1 set c = 12 where b > 0; select * from t1 order by a; update t1 set c = 13 where b <= 3; select * from t1 order by a; - +update t1 set b = b + 1 where b > 4 and b < 7; +select * from t1 order by a; +-- Update primary key +update t1 set a = a + 10 where b > 1 and b < 7; +select * from t1 order by a; # # Delete using ordered index scan @@ -109,4 +113,31 @@ select * from t1 where b<=5 and c=0; select * from t1 where b=4 and c<=5 order by a; select * from t1 where b<=4 and c<=5 order by a; select * from t1 where b<=5 and c=0 or b<=5 and c=2; + +select count(*) from t1 where b = 0; +select count(*) from t1 where b = 1; +drop table t1; + +# +# Indexing NULL values +# + +CREATE TABLE t1 ( + a int unsigned NOT NULL PRIMARY KEY, + b int unsigned, + c int unsigned, + KEY bc(b,c) +) engine = ndb; + +insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); +select * from t1 use index (bc) where b IS NULL; + +select * from t1 use index (bc)order by a; +select * from t1 use index (bc) order by a; +select * from t1 use index (PRIMARY) where b IS NULL order by a; +select * from t1 use index (bc) where b IS NULL order by a; +select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; +select * from t1 use index (bc) where b IS NULL and c = 2 order by a; +select * from t1 use index (bc) where b < 4 order by a; +select * from t1 use index (bc) where b IS NOT NULL order by a; drop table t1; diff --git a/mysql-test/t/ndb_index_unique.test b/mysql-test/t/ndb_index_unique.test index 7cfc9a77452..4a0c689bafb 100644 --- a/mysql-test/t/ndb_index_unique.test +++ b/mysql-test/t/ndb_index_unique.test @@ -21,6 +21,13 @@ select * from t1 where b = 4 order by b; insert into t1 values(7,8,3); select * from t1 where b = 4 order by a; +-- error 1169 +insert into t1 values(8, 2, 3); +select * from t1 order by a; +delete from t1 where a = 1; +insert into t1 values(8, 2, 3); +select * from t1 order by a; + drop table t1; @@ -42,6 +49,13 @@ select * from t2 where c = 6; insert into t2 values(7,8,3); select * from t2 where b = 4 order by a; +-- error 1169 +insert into t2 values(8, 2, 3); +select * from t2 order by a; +delete from t2 where a = 1; +insert into t2 values(8, 2, 3); +select * from t2 order by a; + drop table t2; # @@ -65,6 +79,48 @@ select * from t3 where b = 4 order by a; drop table t3; # +# Indexes on NULL-able columns +# + +CREATE TABLE t1 ( + pk int NOT NULL PRIMARY KEY, + a int unsigned, + UNIQUE KEY (a) +) engine=ndbcluster; + +insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); + +select * from t1 order by pk; + +--error 1169 +insert into t1 values (5,0); +select * from t1 order by pk; +delete from t1 where a = 0; +insert into t1 values (5,0); +select * from t1 order by pk; + +CREATE TABLE t2 ( + pk int NOT NULL PRIMARY KEY, + a int unsigned, + b tinyint NOT NULL, + c VARCHAR(10), + UNIQUE KEY si(a, c) +) engine=ndbcluster; + +insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); + +select * from t2 order by pk; + +--error 1169 +insert into t2 values(2,3,19,'abc'); +select * from t2 order by pk; +delete from t2 where c IS NOT NULL; +insert into t2 values(2,3,19,'abc'); +select * from t2 order by pk; + +drop table t1, t2; + +# # More complex tables # @@ -78,8 +134,10 @@ INSERT INTO t1 VALUES (8,'dummy'); CREATE TABLE t2 ( cid bigint(20) unsigned NOT NULL auto_increment, cap varchar(255) NOT NULL default '', - PRIMARY KEY (cid) + PRIMARY KEY (cid), + UNIQUE KEY (cid, cap) ) engine=ndbcluster; +INSERT INTO t2 VALUES (NULL,'another dummy'); CREATE TABLE t3 ( gid bigint(20) unsigned NOT NULL auto_increment, gn varchar(255) NOT NULL default '', @@ -134,6 +192,7 @@ INSERT INTO t7 VALUES(10, 5, 1, 1, 10); select * from t1 where cv = 'dummy'; select * from t1 where cv = 'test'; +select * from t2 where cap = 'another dummy'; select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; select * from t4 where uid = 1 order by cid; diff --git a/mysql-test/t/ndb_limit.test b/mysql-test/t/ndb_limit.test new file mode 100644 index 00000000000..b0b6f3c4f17 --- /dev/null +++ b/mysql-test/t/ndb_limit.test @@ -0,0 +1,44 @@ +-- source include/have_ndb.inc + +--disable_warnings +DROP TABLE IF EXISTS t2; +--enable_warnings + + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + + +# +# insert records into table +# +let $1=1000; +disable_query_log; +while ($1) +{ + eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1); + dec $1; +} +enable_query_log; + +select count(*) from t2; + +delete from t2 limit 1; +select count(*) from t2; + +delete from t2 limit 100; +select count(*) from t2; + +delete from t2 limit 1000; +select count(*) from t2; + +update t2 set c=12345678 limit 100; +select count(*) from t2 where c=12345678; +select count(*) from t2 where c=12345678 limit 1000; + +select * from t2 limit 0; + +drop table t2; diff --git a/mysql-test/t/ndb_lock.test b/mysql-test/t/ndb_lock.test new file mode 100644 index 00000000000..c0389dced44 --- /dev/null +++ b/mysql-test/t/ndb_lock.test @@ -0,0 +1,41 @@ +-- source include/have_ndb.inc + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +--enable_warnings + +# +# Transaction lock test to show that the NDB +# table handler is working properly with +# transaction locks +# + +# +# Testing of scan isolation +# +connection con1; +create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; +insert into t1 values (1,'one'), (2,'two'); +select * from t1 order by x; + +connection con2; +select * from t1 order by x; + +connection con1; +start transaction; +insert into t1 values (3,'three'); +select * from t1 order by x; + +connection con2; +start transaction; +select * from t1 order by x; + +connection con1; +commit; + +connection con2; +select * from t1 order by x; +commit; diff --git a/mysql-test/t/ndb_replace.test b/mysql-test/t/ndb_replace.test index 8ba332fc7af..59454b5a9fa 100644 --- a/mysql-test/t/ndb_replace.test +++ b/mysql-test/t/ndb_replace.test @@ -20,7 +20,7 @@ replace into t1 (gesuchnr,benutzer_id) values (1,1); insert into t1 (gesuchnr, benutzer_id) value (3,2); replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1); ---error 1022 +--error 1062 insert into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1); select * from t1 order by gesuchnr; diff --git a/mysql-test/t/ndb_transaction.test b/mysql-test/t/ndb_transaction.test new file mode 100644 index 00000000000..f8ed22207ea --- /dev/null +++ b/mysql-test/t/ndb_transaction.test @@ -0,0 +1,297 @@ +-- source include/have_ndb.inc + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists mysqltest; +--enable_warnings + +# +# Transactionc test to show that the NDB +# table handler is working properly with +# transactions +# + +# +# Create a normal table with primary key +# +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL +) ENGINE=ndbcluster; + +# insert +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +select count(*) from t1; +select * from t1 where pk1 = 1; +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; +rollback; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; + +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +commit; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; + +# update +begin; +update t1 set attr1 = attr1 * 2; +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +rollback; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; + +begin; +update t1 set attr1 = attr1 * 2; +commit; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; + +# delete +begin; +delete from t1 where attr1 = 2; +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +rollback; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; + +begin; +delete from t1 where attr1 = 2; +commit; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; + +DROP TABLE t1; + +# +# Create table without primary key +# a hidden primary key column is created by handler +# +CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; + +# insert +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +select sum(id) from t1; +select * from t1 where id = 1; +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; +rollback; + +select sum(id) from t1; +select * from t1 where id = 1; +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; + +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +commit; + +select sum(id) from t1; +select * from t1 where id = 1; +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; + +# update +begin; +update t1 set id = id * 2; +select sum(id) from t1; +select * from t1 where id = 2; +select * from t1, t1 as t1x where t1x.id = t1.id - 2; +rollback; + +select sum(id) from t1; +select * from t1 where id = 2; +select * from t1, t1 as t1x where t1x.id = t1.id - 2; + +begin; +update t1 set id = id * 2; +commit; + +select sum(id) from t1; +select * from t1 where id = 2; +select * from t1, t1 as t1x where t1x.id = t1.id - 2; + +# delete + +DROP TABLE t1; + +# +# A more extensive test with a lot more records +# + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + +CREATE TABLE t3 ( + a bigint unsigned NOT NULL, + b bigint unsigned not null, + c bigint unsigned, + PRIMARY KEY(a) +) engine=ndbcluster; + +CREATE TABLE t4 ( + a bigint unsigned NOT NULL, + b bigint unsigned not null, + c bigint unsigned NOT NULL, + d int unsigned, + PRIMARY KEY(a, b, c) +) engine=ndbcluster; + + +# +# insert records into tables and rollback +# +let $1=100; +disable_query_log; +begin; +while ($1) +{ + eval insert into t2 values($1, $1+9, 5); + eval insert into t3 values($1, $1+9, 5); + eval insert into t4 values($1, $1+9, 5, $1+26000); + dec $1; +} +rollback; +enable_query_log; + +select count(*) from t2; +select count(*) from t3; +select count(*) from t4; + +# +# insert records into tables and commit; +# +let $1=100; +disable_query_log; +begin; +while ($1) +{ + eval insert into t2 values($1, $1+9, 5); + eval insert into t3 values($1, $1+9, 5); + eval insert into t4 values($1, $1+9, 5, $1+26000); + dec $1; +} +commit; +enable_query_log; + +select count(*) from t2; +select count(*) from t3; +select count(*) from t4; + +# +# delete every other record in the tables +# +let $1=100; +disable_query_log; +while ($1) +{ + eval delete from t2 where a=$1; + eval delete from t3 where a=$1; + eval delete from t4 where a=$1 and b=$1+9 and c=5; + dec $1; + dec $1; +} +enable_query_log; + +# +# update records and rollback +# +begin; +let $1=100; +disable_query_log; +while ($1) +{ + eval update t2 set c=$1 where a=$1; + eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; + eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; + dec $1; + dec $1; +} +rollback; +enable_query_log; + +# +# update records and commit +# +begin; +let $1=100; +disable_query_log; +while ($1) +{ + eval update t2 set c=$1 where a=$1; + eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; + eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; + dec $1; + dec $1; +} +rollback; +enable_query_log; + +drop table t2; +drop table t3; +drop table t4; + +# +# Test multiple databases in one transaction +# + +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL +) ENGINE=ndbcluster; + +create database mysqltest; +use mysqltest; + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + +begin; +insert into test.t1 values(1,1); +insert into t2 values(1,1,1); +insert into test.t1 values(2,2); +insert into t2 values(2,2,2); +select count(*) from test.t1; +select count(*) from t2; +select * from test.t1 where pk1 = 1; +select * from t2 where a = 1; +select test.t1.attr1 +from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; +select t2.a +from t2, t2 as t2x where t2.a = t2x.a + 1; +select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; +rollback; + +select count(*) from test.t1; +select count(*) from t2; + +drop table test.t1, t2; +drop database mysqltest; + + diff --git a/mysql-test/t/ndb_truncate.test b/mysql-test/t/ndb_truncate.test new file mode 100644 index 00000000000..63bb8cbefb6 --- /dev/null +++ b/mysql-test/t/ndb_truncate.test @@ -0,0 +1,33 @@ +-- source include/have_ndb.inc + +--disable_warnings +DROP TABLE IF EXISTS t2; +--enable_warnings + + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + + +# +# insert records into table +# +let $1=500; +disable_query_log; +while ($1) +{ + eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1); + dec $1; +} +enable_query_log; + +select count(*) from t2; + +truncate table t2; + +select count(*) from t2; + +drop table t2; diff --git a/mysql-test/t/ndb_types.test b/mysql-test/t/ndb_types.test new file mode 100644 index 00000000000..d9f50c8b3fc --- /dev/null +++ b/mysql-test/t/ndb_types.test @@ -0,0 +1,47 @@ +-- source include/have_ndb.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# +# Test creation of different column types in NDB +# + +CREATE TABLE t1 ( + auto int(5) unsigned NOT NULL auto_increment, + string char(10) default "hello", + tiny tinyint(4) DEFAULT '0' NOT NULL , + short smallint(6) DEFAULT '1' NOT NULL , + medium mediumint(8) DEFAULT '0' NOT NULL, + long_int int(11) DEFAULT '0' NOT NULL, + longlong bigint(13) DEFAULT '0' NOT NULL, + real_float float(13,1) DEFAULT 0.0 NOT NULL, + real_double double(16,4), + utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, + ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, + umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, + ulong int(11) unsigned DEFAULT '0' NOT NULL, + ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, + time_stamp timestamp, + date_field date, + time_field time, + date_time datetime, + options enum('one','two','tree') not null, + flags set('one','two','tree') not null, + PRIMARY KEY (auto), + KEY (utiny), + KEY (tiny), + KEY (short), + KEY any_name (medium), + KEY (longlong), + KEY (real_float), + KEY (ushort), + KEY (umedium), + KEY (ulong), + KEY (ulonglong,ulong), + KEY (options,flags) +); + + +drop table t1; diff --git a/mysql-test/t/negation_elimination.test b/mysql-test/t/negation_elimination.test index 49428cc238b..c50a9678edb 100644 --- a/mysql-test/t/negation_elimination.test +++ b/mysql-test/t/negation_elimination.test @@ -65,4 +65,8 @@ select * from t1 where not((a < 5 and a < 10) and (not(a > 16) or a > 17)); explain select * from t1 where ((a between 5 and 15) and (not(a like 10))); select * from t1 where ((a between 5 and 15) and (not(a like 10))); +delete from t1 where a > 3; +select a, not(not(a)) from t1; +explain extended select a, not(not(a)), not(a <= 2 and not(a)), not(a not like "1"), not (a not in (1,2)), not(a != 2) from t1 where not(not(a)) having not(not(a)); + drop table t1; diff --git a/mysql-test/t/null.test b/mysql-test/t/null.test index 9f3b6646e7f..7d30fd06ba7 100644 --- a/mysql-test/t/null.test +++ b/mysql-test/t/null.test @@ -98,3 +98,24 @@ explain select * from t1 where a between 2 and 3; explain select * from t1 where a between 2 and 3 or b is null; drop table t1; select cast(NULL as signed); + +# +# Test case for bug #4256 +# + +create table t1(i int, key(i)); +insert into t1 values(1); +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +insert into t1 select i*2 from t1; +explain select * from t1 where i=2 or i is null; +alter table t1 change i i int not null; +explain select * from t1 where i=2 or i is null; +drop table t1; + diff --git a/mysql-test/t/olap.test b/mysql-test/t/olap.test index 7443aeee6f4..674b4ade097 100644 --- a/mysql-test/t/olap.test +++ b/mysql-test/t/olap.test @@ -88,3 +88,40 @@ INSERT INTO t2 VALUES (100),(200); SELECT i, COUNT(*) FROM t1 GROUP BY i WITH ROLLUP; SELECT t1.i, t2.i, COUNT(*) FROM t1,t2 GROUP BY t1.i,t2.i WITH ROLLUP; drop table t1,t2; + +#bug #4767: ROLLUP with LEFT JOIN + +CREATE TABLE user_day( + user_id INT NOT NULL, + date DATE NOT NULL, + UNIQUE INDEX user_date (user_id, date) +); + +INSERT INTO user_day VALUES + (1, '2004-06-06' ), + (1, '2004-06-07' ), + (2, '2004-06-06' ); + +SELECT + d.date AS day, + COUNT(d.user_id) as sample, + COUNT(next_day.user_id) AS not_cancelled + FROM user_day d + LEFT JOIN user_day next_day + ON next_day.user_id=d.user_id AND + next_day.date= DATE_ADD( d.date, interval 1 day ) + GROUP BY day; + +SELECT + d.date AS day, + COUNT(d.user_id) as sample, + COUNT(next_day.user_id) AS not_cancelled + FROM user_day d + LEFT JOIN user_day next_day + ON next_day.user_id=d.user_id AND + next_day.date= DATE_ADD( d.date, interval 1 day ) + GROUP BY day + WITH ROLLUP; + +DROP TABLE user_day; + diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 465920deaed..5131bb8c8b8 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -97,8 +97,8 @@ create table t1 (id int not null,col1 int not null,col2 int not null,index(col1) insert into t1 values(1,2,2),(2,2,1),(3,1,2),(4,1,1),(5,1,4),(6,2,3),(7,3,1),(8,2,4); select * from t1 order by col1,col2; select col1 from t1 order by id; -select col1 as id from t1 order by t1.id; -select concat(col1) as id from t1 order by t1.id; +select col1 as id from t1 order by id; +select concat(col1) as id from t1 order by id; drop table t1; # @@ -445,3 +445,44 @@ insert into t1 select 1, b, c + (@row:=@row - 1) * 10, d - @row from t2 limit 10 select * from t1 where a=1 and b in (1) order by c, b, a; select * from t1 where a=1 and b in (1); drop table t1, t2; + +# +# Bug #4302 +# Ambiguos order by when renamed column is identical to another in result. +# Should not fail and prefer column from t1 for sorting. +# +create table t1 (col1 int, col int); +create table t2 (col2 int, col int); +insert into t1 values (1,1),(2,2),(3,3); +insert into t2 values (1,3),(2,2),(3,1); +select t1.* , t2.col as t2_col from t1 left join t2 on (t1.col1=t2.col2) + order by col; + +# +# Let us also test various ambiguos and potentially ambiguos cases +# related to aliases +# +--error 1052 +select col1 as col, col from t1 order by col; +--error 1052 +select t1.col as c1, t2.col as c2 from t1, t2 where t1.col1=t2.col2 + order by col; +--error 1052 +select t1.col as c1, t2.col as c2 from t1, t2 where t1.col1=t2.col2 + order by col; +--error 1052 +select col1 from t1, t2 where t1.col1=t2.col2 order by col; + +select t1.col as t1_col, t2.col from t1, t2 where t1.col1=t2.col2 + order by col; +select col2 as c, col as c from t2 order by col; +select col2 as col, col as col2 from t2 order by col; +select t1.col as t1_col, t2.col2 from t1, t2 where t1.col1=t2.col2 + order by col; +select t2.col2, t2.col, t2.col from t2 order by col; + +select t2.col2 as col from t2 order by t2.col; +select t2.col2 as col, t2.col from t2 order by t2.col; +select t2.col2, t2.col, t2.col from t2 order by t2.col; + +drop table t1, t2; diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 35f9b193fe4..cbc76e02b42 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -206,3 +206,75 @@ execute stmt1; show table status from test like 't1%' ; deallocate prepare stmt1 ; drop table t1; + +# +# Bug#4912 "mysqld crashs in case a statement is executed a second time": +# negation elimination should work once and not break prepared statements +# + +create table t1(a varchar(2), b varchar(3)); +prepare stmt1 from "select a, b from t1 where (not (a='aa' and b < 'zzz'))"; +execute stmt1; +execute stmt1; +deallocate prepare stmt1; +drop table t1; + +# +# Bug#5034 "prepared "select 1 into @arg15", second execute crashes +# server". +# Check that descendands of select_result can be reused in prepared +# statements or are correctly created and deleted on each execute +# + +prepare stmt1 from "select 1 into @var"; +execute stmt1; +execute stmt1; +prepare stmt1 from "create table t1 select 1 as i"; +execute stmt1; +drop table t1; +execute stmt1; +prepare stmt1 from "insert into t1 select i from t1"; +execute stmt1; +execute stmt1; +prepare stmt1 from "select * from t1 into outfile 'f1.txt'"; +execute stmt1; +deallocate prepare stmt1; +drop table t1; + +# +# BUG#5242 "Prepared statement names are case sensitive" +# +prepare stmt1 from 'select 1'; +prepare STMT1 from 'select 2'; +execute sTmT1; +deallocate prepare StMt1; + +--error 1243 +deallocate prepare Stmt1; + +# also check that statement names are in right charset. +set names utf8; +prepare `ü` from 'select 1234'; +execute `ü` ; +set names latin1; +execute ``; +set names default; + + +# +# BUG#4368 "select * from t1 where a like ?" crashes server if a is in utf8 +# and ? is in latin1 +# Check that Item converting latin1 to utf8 (for LIKE function) is created +# in memory of prepared statement. +# + +create table t1 (a varchar(10)) charset=utf8; +insert into t1 (a) values ('yahoo'); +set character_set_connection=latin1; +prepare stmt from 'select a from t1 where a like ?'; +set @var='google'; +execute stmt using @var; +execute stmt using @var; +deallocate prepare stmt; +drop table t1; + diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test index 5483a70f219..cc8cb4c4ba0 100644 --- a/mysql-test/t/ps_1general.test +++ b/mysql-test/t/ps_1general.test @@ -350,11 +350,11 @@ prepare stmt4 from ' use test ' ; ## create/drop database --error 1295 -prepare stmt3 from ' create database drop_me '; -create database drop_me ; +prepare stmt3 from ' create database mysqltest '; +create database mysqltest ; --error 1295 -prepare stmt3 from ' drop database drop_me '; -drop database drop_me ; +prepare stmt3 from ' drop database mysqltest '; +drop database mysqltest ; ## grant/revoke + drop user --error 1295 diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 471af8e4a5b..61886221fcf 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -383,3 +383,48 @@ select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0; select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0; drop table t1,t2; + +# Fix for bug#4488 +# +create table t1 (x bigint unsigned not null); +insert into t1(x) values (0xfffffffffffffff0); +insert into t1(x) values (0xfffffffffffffff1); +select * from t1; +select count(*) from t1 where x>0; +select count(*) from t1 where x=0; +select count(*) from t1 where x<0; +select count(*) from t1 where x < -16; +select count(*) from t1 where x = -16; +select count(*) from t1 where x > -16; +select count(*) from t1 where x = 18446744073709551601; + + +create table t2 (x bigint not null); +insert into t2(x) values (0xfffffffffffffff0); +insert into t2(x) values (0xfffffffffffffff1); +select * from t2; +select count(*) from t2 where x>0; +select count(*) from t2 where x=0; +select count(*) from t2 where x<0; +select count(*) from t2 where x < -16; +select count(*) from t2 where x = -16; +select count(*) from t2 where x > -16; +select count(*) from t2 where x = 18446744073709551601; + +drop table t1; +--disable_warnings +create table t1 (x bigint unsigned not null primary key) engine=innodb; +--enable_warnings +insert into t1(x) values (0xfffffffffffffff0); +insert into t1(x) values (0xfffffffffffffff1); +select * from t1; +select count(*) from t1 where x>0; +select count(*) from t1 where x=0; +select count(*) from t1 where x<0; +select count(*) from t1 where x < -16; +select count(*) from t1 where x = -16; +select count(*) from t1 where x > -16; +select count(*) from t1 where x = 18446744073709551601; + +drop table t1; + diff --git a/mysql-test/t/rename.test b/mysql-test/t/rename.test index bea0641ad23..e6dc6ce9456 100644 --- a/mysql-test/t/rename.test +++ b/mysql-test/t/rename.test @@ -4,6 +4,8 @@ --disable_warnings drop table if exists t0,t1,t2,t3,t4; +# Clear up from other tests (to ensure that SHOW TABLES below is right) +drop table if exists t0,t5,t6,t7,t8,t9; --enable_warnings create table t0 SELECT 1,"table 1"; diff --git a/mysql-test/t/rpl_charset.test b/mysql-test/t/rpl_charset.test index 3dc219fef86..ba2ebe03a12 100644 --- a/mysql-test/t/rpl_charset.test +++ b/mysql-test/t/rpl_charset.test @@ -6,41 +6,41 @@ source include/master-slave.inc; --disable_warnings -drop database if exists test2; -drop database if exists test3; +drop database if exists mysqltest2; +drop database if exists mysqltest3; --enable_warnings -create database test2 character set latin2; +create database mysqltest2 character set latin2; set @@character_set_server=latin5; -create database test3; +create database mysqltest3; --disable_query_log select "--- --master--" as ""; --enable_query_log -show create database test2; -show create database test3; +show create database mysqltest2; +show create database mysqltest3; sync_slave_with_master; --disable_query_log select "--- --slave--" as ""; --enable_query_log -show create database test2; -show create database test3; +show create database mysqltest2; +show create database mysqltest3; connection master; set @@collation_server=armscii8_bin; -drop database test3; -create database test3; +drop database mysqltest3; +create database mysqltest3; --disable_query_log select "--- --master--" as ""; --enable_query_log -show create database test3; +show create database mysqltest3; sync_slave_with_master; --disable_query_log select "--- --slave--" as ""; --enable_query_log -show create database test3; +show create database mysqltest3; connection master; -use test2; +use mysqltest2; create table t1 (a int auto_increment primary key, b varchar(100)); set character_set_client=cp850, collation_connection=latin2_croatian_ci; insert into t1 (b) values(@@character_set_server); @@ -59,7 +59,7 @@ sync_slave_with_master; --disable_query_log select "--- --slave--" as ""; --enable_query_log -select * from test2.t1 order by a; +select * from mysqltest2.t1 order by a; connection master; set character_set_client=latin1, collation_connection=latin1_german1_ci; @@ -77,7 +77,7 @@ sync_slave_with_master; --disable_query_log select "--- --slave--" as ""; --enable_query_log -select * from test2.t1 order by a; +select * from mysqltest2.t1 order by a; # See if SET ONE_SHOT gets into binlog when LOAD DATA connection master; @@ -101,11 +101,11 @@ sync_slave_with_master; --disable_query_log select "--- --slave--" as ""; --enable_query_log -select * from test2.t1 order by a; +select * from mysqltest2.t1 order by a; connection master; -drop database test2; -drop database test3; +drop database mysqltest2; +drop database mysqltest3; show binlog events from 95; sync_slave_with_master; diff --git a/mysql-test/t/rpl_delete_all.test b/mysql-test/t/rpl_delete_all.test index 6ca98b34caf..23848720107 100644 --- a/mysql-test/t/rpl_delete_all.test +++ b/mysql-test/t/rpl_delete_all.test @@ -1,14 +1,14 @@ source include/master-slave.inc; connection slave; -create database test1; +create database mysqltest; connection master; -drop database if exists test1; +drop database if exists mysqltest; sync_slave_with_master; # can't read dir --replace_result "Errcode: 1" "Errcode: X" "Errcode: 2" "Errcode: X" --error 12 -show tables from test1; +show tables from mysqltest; connection slave; create table t1 (a int); diff --git a/mysql-test/t/rpl_heap.test b/mysql-test/t/rpl_heap.test index f122b5ab2a1..3452f3990bf 100644 --- a/mysql-test/t/rpl_heap.test +++ b/mysql-test/t/rpl_heap.test @@ -13,8 +13,10 @@ connect (slave,localhost,root,,test,0,slave.sock); connection master; reset master; drop table if exists t1; -create table t1 (a int) type=HEAP; -insert into t1 values(10); +# we use CREATE SELECT to verify that DELETE does not get into binlog +# before CREATE SELECT +create table t1 type=HEAP select 10 as a; +insert into t1 values(11); save_master_pos; show binlog events from 79; connection slave; diff --git a/mysql-test/t/rpl_relayrotate.test b/mysql-test/t/rpl_relayrotate.test index 63986b38456..2fde590356a 100644 --- a/mysql-test/t/rpl_relayrotate.test +++ b/mysql-test/t/rpl_relayrotate.test @@ -8,8 +8,7 @@ # The slave is started with max_binlog_size=16384 bytes, # to force many rotations (approximately 30 rotations) -# If the master or slave does not support InnoDB, this test will pass - +source include/have_innodb.inc; source include/master-slave.inc; connection slave; stop slave; diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index c20b6e9ab6c..943174462e3 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -54,8 +54,18 @@ CREATE TABLE t2 ( UNIQUE KEY e_n (email,name) ); -INSERT INTO t2 VALUES (1,'name1','email1'),(2,'name2','email2'),(3,'name3','email3'),(4,'name4','email4'),(5,'name5','email5'),(6,'name6','email6'),(7,'name7','email7'),(8,'name8','email8'),(9,'name9','email9'),(10,'name10','email10'),(11,'name11','email11'),(12,'name12','email12'),(13,'name13','email13'),(14,'name14','email14'),(15,'name15','email15'),(16,'name16','email16'),(17,'name17','email17'),(18,'name18','email18'),(19,'name19','email19'),(20,'name20','email20'),(21,'name21','email21'),(22,'name22','email22'),(23,'name23','email23'),(24,'name24','email24'),(25,'name25','email25'),(26,'name26','email26'),(27,'name27','email27'),(28,'name28','email28'),(29,'name29','email29'),(30,'name30','email30'),(31,'name31','email31'),(32,'name32','email32'),(33,'name33','email33'),(34,'name34','email34'),(35,'name35','email35'),(36,'name36','email36'),(37,'name37','email37'),(38,'name38','email38'),(39,'name39','email39'),(40,'name40','email40'),(41,'name41','email41'),(42,'name42','email42'),(43,'name43','email43'),(44,'name44','email44'),(45,'name45','email45'),(46,'name46','email46'),(47,'name47','email47'),(48,'name48','email48'),(49,'name49','email49'),(50,'name50','email50'),(51,'name51','email51'),(52,'name52','email52'),(53,'name53','email53'),(54,'name54','email54'),(55,'name55','email55'),(56,'name56','email56'),(57,'name57','email57'),(58,'name58','email58'),(59,'name59','email59'),(60,'name60','email60'),(61,'name61','email61'),(62,'name62','email62'),(63,'name63','email63'),(64,'name64','email64'),(65,'name65','email65'),(66,'name66','email66'),(67,'name67','email67'),(68,'name68','email68'),(69,'name69','email69'),(70,'name70','email70'),(71,'name71','email71'),(72,'name72','email72'),(73,'name73','email73'),(74,'name74','email74'),(75,'name75','email75'),(76,'name76','email76'),(77,'name77','email77'),(78,'name78','email78'),(79,'name79','email79'),(80,'name80','email80'),(81,'name81','email81'),(82,'name82','email82'),(83,'name83','email83'),(84,'name84','email84'),(85,'name85','email85'),(86,'name86','email86'),(87,'name87','email87'),(88,'name88','email88'),(89,'name89','email89'),(90,'name90','email90'),(91,'name91','email91'),(92,'name92','email92'),(93,'name93','email93'),(94,'name94','email94'),(95,'name95','email95'),(96,'name96','email96'),(97,'name97','email97'),(98,'name98','email98'),(99,'name99','email99'),(100,'name100','email100'),(101,'name101','email101'),(102,'name102','email102'),(103,'name103','email103'),(104,'name104','email104'),(105,'name105','email105'),(106,'name106','email106'),(107,'name107','email107'),(108,'name108','email108'),(109,'name109','email109'),(110,'name110','email110'),(111,'name111','email111'),(112,'name112','email112'),(113,'name113','email113'),(114,'name114','email114'),(115,'name115','email115'),(116,'name116','email116'),(117,'name117','email117'),(118,'name118','email118'),(119,'name119','email119'),(120,'name120','email120'),(121,'name121','email121'),(122,'name122','email122'),(123,'name123','email123'),(124,'name124','email124'),(125,'name125','email125'),(126,'name126','email126'),(127,'name127','email127'),(128,'name128','email128'),(129,'name129','email129'),(130,'name130','email130'),(131,'name131','email131'),(132,'name132','email132'),(133,'name133','email133'),(134,'name134','email134'),(135,'name135','email135'),(136,'name136','email136'),(137,'name137','email137'),(138,'name138','email138'),(139,'name139','email139'),(140,'name140','email140'),(141,'name141','email141'),(142,'name142','email142'),(143,'name143','email143'),(144,'name144','email144'),(145,'name145','email145'),(146,'name146','email146'),(147,'name147','email147'),(148,'name148','email148'),(149,'name149','email149'),(150,'name150','email150'),(151,'name151','email151'),(152,'name152','email152'),(153,'name153','email153'),(154,'name154','email154'),(155,'name155','email155'),(156,'name156','email156'),(157,'name157','email157'),(158,'name158','email158'),(159,'name159','email159'),(160,'name160','email160'),(161,'name161','email161'),(162,'name162','email162'),(163,'name163','email163'),(164,'name164','email164'),(165,'name165','email165'),(166,'name166','email166'),(167,'name167','email167'),(168,'name168','email168'),(169,'name169','email169'),(170,'name170','email170'),(171,'name171','email171'),(172,'name172','email172'),(173,'name173','email173'),(174,'name174','email174'),(175,'name175','email175'),(176,'name176','email176'),(177,'name177','email177'),(178,'name178','email178'),(179,'name179','email179'),(180,'name180','email180'),(181,'name181','email181'),(182,'name182','email182'),(183,'name183','email183'),(184,'name184','email184'),(185,'name185','email185'),(186,'name186','email186'),(187,'name187','email187'),(188,'name188','email188'),(189,'name189','email189'),(190,'name190','email190'),(191,'name191','email191'),(192,'name192','email192'),(193,'name193','email193'),(194,'name194','email194'),(195,'name195','email195'),(196,'name196','email196'),(197,'name197','email197'),(198,'name198','email198'),(199,'name199','email199'),(200,'name200','email200'); - +disable_query_log; +let $1=200; +let $2=0; +while ($1) +{ + inc $2; + eval INSERT INTO t2 VALUES ($2,'name$2','email$2'); + dec $1; +} +enable_query_log; + +EXPLAIN SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; SELECT FOUND_ROWS(); diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index d69ce8ac75a..9ed1ac2d63e 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -4,6 +4,7 @@ --disable_warnings drop table if exists t1,t2; +drop database if exists mysqltest; --enable_warnings create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); @@ -269,42 +270,42 @@ drop table t1, t2, t3; # Test for bug #3342 SHOW CREATE DATABASE seems to require DROP privilege # -create database test_$1; -show create database test_$1; -create table test_$1.t1(a int); -insert into test_$1.t1 values(1); -grant select on `test_$1`.* to mysqltest_1@localhost; -grant usage on `test_$1`.* to mysqltest_2@localhost; -grant drop on `test_$1`.* to mysqltest_3@localhost; +create database mysqltest; +show create database mysqltest; +create table mysqltest.t1(a int); +insert into mysqltest.t1 values(1); +grant select on `mysqltest`.* to mysqltest_1@localhost; +grant usage on `mysqltest`.* to mysqltest_2@localhost; +grant drop on `mysqltest`.* to mysqltest_3@localhost; -connect (con1,localhost,mysqltest_1,,test_$1); +connect (con1,localhost,mysqltest_1,,mysqltest); connection con1; select * from t1; -show create database test_$1; +show create database mysqltest; --error 1044 drop table t1; --error 1044 -drop database test_$1; +drop database mysqltest; connect (con2,localhost,mysqltest_2,,test); connection con2; --error 1044 -select * from test_$1.t1; +select * from mysqltest.t1; --error 1044 -show create database test_$1; +show create database mysqltest; --error 1044 -drop table test_$1.t1; +drop table mysqltest.t1; --error 1044 -drop database test_$1; +drop database mysqltest; connect (con3,localhost,mysqltest_3,,test); connection con3; --error 1044 -select * from test_$1.t1; +select * from mysqltest.t1; --error 1044 -show create database test_$1; -drop table test_$1.t1; -drop database test_$1; +show create database mysqltest; +drop table mysqltest.t1; +drop database mysqltest; connection default; set names binary; @@ -314,3 +315,11 @@ delete from mysql.db where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; flush privileges; +# This test fails on MAC OSX, so it is temporary disabled. +# This needs WL#1324 to be done. +#set names latin1; +#create database ``; +#create table ``.`` (a int) engine=heap; +#--replace_column 7 # 8 # 9 # +#show table status from `` LIKE ''; +#drop database ``; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 5211704f809..3d10b88da5c 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -764,14 +764,6 @@ select * from t1; drop table t1, t2; # -# correct behavoiur for function from reduced subselect -# -create table t1(City VARCHAR(30),Location geometry); -insert into t1 values("Paris",GeomFromText('POINT(2.33 48.87)')); -select City from t1 where (select intersects(GeomFromText(AsText(Location)),GeomFromText('Polygon((2 50, 2.5 50, 2.5 47, 2 47, 2 50))'))=0); -drop table t1; - -# # reduced subselect in ORDER BY & GROUP BY clauses # @@ -1227,3 +1219,56 @@ CREATE TABLE `t2` ( `b` int(11) default NULL, `a` int(11) default NULL) ENGINE=M insert into t2 values (1,2); select t000.a, count(*) `C` FROM t1 t000 GROUP BY t000.a HAVING count(*) > ALL (SELECT count(*) FROM t2 t001 WHERE t001.a=1); drop table t1,t2; + +# +# BUG#4769 - fulltext in subselect +# +create table t1 (a int not null auto_increment primary key, b varchar(40), fulltext(b)); +insert into t1 (b) values ('ball'),('ball games'), ('games'), ('foo'), ('foobar'), ('Serg'), ('Sergei'),('Georg'), ('Patrik'),('Hakan'); +create table t2 (a int); +insert into t2 values (1),(3),(2),(7); +select a,b from t1 where match(b) against ('Ball') > 0; +select a from t2 where a in (select a from t1 where match(b) against ('Ball') > 0); +drop table t1,t2; + +# +# BUG#5003 - like in subselect +# +CREATE TABLE t1(`IZAVORGANG_ID` VARCHAR(11) CHARACTER SET latin1 COLLATE latin1_bin,`KUERZEL` VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_bin,`IZAANALYSEART_ID` VARCHAR(11) CHARACTER SET latin1 COLLATE latin1_bin,`IZAPMKZ_ID` VARCHAR(11) CHARACTER SET latin1 COLLATE latin1_bin); +CREATE INDEX AK01IZAVORGANG ON t1(izaAnalyseart_id,Kuerzel); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000001','601','D0000000001','I0000000001'); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000002','602','D0000000001','I0000000001'); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000003','603','D0000000001','I0000000001'); +INSERT INTO t1(`IZAVORGANG_ID`,`KUERZEL`,`IZAANALYSEART_ID`,`IZAPMKZ_ID`)VALUES('D0000000004','101','D0000000001','I0000000001'); +SELECT `IZAVORGANG_ID` FROM t1 WHERE `KUERZEL` IN(SELECT MIN(`KUERZEL`)`Feld1` FROM t1 WHERE `KUERZEL` LIKE'601%'And`IZAANALYSEART_ID`='D0000000001'); +drop table t1; + +# +# Optimized IN with compound index +# +CREATE TABLE `t1` ( `aid` int(11) NOT NULL default '0', `bid` int(11) NOT NULL default '0', PRIMARY KEY (`aid`,`bid`)); +CREATE TABLE `t2` ( `aid` int(11) NOT NULL default '0', `bid` int(11) NOT NULL default '0', PRIMARY KEY (`aid`,`bid`)); +insert into t1 values (1,1),(1,2),(2,1),(2,2); +insert into t2 values (1,2),(2,2); +select * from t1 where t1.aid not in (select aid from t2 where bid=t1.bid); +alter table t2 drop primary key; +alter table t2 add key KEY1 (aid, bid); +select * from t1 where t1.aid not in (select aid from t2 where bid=t1.bid); +alter table t2 drop key KEY1; +alter table t2 add primary key (bid, aid); +select * from t1 where t1.aid not in (select aid from t2 where bid=t1.bid); +drop table t1,t2; + +# +# resolving fields of grouped outer SELECT +# +CREATE TABLE t1 (howmanyvalues bigint, avalue int); +INSERT INTO t1 VALUES (1, 1),(2, 1),(2, 2),(3, 1),(3, 2),(3, 3),(4, 1),(4, 2),(4, 3),(4, 4); +SELECT howmanyvalues, count(*) from t1 group by howmanyvalues; +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues = a.howmanyvalues) as mycount from t1 a group by a.howmanyvalues; +CREATE INDEX t1_howmanyvalues_idx ON t1 (howmanyvalues); +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues+1 = a.howmanyvalues+1) as mycount from t1 a group by a.howmanyvalues; +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues = a.howmanyvalues) as mycount from t1 a group by a.howmanyvalues; +-- error 1054 +SELECT a.howmanyvalues, (SELECT count(*) from t1 b where b.howmanyvalues = a.avalue) as mycount from t1 a group by a.howmanyvalues; +drop table t1; diff --git a/mysql-test/t/subselect_gis.test b/mysql-test/t/subselect_gis.test new file mode 100644 index 00000000000..338051029c4 --- /dev/null +++ b/mysql-test/t/subselect_gis.test @@ -0,0 +1,15 @@ +-- source include/have_geometry.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# correct behavoiur for function from reduced subselect +# +create table t1(City VARCHAR(30),Location geometry); +insert into t1 values("Paris",GeomFromText('POINT(2.33 48.87)')); +select City from t1 where (select +intersects(GeomFromText(AsText(Location)),GeomFromText('Polygon((2 50, 2.5 +50, 2.5 47, 2 47, 2 50))'))=0); +drop table t1; diff --git a/mysql-test/t/timezone2.test b/mysql-test/t/timezone2.test index 49579421570..15ac3416b29 100644 --- a/mysql-test/t/timezone2.test +++ b/mysql-test/t/timezone2.test @@ -187,3 +187,15 @@ select convert_tz('2003-12-31 04:00:00', 'SomeNotExistingTimeZone', 'UTC'); select convert_tz('2003-12-31 04:00:00', 'MET', 'SomeNotExistingTimeZone'); select convert_tz('2003-12-31 04:00:00', 'MET', NULL); select convert_tz( NULL, 'MET', 'UTC'); + +# +# Test for bug #4508 "CONVERT_TZ() function with new time zone as param +# crashes server." (Was caused by improperly worked mechanism of time zone +# dynamical loading). +# +create table t1 (ts timestamp); +set timestamp=1000000000; +insert into t1 (ts) values (now()); +select convert_tz(ts, @@time_zone, 'Japan') from t1; +drop table t1; + diff --git a/mysql-test/t/truncate.test b/mysql-test/t/truncate.test index 434a1907e42..b7ec506ecf1 100644 --- a/mysql-test/t/truncate.test +++ b/mysql-test/t/truncate.test @@ -26,7 +26,7 @@ drop table t1; truncate non_existing_table; # -# test autoincrement with TRUNCATE +# test autoincrement with TRUNCATE; verifying difference with DELETE # create table t1 (a integer auto_increment primary key); @@ -34,5 +34,19 @@ insert into t1 (a) values (NULL),(NULL); truncate table t1; insert into t1 (a) values (NULL),(NULL); SELECT * from t1; +delete from t1; +insert into t1 (a) values (NULL),(NULL); +SELECT * from t1; drop table t1; +# Verifying that temp tables are handled the same way + +create temporary table t1 (a integer auto_increment primary key); +insert into t1 (a) values (NULL),(NULL); +truncate table t1; +insert into t1 (a) values (NULL),(NULL); +SELECT * from t1; +delete from t1; +insert into t1 (a) values (NULL),(NULL); +SELECT * from t1; +drop table t1; diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test index 8c6cabd997b..bd571deff49 100644 --- a/mysql-test/t/type_blob.test +++ b/mysql-test/t/type_blob.test @@ -340,6 +340,7 @@ drop table t1; create table t1 (id integer primary key auto_increment, txt text, unique index txt_index (txt (20))); insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL); select * from t1 where txt='Chevy' or txt is NULL; +explain select * from t1 where txt='Chevy' or txt is NULL; select * from t1 where txt='Chevy '; select * from t1 where txt='Chevy ' or txt='Chevy'; select * from t1 where txt='Chevy' or txt='Chevy '; @@ -358,7 +359,13 @@ select * from t1 where txt < 'Chevy ' or txt is NULL; select * from t1 where txt <= 'Chevy'; select * from t1 where txt > 'Chevy'; select * from t1 where txt >= 'Chevy'; +alter table t1 modify column txt blob; +explain select * from t1 where txt='Chevy' or txt is NULL; +select * from t1 where txt='Chevy' or txt is NULL; +explain select * from t1 where txt='Chevy' or txt is NULL order by txt; +select * from t1 where txt='Chevy' or txt is NULL order by txt; drop table t1; + CREATE TABLE t1 ( i int(11) NOT NULL default '0', c text NOT NULL, PRIMARY KEY (i), KEY (c(1),c(1))); INSERT t1 VALUES (1,''),(2,''),(3,'asdfh'),(4,''); select max(i) from t1 where c = ''; diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test index 8d67802d42a..64420a85189 100644 --- a/mysql-test/t/type_date.test +++ b/mysql-test/t/type_date.test @@ -88,3 +88,22 @@ CREATE TABLE t1 (f1 time default NULL, f2 time default NULL); INSERT INTO t1 (f1, f2) VALUES ('09:00', '12:00'); SELECT DATE_FORMAT(f1, "%l.%i %p") , DATE_FORMAT(f2, "%l.%i %p") FROM t1; DROP TABLE t1; + +# +# Bug 4937: different date -> string conversion when using SELECT ... UNION +# and INSERT ... SELECT ... UNION +# + +CREATE TABLE t1 (f1 DATE); +CREATE TABLE t2 (f2 VARCHAR(8)); +CREATE TABLE t3 (f2 CHAR(8)); + +INSERT INTO t1 VALUES ('1978-11-26'); +INSERT INTO t2 SELECT f1+0 FROM t1; +INSERT INTO t2 SELECT f1+0 FROM t1 UNION SELECT f1+0 FROM t1; +INSERT INTO t3 SELECT f1+0 FROM t1; +INSERT INTO t3 SELECT f1+0 FROM t1 UNION SELECT f1+0 FROM t1; +SELECT * FROM t2; +SELECT * FROM t3; + +DROP TABLE t1, t2, t3; diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test index d3ddecfc314..4b627ea9b99 100644 --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@ -31,10 +31,14 @@ select a from t1 order by a; select min(a) from t1; drop table t1; +# +# BUG#3612, BUG#4393, BUG#4356, BUG#4394 +# + create table t1 (c1 double, c2 varchar(20)); insert t1 values (121,"16"); select c1 + c1 * (c2 / 100) as col from t1; -create table t2 select c1 + c1 * (c2 / 100) as col from t1; +create table t2 select c1 + c1 * (c2 / 100) as col1, round(c1, 5) as col2, round(c1, 35) as col3, sqrt(c1*1e-15) col4 from t1; select * from t2; show create table t2; drop table t1,t2; @@ -68,6 +72,13 @@ select * from t1; show create table t1; drop table t1; +# +# float in a char(1) field +# +create table t1 (c20 char); +insert into t1 values (5000.0); +drop table t1; + # Errors --error 1063 @@ -75,3 +86,4 @@ create table t1 (f float(54)); # Should give an error --disable_warnings drop table if exists t1; --enable_warnings + diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test index 9b3abc9f155..a644197f757 100644 --- a/mysql-test/t/type_timestamp.test +++ b/mysql-test/t/type_timestamp.test @@ -234,3 +234,13 @@ alter table t1 add i int default 10; select * from t1; drop table t1; + +# Test for bug #4491, TIMESTAMP(19) should be possible to create and not +# only read in 4.0 +# +create table t1 (ts timestamp(19)); +show create table t1; +set TIMESTAMP=1000000000; +insert into t1 values (); +select * from t1; +drop table t1; diff --git a/mysql-test/t/type_uint.test b/mysql-test/t/type_uint.test index ee5f5e8123b..b1f59242e8e 100644 --- a/mysql-test/t/type_uint.test +++ b/mysql-test/t/type_uint.test @@ -10,5 +10,6 @@ SET SQL_WARNINGS=1; create table t1 (this int unsigned); insert into t1 values (1); insert into t1 values (-1); +insert into t1 values ('5000000000'); select * from t1; drop table t1; diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 206b40f8ce7..263f631a65f 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -265,6 +265,14 @@ drop table t1,t2; select length(version()) > 1 as `*` UNION select 2; # +# Bug #4980: problem with explain +# + +create table t1 (a int); +insert into t1 values (0), (3), (1), (2); +explain (select * from t1) union (select * from t1) order by a; +drop table t1; +# # Test for another bug with UNION and LEFT JOIN # CREATE TABLE t1 ( id int(3) unsigned default '0') ENGINE=MyISAM; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 5669d11ddac..8c318497c22 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -336,3 +336,14 @@ SELECT @@global.global.key_buffer_size; SELECT @@global.session.key_buffer_size; --error 1064 SELECT @@global.local.key_buffer_size; + +# BUG#5135: cannot turn on log_warnings with SET in 4.1 (and 4.0) +set @tstlw = @@log_warnings; +show global variables like 'log_warnings'; +set global log_warnings = 0; +show global variables like 'log_warnings'; +set global log_warnings = 42; +show global variables like 'log_warnings'; +set global log_warnings = @tstlw; +show global variables like 'log_warnings'; + |