Commit 0df7a43e authored by Olivier Bertrand's avatar Olivier Bertrand

- Commit merged files

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/fix.result
  mysql-test/suite/connect/t/csv.test
  mysql-test/suite/connect/t/dbf.test
  mysql-test/suite/connect/t/fix.test
  mysql-test/suite/connect/t/grant.inc
parents b01297fa 801c27ca
#
# Testing grants
# Beginning of grant.inc
#
GRANT ALL PRIVILEGES ON *.* TO user@localhost;
REVOKE FILE ON *.* FROM user@localhost;
......@@ -75,6 +75,9 @@ DROP VIEW v1;
DROP TABLE t1;
DROP USER user@localhost;
#
# End of grant.inc
#
#
# Testing errors
#
CREATE TABLE t1
......
#
# Beginning of grant.inc
#
GRANT ALL PRIVILEGES ON *.* TO user@localhost;
REVOKE FILE ON *.* FROM user@localhost;
SELECT user();
user()
user@localhost
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=CSV;
Warnings:
Warning 1105 No file name. Table will use t1.CSV
INSERT INTO t1 VALUES (10);
SELECT * FROM t1;
a
10
UPDATE t1 SET a=20;
SELECT * FROM t1;
a
20
DELETE FROM t1;
SELECT * FROM t1;
a
INSERT INTO t1 VALUES(10);
TRUNCATE TABLE t1;
SELECT * FROM t1;
a
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
a
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=CSV FILE_NAME='t1.EXT';
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
SELECT user();
user()
root@localhost
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=CSV FILE_NAME='t1.EXT';
INSERT INTO t1 VALUES (10);
SELECT user();
user()
user@localhost
INSERT INTO t1 VALUES (10);
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
SELECT * FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
UPDATE t1 SET a=20;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DELETE FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
TRUNCATE TABLE t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
ALTER TABLE t1 READONLY=1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DROP TABLE t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
CREATE VIEW v1 AS SELECT * FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
# Testing a VIEW created with FILE privileges but accessed with no FILE
SELECT user();
user()
root@localhost
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT user();
user()
user@localhost
SELECT * FROM v1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
INSERT INTO v1 VALUES (2);
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
UPDATE v1 SET a=123;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DELETE FROM v1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DROP VIEW v1;
DROP TABLE t1;
DROP USER user@localhost;
#
# End of grant.inc
#
SET NAMES utf8;
#
# Testing errors
......
#
# Beginning of grant.inc
#
GRANT ALL PRIVILEGES ON *.* TO user@localhost;
REVOKE FILE ON *.* FROM user@localhost;
SELECT user();
user()
user@localhost
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF;
Warnings:
Warning 1105 No file name. Table will use t1.DBF
INSERT INTO t1 VALUES (10);
SELECT * FROM t1;
a
10
UPDATE t1 SET a=20;
SELECT * FROM t1;
a
20
DELETE FROM t1;
SELECT * FROM t1;
a
INSERT INTO t1 VALUES(10);
TRUNCATE TABLE t1;
SELECT * FROM t1;
a
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
a
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.EXT';
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
SELECT user();
user()
root@localhost
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.EXT';
INSERT INTO t1 VALUES (10);
SELECT user();
user()
user@localhost
INSERT INTO t1 VALUES (10);
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
SELECT * FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
UPDATE t1 SET a=20;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DELETE FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
TRUNCATE TABLE t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
ALTER TABLE t1 READONLY=1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DROP TABLE t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
CREATE VIEW v1 AS SELECT * FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
# Testing a VIEW created with FILE privileges but accessed with no FILE
SELECT user();
user()
root@localhost
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT user();
user()
user@localhost
SELECT * FROM v1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
INSERT INTO v1 VALUES (2);
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
UPDATE v1 SET a=123;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DELETE FROM v1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DROP VIEW v1;
DROP TABLE t1;
DROP USER user@localhost;
#
# End of grant.inc
#
#
# Testing errors
#
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.dbf';
......
#
# Beginning of grant.inc
#
GRANT ALL PRIVILEGES ON *.* TO user@localhost;
REVOKE FILE ON *.* FROM user@localhost;
SELECT user();
user()
user@localhost
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=FIX;
Warnings:
Warning 1105 No file name. Table will use t1.FIX
INSERT INTO t1 VALUES (10);
SELECT * FROM t1;
a
10
UPDATE t1 SET a=20;
SELECT * FROM t1;
a
20
DELETE FROM t1;
SELECT * FROM t1;
a
INSERT INTO t1 VALUES(10);
TRUNCATE TABLE t1;
SELECT * FROM t1;
a
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM v1;
a
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='t1.EXT';
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
SELECT user();
user()
root@localhost
CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='t1.EXT';
INSERT INTO t1 VALUES (10);
SELECT user();
user()
user@localhost
INSERT INTO t1 VALUES (10);
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
SELECT * FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
UPDATE t1 SET a=20;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DELETE FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
TRUNCATE TABLE t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
ALTER TABLE t1 READONLY=1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DROP TABLE t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
CREATE VIEW v1 AS SELECT * FROM t1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
# Testing a VIEW created with FILE privileges but accessed with no FILE
SELECT user();
user()
root@localhost
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT user();
user()
user@localhost
SELECT * FROM v1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
INSERT INTO v1 VALUES (2);
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
UPDATE v1 SET a=123;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DELETE FROM v1;
ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
DROP VIEW v1;
DROP TABLE t1;
DROP USER user@localhost;
#
# End of grant.inc
#
#
# Testing errors
#
CREATE TABLE t1
......
let $MYSQLD_DATADIR= `select @@datadir`;
let $FILE_TYPE=CSV;
let $FILE_EXT=CSV;
--source grant.inc
--copy_file $MYSQL_TEST_DIR/suite/connect/std_data/people.csv $MYSQLD_DATADIR/test/people.csv
SET NAMES utf8;
......
let $MYSQLD_DATADIR= `select @@datadir`;
let $FILE_TYPE=DBF;
let $FILE_EXT=DBF;
--source grant.inc
--echo #
--echo # Testing errors
......
let $MYSQLD_DATADIR= `select @@datadir`;
let $FILE_TYPE=FIX;
let $FILE_EXT=FIX;
--source grant.inc
--copy_file $MYSQL_TEST_DIR/suite/connect/std_data/dept.dat $MYSQLD_DATADIR/test/dept.dat
--copy_file $MYSQL_TEST_DIR/suite/connect/std_data/boys.txt $MYSQLD_DATADIR/test/boys.txt
--copy_file $MYSQL_TEST_DIR/suite/connect/std_data/boyswin.txt $MYSQLD_DATADIR/test/boyswin.txt
......
--echo #
--echo # Testing grants
--echo # Beginning of grant.inc
--echo #
GRANT ALL PRIVILEGES ON *.* TO user@localhost;
REVOKE FILE ON *.* FROM user@localhost;
......@@ -68,3 +68,7 @@ DROP VIEW v1;
DROP TABLE t1;
--remove_file $MYSQLD_DATADIR/test/t1.EXT
DROP USER user@localhost;
--echo #
--echo # End of grant.inc
--echo #
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