Commit 3805311b authored by unknown's avatar unknown

Remove result.es files and support for them, which requires splitting

up a couple of tests and adjusting the output of others. Exposes two
bugs (9472 and 9508).


BitKeeper/deleted/.del-drop_temp_table.result.es~bc4cfb1ee1257458:
  Delete: mysql-test/r/drop_temp_table.result.es
BitKeeper/deleted/.del-insert_select.result.es~ae7eb9891d6c07c4:
  Delete: mysql-test/r/insert_select.result.es
BitKeeper/deleted/.del-myisam-blob.result.es~d498dae7d9f1a6d4:
  Delete: mysql-test/r/myisam-blob.result.es
BitKeeper/deleted/.del-packet.result.es~6e71c3b634806185:
  Delete: mysql-test/r/packet.result.es
BitKeeper/deleted/.del-query_cache.result.es~246ad731a517d9ab:
  Delete: mysql-test/r/query_cache.result.es
BitKeeper/deleted/.del-select.result.es~240635f6a3f1a079:
  Delete: mysql-test/r/select.result.es
BitKeeper/deleted/.del-type_blob.result.es~a4a0d4454b2d0218:
  Delete: mysql-test/r/type_blob.result.es
BitKeeper/deleted/.del-type_float.result.es~a5533e4118eadc04:
  Delete: mysql-test/r/type_float.result.es
BitKeeper/deleted/.del-type_ranges.result.es~bb77517f4c9dc978:
  Delete: mysql-test/r/type_ranges.result.es
mysql-test/mysql-test-run.sh:
  Remove support for special result extension -- bad idea!
mysql-test/t/ps_1general.test:
  Explain --replace_result
mysql-test/r/insert_select.result:
  Update results
mysql-test/r/select.result:
  Update results
mysql-test/r/type_blob.result:
  Update results
mysql-test/r/type_float.result:
  Update results
mysql-test/r/type_ranges.result:
  Update results
mysql-test/t/drop_temp_table.test:
  Skip this test with embedded server
mysql-test/t/insert_select.test:
  Move binlog test to new file
mysql-test/t/select.test:
  Replace grants column from 'show full columns'
mysql-test/t/type_blob.test:
  Replace grants column from 'show full columns'
mysql-test/t/type_float.test:
  Replace grants column from 'show full columns'
mysql-test/t/type_ranges.test:
  Replace grants column from 'show full columns'
sql/sql_select.cc:
  Fix conditional around query_cache_abort() call.
