Commit 7a7ff18c authored by Olivier Bertrand's avatar Olivier Bertrand

- Update test results and add a new one (UPD)

added:
  mysql-test/suite/connect/r/upd.result
  mysql-test/suite/connect/t/upd.test
modified:
  mysql-test/suite/connect/r/bin.result
  mysql-test/suite/connect/r/csv.result
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/r/dir.result
  mysql-test/suite/connect/r/fix.result
  mysql-test/suite/connect/r/index.result
  mysql-test/suite/connect/r/ini.result
  mysql-test/suite/connect/r/vec.result
parent 6a15b5f8
...@@ -103,7 +103,7 @@ INSERT INTO t1 VALUES (7777,'BILL','1973-06-30',4444,5555.555,777); ...@@ -103,7 +103,7 @@ INSERT INTO t1 VALUES (7777,'BILL','1973-06-30',4444,5555.555,777);
ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT
ALTER TABLE t1 READONLY=NO; ALTER TABLE t1 READONLY=NO;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -124,7 +124,7 @@ fig name birth id salary dept ...@@ -124,7 +124,7 @@ fig name birth id salary dept
7777 BILL 1973-06-30 4444 5555.56 777 7777 BILL 1973-06-30 4444 5555.56 777
ALTER TABLE t1 READONLY=YES; ALTER TABLE t1 READONLY=YES;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -64,7 +64,7 @@ Nabucho 2003-08-12 2 ...@@ -64,7 +64,7 @@ Nabucho 2003-08-12 2
RONALD 1980-02-26 4 RONALD 1980-02-26 4
ALTER TABLE t1 READONLY=no; ALTER TABLE t1 READONLY=no;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -81,7 +81,7 @@ RONALD 1980-02-26 4 ...@@ -81,7 +81,7 @@ RONALD 1980-02-26 4
BILL 1973-06-30 5 BILL 1973-06-30 5
ALTER TABLE t1 READONLY=1; ALTER TABLE t1 READONLY=1;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -69,7 +69,7 @@ a ...@@ -69,7 +69,7 @@ a
20 20
ALTER TABLE t1 READONLY=Yes; ALTER TABLE t1 READONLY=Yes;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -85,7 +85,7 @@ TRUNCATE TABLE t1; ...@@ -85,7 +85,7 @@ TRUNCATE TABLE t1;
ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT
ALTER TABLE t1 READONLY=NO; ALTER TABLE t1 READONLY=NO;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -532,7 +532,7 @@ Flags 00 ...@@ -532,7 +532,7 @@ Flags 00
-------- -------- -------- --------
ALTER TABLE t1 MODIFY a VARCHAR(10) NOT NULL; ALTER TABLE t1 MODIFY a VARCHAR(10) NOT NULL;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -14,7 +14,7 @@ boys2 .txt 282 ...@@ -14,7 +14,7 @@ boys2 .txt 282
boyswin .txt 288 boyswin .txt 288
ALTER TABLE t1 OPTION_LIST='subdir=0'; ALTER TABLE t1 OPTION_LIST='subdir=0';
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -23,7 +23,7 @@ id ...@@ -23,7 +23,7 @@ id
10 10
ALTER TABLE t1 READONLY=1; ALTER TABLE t1 READONLY=1;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -39,7 +39,7 @@ TRUNCATE TABLE t1; ...@@ -39,7 +39,7 @@ TRUNCATE TABLE t1;
ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT
ALTER TABLE t1 READONLY=0; ALTER TABLE t1 READONLY=0;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -38,7 +38,7 @@ SUM(brut) ...@@ -38,7 +38,7 @@ SUM(brut)
# #
ALTER TABLE t1 MAPPED=yes; ALTER TABLE t1 MAPPED=yes;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SELECT * FROM t1 LIMIT 10; SELECT * FROM t1 LIMIT 10;
matricule nom prenom sexe aanais mmnais ddentree ddnom brut net service sitmat formation matricule nom prenom sexe aanais mmnais ddentree ddnom brut net service sitmat formation
5745 ESCOURCHE BENEDICTE 2 1935 7 1962-12-01 1994-05-01 18345 14275.50 0 M TECHN 5745 ESCOURCHE BENEDICTE 2 1935 7 1962-12-01 1994-05-01 18345 14275.50 0 M TECHN
......
...@@ -186,7 +186,7 @@ FR 20 ...@@ -186,7 +186,7 @@ FR 20
RU 30 RU 30
ALTER TABLE t1 READONLY=1; ALTER TABLE t1 READONLY=1;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -203,7 +203,7 @@ TRUNCATE TABLE t1; ...@@ -203,7 +203,7 @@ TRUNCATE TABLE t1;
ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT
ALTER TABLE t1 READONLY=0; ALTER TABLE t1 READONLY=0;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
This diff is collapsed.
...@@ -95,7 +95,7 @@ t1vec .blk 8 ...@@ -95,7 +95,7 @@ t1vec .blk 8
# #
ALTER TABLE t1 READONLY=yes; ALTER TABLE t1 READONLY=yes;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -112,7 +112,7 @@ TRUNCATE TABLE t1; ...@@ -112,7 +112,7 @@ TRUNCATE TABLE t1;
ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT ERROR HY000: Got error 174 'Cannot modify this read/only protected table' from CONNECT
ALTER TABLE t1 READONLY=no; ALTER TABLE t1 READONLY=no;
Warnings: Warnings:
Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use on your own risk Warning 1105 The current version of CONNECT did not check what you changed in ALTER. Use at your own risk
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
let $MYSQLD_DATADIR= `select @@datadir`;
--copy_file $MYSQL_TEST_DIR/suite/connect/std_data/employee.dat $MYSQLD_DATADIR/test/employee.dat
CREATE TABLE employee
(
serialno CHAR(5) NOT NULL,
name VARCHAR(12) NOT NULL FLAG=6,
sex TINYINT(1) NOT NULL,
title VARCHAR(15) NOT NULL FLAG=20,
manager CHAR(5) NOT NULL,
department CHAR(4) NOT NULL FLAG=41,
secretary CHAR(5) NOT NULL FLAG=46,
salary DOUBLE(8,2) NOT NULL FLAG=52
) ENGINE=connect TABLE_TYPE=fix FILE_NAME='employee.dat' ENDING=1;
SELECT * FROM employee;
DELIMITER //;
CREATE PROCEDURE test.tst_up() DETERMINISTIC
BEGIN
SELECT * FROM t1;
UPDATE t1 SET salary = salary + 1, title = 'RESEARCH' WHERE title = 'SCIENTIST';
UPDATE t1 SET salary = salary + 1, title = 'TECHNICIAN' WHERE title = 'ENGINEER';
UPDATE t1 SET title = 'PUPPET' WHERE name = 'TONGHO';
UPDATE t1 SET salary = 0. WHERE title = 'XXX';
SELECT * FROM t1;
DELETE FROM t1 WHERE title = 'SECRETARY';
DELETE FROM t1 WHERE title = 'DIRECTOR';
DELETE FROM t1 WHERE title = 'TYPIST';
SELECT * FROM t1;
DELETE FROM t1 LIMIT 3;
INSERT INTO t1(serialno, name, title, salary) VALUES('66666','NEWMAN','ENGINEER',10000.80);
SELECT * FROM t1;
DROP TABLE t1;
END//
DELIMITER ;//
--echo #
--echo # Testing DOS table changes
--echo #
CREATE TABLE t1 ENGINE=connect AS SELECT * FROM employee;
CALL test.tst_up();
--echo #
--echo # Testing FIX table changes
--echo #
CREATE TABLE t1 ENGINE=connect TABLE_TYPE=fix AS SELECT * FROM employee;
CALL test.tst_up();
--echo #
--echo # Testing CSV table changes
--echo #
CREATE TABLE t1 ENGINE=connect TABLE_TYPE=csv AS SELECT * FROM employee;
CALL test.tst_up();
--echo #
--echo # Testing DBF table changes
--echo #
CREATE TABLE t1 ENGINE=connect TABLE_TYPE=dbf AS SELECT * FROM employee;
CALL test.tst_up();
--echo #
--echo # Testing BIN table changes
--echo #
CREATE TABLE t1 ENGINE=connect TABLE_TYPE=bin AS SELECT * FROM employee;
CALL test.tst_up();
--echo #
--echo # Testing VEC table changes
--echo #
CREATE TABLE t1 ENGINE=connect TABLE_TYPE=vec MAX_ROWS=30 AS SELECT * FROM employee;
CALL test.tst_up();
--echo #
--echo # Testing INI table changes
--echo #
CREATE TABLE t1
(
serialno CHAR(5) NOT NULL FLAG=1,
name VARCHAR(12) NOT NULL,
sex TINYINT(1),
title VARCHAR(15) NOT NULL,
manager CHAR(5),
department CHAR(4),
secretary CHAR(5),
salary DOUBLE(8,2) NOT NULL
) ENGINE=connect TABLE_TYPE=ini;
INSERT INTO t1 SELECT * FROM employee;
CALL test.tst_up();
--echo #
--echo # Testing XML table changes (must be in a separate test)
--echo #
#CREATE TABLE t1 ENGINE=connect TABLE_TYPE=xml option_list='rownode=dd' AS SELECT * FROM employee;
#CALL test.tst_up();
DROP PROCEDURE test.tst_up;
DROP TABLE employee;
--remove_file $MYSQLD_DATADIR/test/employee.dat
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