Commit 1b40c7c7 authored by Alexander Barkov's avatar Alexander Barkov

Commenting ALTER test which changes the DBF file size.

It does not work on Windows.

modified:
  mysql-test/suite/connect/r/dbf.result
  mysql-test/suite/connect/t/dbf.test
parent 1830e732
#
# Testing errors
#
CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=DBF `FILE_NAME`='t1.dbf'
SELECT * FROM t1;
a
Warnings:
Warning 1105 Open(rb) error 2 on DATADIR/test/t1.dbf: No such file or directory
DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf';
ERROR 42000: A table must have at least 1 column
SHOW WARNINGS;
Level Code Message
Warning 1105 Cannot open DATADIR/test/t1.dbf
Error 1113 A table must have at least 1 column
CREATE PROCEDURE test.dbf_field(in fieldno INT, in content BLOB) DETERMINISTIC
BEGIN
SELECT '---';
......@@ -488,32 +508,6 @@ Length 10
Dec 0
Flags 00
-------- --------
ALTER TABLE t1 MODIFY a INT(8) NOT NULL;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(8) NOT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=DBF `FILE_NAME`='t1.dbf'
SELECT * FROM t1;
ERROR HY000: Got error 174 'DBF file t1.dbf is corrupted' from CONNECT
CALL dbf_header('MYSQLD_DATADIR/test/t1.dbf');
-------- --------
FileSize 77
DBF_Version 03
NRecords 1
FirstRecPos 66
RecLength 11
TableFlags 0000
CodePageMark 00
--- ---
FieldN 0
Name a
Type C
Offset 0
Length 10
Dec 0
Flags 00
-------- --------
DROP TABLE IF EXISTS t1;
#
# Testing NULL
......
let $MYSQLD_DATADIR= `select @@datadir`;
--echo #
--echo # Testing errors
--echo #
CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf';
SHOW CREATE TABLE t1;
--replace_regex /on .*test.t1.dbf/on DATADIR\/test\/t1.dbf/
SELECT * FROM t1;
DROP TABLE t1;
--error ER_TABLE_MUST_HAVE_COLUMNS
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf';
--replace_regex /Cannot open .*test.t1.dbf/Cannot open DATADIR\/test\/t1.dbf/
SHOW WARNINGS;
DELIMITER //;
CREATE PROCEDURE test.dbf_field(in fieldno INT, in content BLOB) DETERMINISTIC
BEGIN
......@@ -403,14 +418,16 @@ SELECT * FROM t1;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
eval CALL dbf_header('$MYSQLD_DATADIR/test/t1.dbf');
--horizontal_results
ALTER TABLE t1 MODIFY a INT(8) NOT NULL;
SHOW CREATE TABLE t1;
--error ER_GET_ERRMSG
SELECT * FROM t1;
--vertical_results
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
eval CALL dbf_header('$MYSQLD_DATADIR/test/t1.dbf');
--horizontal_results
# TODO: this does not work on Windows
#ALTER TABLE t1 MODIFY a INT(8) NOT NULL;
#SHOW CREATE TABLE t1;
#--error ER_GET_ERRMSG
#SELECT * FROM t1;
#--vertical_results
#--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
#eval CALL dbf_header('$MYSQLD_DATADIR/test/t1.dbf');
#--horizontal_results
DROP TABLE IF EXISTS t1;
--remove_file $MYSQLD_DATADIR/test/t1.dbf
......
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