summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-10-08 07:24:04 +0300
committerunknown <monty@hundin.mysql.fi>2001-10-08 07:24:04 +0300
commit2ee21c9c46abb71d1bb1200bb77dada3969d49fb (patch)
tree368e07bec37e044cbac9f95a7ca572c494968756 /mysql-test
parent515c747dcfcca8d04a509496c5864f302d6d76be (diff)
downloadmariadb-git-2ee21c9c46abb71d1bb1200bb77dada3969d49fb.tar.gz
Cleanup after last merge
client/mysqltest.c: Don't write error message to log if there is more than one possible error message include/mysqld_error.h: Made error messages more general libmysqld/Makefile.am: md5 is now in mysys mysql-test/include/have_isam.inc: Update to new result format mysql-test/include/not_embedded.inc: Update to new result format mysql-test/mysql-test-run.sh: Update to new result format mysql-test/r/auto_increment.result: Update to new result format mysql-test/r/count_distinct2.result: Update to new result format mysql-test/r/create.result: Update to new result format mysql-test/r/func_system.result: Update to new result format mysql-test/r/isam.result: Update to new result format mysql-test/r/lock.result: Update to new result format mysql-test/r/lock_multi.result: Update to new result format mysql-test/r/rename.result: Update to new result format mysql-test/r/rpl000001.result: Fix wrong test mysql-test/r/tablelock.result: Update to new result format mysql-test/t/rename.test: Update to new result format sql/share/czech/errmsg.txt: Made error messages more general sql/share/danish/errmsg.txt: Made error messages more general sql/share/dutch/errmsg.txt: Made error messages more general sql/share/english/errmsg.txt: Made error messages more general sql/share/estonian/errmsg.txt: Made error messages more general sql/share/french/errmsg.txt: Made error messages more general sql/share/german/errmsg.txt: Made error messages more general sql/share/greek/errmsg.txt: Made error messages more general sql/share/hungarian/errmsg.txt: Made error messages more general sql/share/italian/errmsg.txt: Made error messages more general sql/share/japanese/errmsg.txt: Made error messages more general sql/share/korean/errmsg.txt: Made error messages more general sql/share/norwegian-ny/errmsg.txt: Made error messages more general sql/share/norwegian/errmsg.txt: Made error messages more general sql/share/polish/errmsg.txt: Made error messages more general sql/share/portuguese/errmsg.txt: Made error messages more general sql/share/romanian/errmsg.txt: Made error messages more general sql/share/russian/errmsg.txt: Made error messages more general sql/share/slovak/errmsg.txt: Made error messages more general sql/share/spanish/errmsg.txt: Made error messages more general sql/share/swedish/errmsg.txt: Made error messages more general sql/share/ukrainian/errmsg.txt: Made error messages more general sql/sql_lex.cc: We can't remove lex->thd because sql_yacc uses it. sql/sql_lex.h: We can't remove lex->thd because sql_yacc uses it. sql/sql_yacc.yy: Cleanup support-files/mysql.spec.sh: Create MySQL-embedded rpm tools/mysqlmanager.c: Fix bug in merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/have_isam.inc2
-rw-r--r--mysql-test/include/not_embedded.inc2
-rw-r--r--mysql-test/mysql-test-run.sh3
-rw-r--r--mysql-test/r/auto_increment.result1
-rw-r--r--mysql-test/r/count_distinct2.result1
-rw-r--r--mysql-test/r/create.result10
-rw-r--r--mysql-test/r/func_system.result2
-rw-r--r--mysql-test/r/isam.result37
-rw-r--r--mysql-test/r/lock.result18
-rw-r--r--mysql-test/r/lock_multi.result14
-rw-r--r--mysql-test/r/rename.result10
-rw-r--r--mysql-test/r/rpl000001.result4
-rw-r--r--mysql-test/r/tablelock.result7
-rw-r--r--mysql-test/t/rename.test16
14 files changed, 81 insertions, 46 deletions
diff --git a/mysql-test/include/have_isam.inc b/mysql-test/include/have_isam.inc
index d83328f70f4..830170c921f 100644
--- a/mysql-test/include/have_isam.inc
+++ b/mysql-test/include/have_isam.inc
@@ -1,2 +1,4 @@
-- require r/have_isam.require
+disable_query_log;
show variables like "have_isam";
+enable_query_log;
diff --git a/mysql-test/include/not_embedded.inc b/mysql-test/include/not_embedded.inc
index 7d6fdbf9768..52ae026ece3 100644
--- a/mysql-test/include/not_embedded.inc
+++ b/mysql-test/include/not_embedded.inc
@@ -1,3 +1,5 @@
-- require r/not_embedded.require
+disable_query_log;
select version() like "%embedded%" as "have_embedded";
+enable_query_log;
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 5b4c85dcac1..5cb3da9df25 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -124,7 +124,7 @@ MASTER_RUNNING=0
MASTER_MYPORT=9306
SLAVE_RUNNING=0
SLAVE_MYPORT=9307
-MYSQL_MANAGER_PORT=23546
+MYSQL_MANAGER_PORT=9308
MYSQL_MANAGER_PW_FILE=$MYSQL_TEST_DIR/var/tmp/manager.pwd
MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log
MYSQL_MANAGER_USER=root
@@ -152,6 +152,7 @@ while test $# -gt 0; do
--tmpdir=*) MYSQL_TMP_DIR=`$ECHO "$1" | $SED -e "s;--tmpdir=;;"` ;;
--master_port=*) MASTER_MYPORT=`$ECHO "$1" | $SED -e "s;--master_port=;;"` ;;
--slave_port=*) SLAVE_MYPORT=`$ECHO "$1" | $SED -e "s;--slave_port=;;"` ;;
+ --manager-port=*) MYSQL_MANAGER_PORT=`$ECHO "$1" | $SED -e "s;--manager_port=;;"` ;;
--with-openssl)
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT \
--ssl-ca=$BASEDIR/SSL/cacert.pem \
diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result
index e785252bd2f..66efd2ba567 100644
--- a/mysql-test/r/auto_increment.result
+++ b/mysql-test/r/auto_increment.result
@@ -1,3 +1,4 @@
+drop table if exists t1;
create table t1 (a int not null auto_increment,b int, primary key (a)) type=myisam auto_increment=3;
insert into t1 values (1,1),(NULL,3),(NULL,4);
delete from t1 where a=4;
diff --git a/mysql-test/r/count_distinct2.result b/mysql-test/r/count_distinct2.result
index 192116db21d..131e3b325ec 100644
--- a/mysql-test/r/count_distinct2.result
+++ b/mysql-test/r/count_distinct2.result
@@ -1,3 +1,4 @@
+drop table if exists t1;
create table t1(n1 int, n2 int, s char(20), vs varchar(20), t text);
insert into t1 values (1,11, 'one','eleven', 'eleven'),
(1,11, 'one','eleven', 'eleven'),
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index d84af9db429..5f14de18735 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -27,21 +27,13 @@ create table t1 (a int not null,b text) type=heap;
The used table type doesn't support BLOB/TEXT columns
create table t1 (a int ,primary key(a)) type=heap;
All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead
-create table t1 (a int,b text, index(a)) type=isam;
-Column 'a' is used with UNIQUE or INDEX but is not defined as NOT NULL
-create table t1 (a int,b text, index(b)) type=isam;
-BLOB column 'b' can't be used in key specification with the used table type
drop table if exists t1;
-create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=isam;
-Incorrect table definition; There can only be one auto column and it must be defined as a key
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=heap;
The used table type doesn't support AUTO_INCREMENT columns
create table t1 (ordid int(8), primary key (ordid));
All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead
-create table t1 (ordid int(8), unique (ordid)) type=isam;
-Column 'ordid' is used with UNIQUE or INDEX but is not defined as NOT NULL
create table not_existing_database.test (a int);
-Can't create/write to file './not_existing_database/test.frm' (Errcode: 2)
+Got one of the listed errors
create table `a/a` (a int);
Incorrect table name 'a/a'
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int);
diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result
index 175524f6b83..5ea4ed5e4e0 100644
--- a/mysql-test/r/func_system.result
+++ b/mysql-test/r/func_system.result
@@ -1,5 +1,5 @@
select database(),user() like "%@%";
-database() user()
+database() user() like "%@%"
test 1
select version()>="3.23.29";
version()>="3.23.29"
diff --git a/mysql-test/r/isam.result b/mysql-test/r/isam.result
index 448dd7833a5..d80f47d3483 100644
--- a/mysql-test/r/isam.result
+++ b/mysql-test/r/isam.result
@@ -1,3 +1,4 @@
+drop table if exists t1,t2;
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a));
check table t1;
Table Op Msg_type Msg_text
@@ -15,42 +16,76 @@ test.t1 repair status OK
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
+drop table t1;
+create table t1 (a int not null auto_increment,b int, primary key (a)) type=isam;
+insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4);
+delete from t1 where a=4 or a=2;
+insert into t1 values (NULL,4),(NULL,5),(6,6);
+select * from t1;
a b
1 1
5 5
3 3
4 4
6 6
+delete from t1 where a=6;
+replace t1 values (3,1);
+replace t1 values (3,3);
+ALTER TABLE t1 add c int;
+insert into t1 values (NULL,6,6);
+select * from t1;
a b c
1 1 NULL
5 5 NULL
3 3 NULL
4 4 NULL
6 6 6
+drop table t1;
+create table t1 (a int,b text, index(a)) type=isam;
+Column 'a' is used with UNIQUE or INDEX but is not defined as NOT NULL
+create table t1 (a int,b text, index(b)) type=isam;
+BLOB column 'b' can't be used in key specification with the used table type
+create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=isam;
+Incorrect table definition; There can only be one auto column and it must be defined as a key
+create table t1 (ordid int(8), unique (ordid)) type=isam;
+Column 'ordid' is used with UNIQUE or INDEX but is not defined as NOT NULL
+drop table if exists t1;
+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);
+create table t2 type=isam select * from t1;
+optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
+check table t1,t2;
Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check error The handler for the table doesn't support check/repair
+repair table t1,t2;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t2 repair error The handler for the table doesn't support check/repair
+check table t2,t1;
Table Op Msg_type Msg_text
test.t2 check error The handler for the table doesn't support check/repair
test.t1 check status OK
+lock tables t1 write;
+check table t2,t1;
Table Op Msg_type Msg_text
test.t2 check error Table 't2' was not locked with LOCK TABLES
test.t1 check status OK
+show columns from t1;
Field Type Null Key Default Extra
a int(11) PRI 0
b int(11) MUL 0
c int(11) 0
+show full columns from t1;
Field Type Null Key Default Extra Privileges
a int(11) PRI 0 select,insert,update,references
b int(11) MUL 0 select,insert,update,references
c int(11) 0 select,insert,update,references
+show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment
t1 0 PRIMARY 1 a A 4 NULL NULL
t1 1 b 1 b A 1 NULL NULL
t1 1 b 2 c A 4 NULL NULL
-drop table t1;
+drop table t1,t2;
diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result
index 80194323919..ad5251b9110 100644
--- a/mysql-test/r/lock.result
+++ b/mysql-test/r/lock.result
@@ -43,21 +43,3 @@ Table Op Msg_type Msg_text
test.t2 check error Table 't2' was not locked with LOCK TABLES
unlock tables;
drop table t1,t2;
-create table t1(n int);
-insert into t1 values (1);
-lock tables t1 write;
- update low_priority t1 set n = 4;
- select n from t1;
-unlock tables;
-n
-4
-drop table t1;
-create table t1(n int);
-insert into t1 values (1);
-lock tables t1 read;
- update low_priority t1 set n = 4;
- select n from t1;
-unlock tables;
-n
-1
-drop table t1;
diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result
index d75d9aa0216..6fe8cc71185 100644
--- a/mysql-test/r/lock_multi.result
+++ b/mysql-test/r/lock_multi.result
@@ -1,4 +1,18 @@
+create table t1(n int);
+insert into t1 values (1);
+lock tables t1 write;
+ update low_priority t1 set n = 4;
+ select n from t1;
+unlock tables;
n
4
+drop table t1;
+create table t1(n int);
+insert into t1 values (1);
+lock tables t1 read;
+ update low_priority t1 set n = 4;
+ select n from t1;
+unlock tables;
n
1
+drop table t1;
diff --git a/mysql-test/r/rename.result b/mysql-test/r/rename.result
index 6128e630978..b2bb659502a 100644
--- a/mysql-test/r/rename.result
+++ b/mysql-test/r/rename.result
@@ -13,20 +13,20 @@ select * from t1;
1 table 1
1 table 1
rename table t1 to t2;
-Table './test/t2.frm' already exists
+Got one of the listed errors
rename table t1 to t1;
-Table './test/t1.frm' already exists
+Got one of the listed errors
rename table t3 to t4, t2 to t3, t1 to t2, t4 to t2;
-Table './test/t2.frm' already exists
+Got one of the listed errors
show tables like "t_";
Tables_in_test (t_)
t1
t2
t3
rename table t3 to t1, t2 to t3, t1 to t2, t4 to t1;
-Table './test/t1.frm' already exists
+Got one of the listed errors
rename table t3 to t4, t5 to t3, t1 to t2, t4 to t1;
-Can't find file: './test/t5.frm' (errno: 2)
+Got one of the listed errors
select * from t1;
1 table 1
1 table 1
diff --git a/mysql-test/r/rpl000001.result b/mysql-test/r/rpl000001.result
index a13bd93e46a..9cd0496d16e 100644
--- a/mysql-test/r/rpl000001.result
+++ b/mysql-test/r/rpl000001.result
@@ -37,8 +37,8 @@ create table t1(n int);
create table t2(id int);
insert into t2 values(connection_id());
create temporary table t1_temp(n int);
-insert into t1_temp select get_lock('crash_lock', 1) from t2;
- update t1 set n = n + get_lock('crash_lock', 2);
+insert into t1_temp select get_lock('crash_lock%20C', 1) from t2;
+ update t1 set n = n + get_lock('crash_lock%20C', 2);
select (@id := id) - id from t2;
(@id := id) - id
0
diff --git a/mysql-test/r/tablelock.result b/mysql-test/r/tablelock.result
index 094855b473f..2ffd8f928a9 100644
--- a/mysql-test/r/tablelock.result
+++ b/mysql-test/r/tablelock.result
@@ -1,3 +1,4 @@
+drop table if exists t1,t2;
create table t1 ( n int auto_increment primary key);
lock tables t1 write;
insert into t1 values(NULL);
@@ -39,11 +40,9 @@ drop table t1;
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
lock tables t1 write,t1 as b write, t2 write, t2 as c read;
-drop table t1;
-drop table t2;
+drop table t1,t2;
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
lock tables t1 write,t1 as b write, t2 write, t2 as c read;
-drop table t2;
-drop table t1;
+drop table t2,t1;
unlock tables;
diff --git a/mysql-test/t/rename.test b/mysql-test/t/rename.test
index 2a9cf113a47..ce4651d8de3 100644
--- a/mysql-test/t/rename.test
+++ b/mysql-test/t/rename.test
@@ -12,13 +12,19 @@ select * from t1;
rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1;
rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1;
select * from t1;
+
# The following should give errors
-!$1050 rename table t1 to t2;
-!$1050 rename table t1 to t1;
-!$1050 rename table t3 to t4, t2 to t3, t1 to t2, t4 to t2;
+--error 1050,1050
+rename table t1 to t2;
+--error 1050,1050
+rename table t1 to t1;
+--error 1050,1050
+rename table t3 to t4, t2 to t3, t1 to t2, t4 to t2;
show tables like "t_";
-!$1050 rename table t3 to t1, t2 to t3, t1 to t2, t4 to t1;
-!$1017 rename table t3 to t4, t5 to t3, t1 to t2, t4 to t1;
+--error 1050,1050
+rename table t3 to t1, t2 to t3, t1 to t2, t4 to t1;
+--error 1017,1017
+rename table t3 to t4, t5 to t3, t1 to t2, t4 to t1;
select * from t1;
select * from t2;