parent 529f2937
...@@ -240,7 +240,6 @@ STOP_WAIT_TIMEOUT=10 ...@@ -240,7 +240,6 @@ STOP_WAIT_TIMEOUT=10
MYSQL_TEST_SSL_OPTS="" MYSQL_TEST_SSL_OPTS=""
USE_TIMER="" USE_TIMER=""
USE_EMBEDDED_SERVER="" USE_EMBEDDED_SERVER=""
RESULT_EXT=""
TEST_MODE="" TEST_MODE=""
NDB_MGM_EXTRA_OPTS= NDB_MGM_EXTRA_OPTS=
...@@ -253,7 +252,6 @@ while test $# -gt 0; do ...@@ -253,7 +252,6 @@ while test $# -gt 0; do
USE_EMBEDDED_SERVER=1 USE_EMBEDDED_SERVER=1
USE_MANAGER=0 NO_SLAVE=1 USE_MANAGER=0 NO_SLAVE=1
USE_RUNNING_SERVER="" USE_RUNNING_SERVER=""
RESULT_EXT=".es"
TEST_MODE="$TEST_MODE embedded" ;; TEST_MODE="$TEST_MODE embedded" ;;
--purify) --purify)
USE_PURIFY=1 USE_PURIFY=1
...@@ -735,13 +733,6 @@ show_failed_diff () ...@@ -735,13 +733,6 @@ show_failed_diff ()
result_file=r/$1.result result_file=r/$1.result
eval_file=r/$1.eval eval_file=r/$1.eval
# If we have an special externsion for result files we use it if we are recording
# or a result file with that extension exists.
if [ -n "$RESULT_EXT" -a \( x$RECORD = x1 -o -f "$result_file$RESULT_EXT" \) ]
then
result_file="$result_file$RESULT_EXT"
fi
if [ -f $eval_file ] if [ -f $eval_file ]
then then
result_file=$eval_file result_file=$eval_file
...@@ -1462,9 +1453,6 @@ run_testcase () ...@@ -1462,9 +1453,6 @@ run_testcase ()
result_file="r/$tname.result" result_file="r/$tname.result"
echo $tname > $CURRENT_TEST echo $tname > $CURRENT_TEST
SKIP_SLAVE=`$EXPR \( $tname : rpl \) = 0` SKIP_SLAVE=`$EXPR \( $tname : rpl \) = 0`
if [ -n "$RESULT_EXT" -a \( x$RECORD = x1 -o -f "$result_file$RESULT_EXT" \) ] ; then
result_file="$result_file$RESULT_EXT"
fi
if [ "$USE_MANAGER" = 1 ] ; then if [ "$USE_MANAGER" = 1 ] ; then
many_slaves=`$EXPR \( \( $tname : rpl_failsafe \) != 0 \) \| \( \( $tname : rpl_chain_temp_table \) != 0 \)` many_slaves=`$EXPR \( \( $tname : rpl_failsafe \) != 0 \) \| \( \( $tname : rpl_chain_temp_table \) != 0 \)`
fi fi
...@@ -1531,10 +1519,8 @@ run_testcase () ...@@ -1531,10 +1519,8 @@ run_testcase ()
--result-file=*) --result-file=*)
result_file=`$ECHO "$EXTRA_MASTER_OPT" | $SED -e "s;--result-file=;;"` result_file=`$ECHO "$EXTRA_MASTER_OPT" | $SED -e "s;--result-file=;;"`
result_file="r/$result_file.result" result_file="r/$result_file.result"
if [ -n "$RESULT_EXT" -a \( x$RECORD = x1 -o -f "$result_file$RESULT_EXT" \) ] ; then # Note that this must be set to space, not "" for test-reset to
result_file="$result_file$RESULT_EXT" # work
fi
# Note that this must be set to space, not "" for test-reset to work
EXTRA_MASTER_OPT=" " EXTRA_MASTER_OPT=" "
;; ;;
esac esac
......
reset master;
create database `drop-temp+table-test`;
use `drop-temp+table-test`;
create temporary table `table:name` (a int);
select get_lock("a",10);
get_lock("a",10)
1
select get_lock("a",10);
get_lock("a",10)
1
show binlog events;
drop database `drop-temp+table-test`;
create table t1(a int, unique(a));
insert into t1 values(2);
create table t2(a int);
insert into t2 values(1),(2);
reset master;
insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 1
show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 use `test`; insert into t1 select * from t2
select * from t1;
a
1
2
drop table t1, t2;
create table t1(a int);
insert into t1 values(1),(1);
reset master;
create table t2(unique(a)) select a from t1;
ERROR 23000: Duplicate entry '1' for key 1
show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
drop table t1;
...@@ -65,31 +65,6 @@ INSERT INTO t1 (numeropost,icone,contenu,pseudo,date,signature,ip) ...@@ -65,31 +65,6 @@ INSERT INTO t1 (numeropost,icone,contenu,pseudo,date,signature,ip)
SELECT 1718,icone,contenu,pseudo,date,signature,ip FROM t2 SELECT 1718,icone,contenu,pseudo,date,signature,ip FROM t2
WHERE numeropost=9 ORDER BY numreponse ASC; WHERE numeropost=9 ORDER BY numreponse ASC;
DROP TABLE t1,t2; DROP TABLE t1,t2;
create table t1(a int, unique(a));
insert into t1 values(2);
create table t2(a int);
insert into t2 values(1),(2);
reset master;
insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 1
show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 use `test`; insert into t1 select * from t2
select * from t1;
a
1
2
drop table t1, t2;
create table t1(a int);
insert into t1 values(1),(1);
reset master;
create table t2(unique(a)) select a from t1;
ERROR 23000: Duplicate entry '1' for key 1
show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
drop table t1;
create table t1 (a int not null); create table t1 (a int not null);
create table t2 (a int not null); create table t2 (a int not null);
insert into t1 values (1); insert into t1 values (1);
......
drop table if exists t1,t2;
create table t1 (bandID MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, payoutID SMALLINT UNSIGNED NOT NULL);
insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7,12),(8,12);
create table t2 (payoutID SMALLINT UNSIGNED NOT NULL PRIMARY KEY);
insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1;
insert into t2 (payoutID) SELECT payoutID+10 FROM t1;
ERROR 23000: Duplicate entry '16' for key 1
insert ignore into t2 (payoutID) SELECT payoutID+10 FROM t1;
select * from t2;
payoutID
1
4
6
9
10
11
12
14
16
19
20
22
drop table t1,t2;
CREATE TABLE `t1` (
`numeropost` bigint(20) unsigned NOT NULL default '0',
`icone` tinyint(4) unsigned NOT NULL default '0',
`numreponse` bigint(20) unsigned NOT NULL auto_increment,
`contenu` text NOT NULL,
`pseudo` varchar(50) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`ip` bigint(11) NOT NULL default '0',
`signature` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`numeropost`,`numreponse`)
,KEY `ip` (`ip`),
KEY `date` (`date`),
KEY `pseudo` (`pseudo`),
KEY `numreponse` (`numreponse`)
) ENGINE=MyISAM;
CREATE TABLE `t2` (
`numeropost` bigint(20) unsigned NOT NULL default '0',
`icone` tinyint(4) unsigned NOT NULL default '0',
`numreponse` bigint(20) unsigned NOT NULL auto_increment,
`contenu` text NOT NULL,
`pseudo` varchar(50) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`ip` bigint(11) NOT NULL default '0',
`signature` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`numeropost`,`numreponse`),
KEY `ip` (`ip`),
KEY `date` (`date`),
KEY `pseudo` (`pseudo`),
KEY `numreponse` (`numreponse`)
) ENGINE=MyISAM;
INSERT INTO t2
(numeropost,icone,numreponse,contenu,pseudo,date,ip,signature) VALUES
(9,1,56,'test','joce','2001-07-25 13:50:53'
,3649052399,0);
INSERT INTO t1 (numeropost,icone,contenu,pseudo,date,signature,ip)
SELECT 1618,icone,contenu,pseudo,date,signature,ip FROM t2
WHERE numeropost=9 ORDER BY numreponse ASC;
show variables like '%bulk%';
Variable_name Value
bulk_insert_buffer_size 8388608
INSERT INTO t1 (numeropost,icone,contenu,pseudo,date,signature,ip)
SELECT 1718,icone,contenu,pseudo,date,signature,ip FROM t2
WHERE numeropost=9 ORDER BY numreponse ASC;
DROP TABLE t1,t2;
create table t1(a int, unique(a));
insert into t1 values(2);
create table t2(a int);
insert into t2 values(1),(2);
reset master;
insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 1
show binlog events;
select * from t1;
a
1
2
drop table t1, t2;
create table t1(a int);
insert into t1 values(1),(1);
reset master;
create table t2(unique(a)) select a from t1;
ERROR 23000: Duplicate entry '1' for key 1
show binlog events;
drop table t1;
create table t1 (a int not null);
create table t2 (a int not null);
insert into t1 values (1);
insert into t1 values (a+2);
insert into t1 values (a+3);
insert into t1 values (4),(a+5);
insert into t1 select * from t1;
select * from t1;
a
1
2
3
4
5
1
2
3
4
5
insert into t1 select * from t1 as t2;
select * from t1;
a
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
insert into t2 select * from t1 as t2;
select * from t1;
a
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
insert into t1 select t2.a from t1,t2;
select * from t1;
a
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
insert into t1 select * from t1,t1;
ERROR 42000: Not unique table/alias: 't1'
drop table t1,t2;
create table t1 (a int not null primary key, b char(10));
create table t2 (a int not null, b char(10));
insert into t1 values (1,"t1:1"),(3,"t1:3");
insert into t2 values (2,"t2:2"), (3,"t2:3");
insert into t1 select * from t2;
ERROR 23000: Duplicate entry '3' for key 1
select * from t1;
a b
1 t1:1
3 t1:3
2 t2:2
replace into t1 select * from t2;
select * from t1;
a b
1 t1:1
3 t2:3
2 t2:2
drop table t1,t2;
CREATE TABLE t1 ( USID INTEGER UNSIGNED, ServerID TINYINT UNSIGNED, State ENUM ('unknown', 'Access-Granted', 'Session-Active', 'Session-Closed' ) NOT NULL DEFAULT 'unknown', SessionID CHAR(32), User CHAR(32) NOT NULL DEFAULT '<UNKNOWN>', NASAddr INTEGER UNSIGNED, NASPort INTEGER UNSIGNED, NASPortType INTEGER UNSIGNED, ConnectSpeed INTEGER UNSIGNED, CarrierType CHAR(32), CallingStationID CHAR(32), CalledStationID CHAR(32), AssignedAddr INTEGER UNSIGNED, SessionTime INTEGER UNSIGNED, PacketsIn INTEGER UNSIGNED, OctetsIn INTEGER UNSIGNED, PacketsOut INTEGER UNSIGNED, OctetsOut INTEGER UNSIGNED, TerminateCause INTEGER UNSIGNED, UnauthTime TINYINT UNSIGNED, AccessRequestTime DATETIME, AcctStartTime DATETIME, AcctLastTime DATETIME, LastModification TIMESTAMP NOT NULL);
CREATE TABLE t2 ( USID INTEGER UNSIGNED AUTO_INCREMENT, ServerID TINYINT UNSIGNED, State ENUM ('unknown', 'Access-Granted', 'Session-Active', 'Session-Closed' ) NOT NULL DEFAULT 'unknown', SessionID CHAR(32), User TEXT NOT NULL, NASAddr INTEGER UNSIGNED, NASPort INTEGER UNSIGNED, NASPortType INTEGER UNSIGNED, ConnectSpeed INTEGER UNSIGNED, CarrierType CHAR(32), CallingStationID CHAR(32), CalledStationID CHAR(32), AssignedAddr INTEGER UNSIGNED, SessionTime INTEGER UNSIGNED, PacketsIn INTEGER UNSIGNED, OctetsIn INTEGER UNSIGNED, PacketsOut INTEGER UNSIGNED, OctetsOut INTEGER UNSIGNED, TerminateCause INTEGER UNSIGNED, UnauthTime TINYINT UNSIGNED, AccessRequestTime DATETIME, AcctStartTime DATETIME, AcctLastTime DATETIME, LastModification TIMESTAMP NOT NULL, INDEX(USID,ServerID,NASAddr,SessionID), INDEX(AssignedAddr));
INSERT INTO t1 VALUES (39,42,'Access-Granted','46','491721000045',2130706433,17690,NULL,NULL,'Localnet','491721000045','49172200000',754974766,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2003-07-18 00:11:21',NULL,NULL,20030718001121);
INSERT INTO t2 SELECT USID, ServerID, State, SessionID, User, NASAddr, NASPort, NASPortType, ConnectSpeed, CarrierType, CallingStationID, CalledStationID, AssignedAddr, SessionTime, PacketsIn, OctetsIn, PacketsOut, OctetsOut, TerminateCause, UnauthTime, AccessRequestTime, AcctStartTime, AcctLastTime, LastModification from t1 LIMIT 1;
drop table t1,t2;
CREATE TABLE t1(
Month date NOT NULL,
Type tinyint(3) unsigned NOT NULL auto_increment,
Field int(10) unsigned NOT NULL,
Count int(10) unsigned NOT NULL,
UNIQUE KEY Month (Month,Type,Field)
);
insert into t1 Values
(20030901, 1, 1, 100),
(20030901, 1, 2, 100),
(20030901, 2, 1, 100),
(20030901, 2, 2, 100),
(20030901, 3, 1, 100);
select * from t1;
Month Type Field Count
2003-09-01 1 1 100
2003-09-01 1 2 100
2003-09-01 2 1 100
2003-09-01 2 2 100
2003-09-01 3 1 100
Select null, Field, Count From t1 Where Month=20030901 and Type=2;
NULL Field Count
NULL 1 100
NULL 2 100
create table t2(No int not null, Field int not null, Count int not null);
insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2;
Warnings:
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'No' at row 1
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'No' at row 2
select * from t2;
No Field Count
0 1 100
0 2 100
drop table t1, t2;
CREATE TABLE t1 (
ID int(11) NOT NULL auto_increment,
NO int(11) NOT NULL default '0',
SEQ int(11) NOT NULL default '0',
PRIMARY KEY (ID),
KEY t1$NO (SEQ,NO)
) ENGINE=MyISAM;
INSERT INTO t1 (SEQ, NO) SELECT "1" AS SEQ, IF(MAX(NO) IS NULL, 0, MAX(NO)) + 1 AS NO FROM t1 WHERE (SEQ = 1);
select SQL_BUFFER_RESULT * from t1 WHERE (SEQ = 1);
ID NO SEQ
1 1 1
drop table t1;
drop table if exists t1;
CREATE TABLE t1 (data LONGBLOB) ENGINE=myisam;
INSERT INTO t1 (data) VALUES (NULL);
UPDATE t1 set data=repeat('a',18*1024*1024);
Warnings:
Warning 1301 Result of repeat() was larger than max_allowed_packet (24) - truncated
select length(data) from t1;
length(data)
NULL
delete from t1 where left(data,1)='a';
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
truncate table t1;
INSERT INTO t1 (data) VALUES (repeat('a',1*1024*1024));
Warnings:
Warning 1301 Result of repeat() was larger than max_allowed_packet (24) - truncated
INSERT INTO t1 (data) VALUES (repeat('b',16*1024*1024-1024));
Warnings:
Warning 1301 Result of repeat() was larger than max_allowed_packet (24) - truncated
delete from t1 where left(data,1)='b';
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
UPDATE t1 set data=repeat('c',17*1024*1024);
Warnings:
Warning 1301 Result of repeat() was larger than max_allowed_packet (24) - truncated
Warning 1301 Result of repeat() was larger than max_allowed_packet (24) - truncated
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
delete from t1 where left(data,1)='c';
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
INSERT INTO t1 set data=repeat('a',18*1024*1024);
Warnings:
Warning 1301 Result of repeat() was larger than max_allowed_packet (24) - truncated
select length(data) from t1;
length(data)
NULL
NULL
NULL
alter table t1 modify data blob;
select length(data) from t1;
length(data)
NULL
NULL
NULL
drop table t1;
CREATE TABLE t1 (data BLOB) ENGINE=myisam;
INSERT INTO t1 (data) VALUES (NULL);
UPDATE t1 set data=repeat('a',18*1024*1024);
Warnings:
Warning 1301 Result of repeat() was larger than max_allowed_packet (24) - truncated
select length(data) from t1;
length(data)
NULL
drop table t1;
set global max_allowed_packet=100;
set max_allowed_packet=100;
set global net_buffer_length=100;
set net_buffer_length=100;
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
len
1024
select repeat('a',2000);
repeat('a',2000)
NULL
Warnings:
Warning 1301 Result of repeat() was larger than max_allowed_packet (1024) - truncated
select @@net_buffer_length, @@max_allowed_packet;
@@net_buffer_length @@max_allowed_packet
1024 1024
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
set global max_allowed_packet=default;
set max_allowed_packet=default;
set global net_buffer_length=default;
set net_buffer_length=default;
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
len
100
select length(repeat('a',2000));
length(repeat('a',2000))
2000
This diff is collapsed.
...@@ -2033,20 +2033,20 @@ show tables from test like "t?"; ...@@ -2033,20 +2033,20 @@ show tables from test like "t?";
Tables_in_test (t?) Tables_in_test (t?)
show full columns from t2; show full columns from t2;
Field Type Collation Null Key Default Extra Privileges Comment Field Type Collation Null Key Default Extra Privileges Comment
auto int(11) NULL PRI NULL auto_increment select,insert,update,references auto int(11) NULL PRI NULL auto_increment #
fld1 int(6) unsigned zerofill NULL UNI 000000 select,insert,update,references fld1 int(6) unsigned zerofill NULL UNI 000000 #
companynr tinyint(2) unsigned zerofill NULL 00 select,insert,update,references companynr tinyint(2) unsigned zerofill NULL 00 #
fld3 char(30) latin1_swedish_ci MUL select,insert,update,references fld3 char(30) latin1_swedish_ci MUL #
fld4 char(35) latin1_swedish_ci select,insert,update,references fld4 char(35) latin1_swedish_ci #
fld5 char(35) latin1_swedish_ci select,insert,update,references fld5 char(35) latin1_swedish_ci #
fld6 char(4) latin1_swedish_ci select,insert,update,references fld6 char(4) latin1_swedish_ci #
show full columns from t2 from test like 'f%'; show full columns from t2 from test like 'f%';
Field Type Collation Null Key Default Extra Privileges Comment Field Type Collation Null Key Default Extra Privileges Comment
fld1 int(6) unsigned zerofill NULL UNI 000000 select,insert,update,references fld1 int(6) unsigned zerofill NULL UNI 000000 #
fld3 char(30) latin1_swedish_ci MUL select,insert,update,references fld3 char(30) latin1_swedish_ci MUL #
fld4 char(35) latin1_swedish_ci select,insert,update,references fld4 char(35) latin1_swedish_ci #
fld5 char(35) latin1_swedish_ci select,insert,update,references fld5 char(35) latin1_swedish_ci #
fld6 char(4) latin1_swedish_ci select,insert,update,references fld6 char(4) latin1_swedish_ci #
show full columns from t2 from test like 's%'; show full columns from t2 from test like 's%';
Field Type Collation Null Key Default Extra Privileges Comment Field Type Collation Null Key Default Extra Privileges Comment
show keys from t2; show keys from t2;
......
This diff is collapsed.
...@@ -70,17 +70,17 @@ update t1 set c="",b=null where c="1"; ...@@ -70,17 +70,17 @@ update t1 set c="",b=null where c="1";
lock tables t1 READ; lock tables t1 READ;
show full fields from t1; show full fields from t1;
Field Type Collation Null Key Default Extra Privileges Comment Field Type Collation Null Key Default Extra Privileges Comment
t text latin1_swedish_ci YES NULL select,insert,update,references t text latin1_swedish_ci YES NULL #
c varchar(10) latin1_swedish_ci YES NULL select,insert,update,references c varchar(10) latin1_swedish_ci YES NULL #
b blob NULL YES NULL select,insert,update,references b blob NULL YES NULL #
d varbinary(10) NULL YES NULL select,insert,update,references d varbinary(10) NULL YES NULL #
lock tables t1 WRITE; lock tables t1 WRITE;
show full fields from t1; show full fields from t1;
Field Type Collation Null Key Default Extra Privileges Comment Field Type Collation Null Key Default Extra Privileges Comment
t text latin1_swedish_ci YES NULL select,insert,update,references t text latin1_swedish_ci YES NULL #
c varchar(10) latin1_swedish_ci YES NULL select,insert,update,references c varchar(10) latin1_swedish_ci YES NULL #
b blob NULL YES NULL select,insert,update,references b blob NULL YES NULL #
d varbinary(10) NULL YES NULL select,insert,update,references d varbinary(10) NULL YES NULL #
unlock tables; unlock tables;
select t from t1 where t like "hello"; select t from t1 where t like "hello";
t t
...@@ -513,10 +513,10 @@ select if(imagem is null, "ERROR", "OK"),length(imagem) from t1 where id = 1; ...@@ -513,10 +513,10 @@ select if(imagem is null, "ERROR", "OK"),length(imagem) from t1 where id = 1;
if(imagem is null, "ERROR", "OK") length(imagem) if(imagem is null, "ERROR", "OK") length(imagem)
OK 581 OK 581
drop table t1; drop table t1;
create table t1 select load_file('../../std_data/words.dat'); create table t1 select load_file('../../std_data/words.dat') l;
show full fields from t1; show full fields from t1;
Field Type Collation Null Key Default Extra Privileges Comment Field Type Collation Null Key Default Extra Privileges Comment
load_file('../../std_data/words.dat') longblob NULL YES NULL select,insert,update,references l longblob NULL YES NULL #
drop table t1; drop table t1;
create table t1 (id integer primary key auto_increment, txt text not null, unique index txt_index (txt (20))); create table t1 (id integer primary key auto_increment, txt text not null, unique index txt_index (txt (20)));
insert into t1 (txt) values ('Chevy'), ('Chevy '); insert into t1 (txt) values ('Chevy'), ('Chevy ');
......
This diff is collapsed.
...@@ -11,8 +11,8 @@ SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1; ...@@ -11,8 +11,8 @@ SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1;
create table t1 (f1 float(24),f2 float(52)); create table t1 (f1 float(24),f2 float(52));
show full columns from t1; show full columns from t1;
Field Type Collation Null Key Default Extra Privileges Comment Field Type Collation Null Key Default Extra Privileges Comment
f1 float NULL YES NULL select,insert,update,references f1 float NULL YES NULL #
f2 double NULL YES NULL select,insert,update,references f2 double NULL YES NULL #
insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150); insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150);
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'f1' at row 7 Warning 1264 Data truncated; out of range for column 'f1' at row 7
...@@ -97,18 +97,18 @@ drop table t1; ...@@ -97,18 +97,18 @@ drop table t1;
create table t1 (f float, f2 float(24), f3 float(6,2), d double, d2 float(53), d3 double(10,3), de decimal, de2 decimal(6), de3 decimal(5,2), n numeric, n2 numeric(8), n3 numeric(5,6)); create table t1 (f float, f2 float(24), f3 float(6,2), d double, d2 float(53), d3 double(10,3), de decimal, de2 decimal(6), de3 decimal(5,2), n numeric, n2 numeric(8), n3 numeric(5,6));
show full columns from t1; show full columns from t1;
Field Type Collation Null Key Default Extra Privileges Comment Field Type Collation Null Key Default Extra Privileges Comment
f float NULL YES NULL select,insert,update,references f float NULL YES NULL #
f2 float NULL YES NULL select,insert,update,references f2 float NULL YES NULL #
f3 float(6,2) NULL YES NULL select,insert,update,references f3 float(6,2) NULL YES NULL #
d double NULL YES NULL select,insert,update,references d double NULL YES NULL #
d2 double NULL YES NULL select,insert,update,references d2 double NULL YES NULL #
d3 double(10,3) NULL YES NULL select,insert,update,references d3 double(10,3) NULL YES NULL #
de decimal(10,0) NULL YES NULL select,insert,update,references de decimal(10,0) NULL YES NULL #
de2 decimal(6,0) NULL YES NULL select,insert,update,references de2 decimal(6,0) NULL YES NULL #
de3 decimal(5,2) NULL YES NULL select,insert,update,references de3 decimal(5,2) NULL YES NULL #
n decimal(10,0) NULL YES NULL select,insert,update,references n decimal(10,0) NULL YES NULL #
n2 decimal(8,0) NULL YES NULL select,insert,update,references n2 decimal(8,0) NULL YES NULL #
n3 decimal(7,6) NULL YES NULL select,insert,update,references n3 decimal(7,6) NULL YES NULL #
drop table t1; drop table t1;
create table t1 (a decimal(7,3) not null, key (a)); create table t1 (a decimal(7,3) not null, key (a));
insert into t1 values ("0"),("-0.00"),("-0.01"),("-0.002"),("1"); insert into t1 values ("0"),("-0.00"),("-0.01"),("-0.002"),("1");
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Embedded server doesn't support binlog
-- source include/not_embedded.inc
connect (con1,localhost,root,,); connect (con1,localhost,root,,);
connect (con2,localhost,root,,); connect (con2,localhost,root,,);
connection con1; connection con1;
......
This diff is collapsed.
This diff is collapsed.
...@@ -596,6 +596,7 @@ drop table t2; ...@@ -596,6 +596,7 @@ drop table t2;
prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ; prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
create table t5 (a int) ; create table t5 (a int) ;
# rename must fail, t7 does not exist # rename must fail, t7 does not exist
# Clean up the filename here because embedded server reports whole path
--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / --replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ /
--error 1017 --error 1017
execute stmt1 ; execute stmt1 ;
......
...@@ -1742,8 +1742,12 @@ select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; ...@@ -1742,8 +1742,12 @@ select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1;
show tables; show tables;
show tables from test like "s%"; show tables from test like "s%";
show tables from test like "t?"; show tables from test like "t?";
# We mask out the Privileges column because it differs with embedded server
--replace_column 8 #
show full columns from t2; show full columns from t2;
--replace_column 8 #
show full columns from t2 from test like 'f%'; show full columns from t2 from test like 'f%';
--replace_column 8 #
show full columns from t2 from test like 's%'; show full columns from t2 from test like 's%';
show keys from t2; show keys from t2;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -4482,7 +4482,7 @@ remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value) ...@@ -4482,7 +4482,7 @@ remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value)
(thd->options & OPTION_AUTO_IS_NULL) && (thd->options & OPTION_AUTO_IS_NULL) &&
thd->insert_id()) thd->insert_id())
{ {
#ifndef EMBEDDED_LIBRARY #ifdef HAVE_QUERY_CACHE
query_cache_abort(&thd->net); query_cache_abort(&thd->net);
#endif #endif
COND *new_cond; COND *new_cond;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment