~mathiaz/ubuntu/lucid/mysql-dfsg-5.1/zap-bug-552053

« back to all changes in this revision

Viewing changes to mysql-test/r/grant.result

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-06-25 12:55:45 UTC
  • mfrom: (1.1.2 upstream) (0.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20090625125545-m8ogs96zzsri74xe
Tags: 5.1.34-1ubuntu1
* Merge from debian experimental (and 5.0 from main), remaining changes:
  - debian/mysql-server-5.1.config:
    + ask for MySQL root password at priority high instead of medium so
      that the password prompt is seen on a default install. (LP: #319843)
    + don't ask for root password when upgrading from a 5.0 install.
  - debian/control:
    + Make libmysqlclient16-dev a transitional package depending on
      libmysqlclient-dev.
    + Make libmysqlclient-dev conflict with libmysqlclient15-dev.
    + Don't build mysql-server, mysql-client, mysql-common and
      libmysqlclient15-dev binary packages since they're still provided
      by mysql-dfsg-5.0.
    + Make mysql-{client,server}-5.1 packages conflict and
      replace mysql-{client,server}-5.0, but not provide
      mysql-{client,server}.
    + Depend on a specific version of mysql-common rather than the src
      version of mysql-dfsg-5.1 since mysql-common is currently part of
      mysql-dfsg-5.0.
    + Lower mailx from a Recommends to a Suggests to avoid pulling in
      a full MTA on all installs of mysql-server. (LP: #259477)
  - debian/rules:
    + added -fno-strict-aliasing to CFLAGS to get around mysql testsuite
      build failures.
    + install mysql-test and sql-bench to /usr/share/mysql/ rather than
      /usr/.
  - debian/additions/debian-start.inc.sh: support ANSI mode (LP: #310211)
  - Add AppArmor profile:
    - debian/apparmor-profile: apparmor profile.
    - debian/rules, debian/mysql-server-5.0.files: install apparmor profile.
    - debian/mysql-server-5.0.dirs: add etc/apparmor.d/force-complain
    - debian/mysql-server-5.0.postrm: remove symlink in force-complain/ on
      purge.
    - debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    - debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    - debian/mysql-server-5.1.postinst: reload apparmor profiles.
  - debian/additions/my.cnf: remove language option. Error message files are
    located in a different directory in MySQL 5.0. Setting the language
    option to use /usr/share/mysql/english breaks 5.0. Both 5.0 and 5.1
    use a default value that works. (LP: #316974)
  - debian/mysql-server-5.1.mysql.init:
    + Clearly indicate that we do not support running multiple instances
      of mysqld by duplicating the init script.
      (closes: #314785, #324834, #435165, #444216)
    + Properly parameterize all existing references to the mysql config
      file (/etc/mysql/my.cnf).
  - debian/mysql-server-5.0.postinst: Clear out the second password
    when setting up mysql. (LP: #344816)
  - mysql-server-core-5.1 package for files needed by Akonadi:
    + debian/control: create mysql-server-core-5.1 package.
    + debian/mysql-server-core-5.1.files, debian/mysql-server-5.1.files:
      move core mysqld files to mysql-server-core-5.1 package.
  - Don't package sql-bench and mysql-test file.
* Dropped changes:
  - debian/patches/92_ssl_test_cert.dpatch: certificate expiration in
    test suite (LP: #323755). Included upstream.
* Dropped from 5.0:
  - apparmor profile:
    - debian/control: Recommends apparmor >= 2.1+1075-0ubuntu6. All version
      of apparmor-profile (>hardy) are higher than this version.
    - debian/mysql-server-5.0.preinst: create symlink for force-complain/
      on pre-feisty upgrades, upgrades where apparmor-profiles profile is
      unchanged (ie non-enforcing) and upgrades where the profile
      doesn't exist. Support for pre-hardy upgrades is no longer needed.
* debian/mysql-server-5.1.postinst: fix debian-sys-maint user creation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
1
2
SET GLOBAL log_bin_trust_function_creators = 1;
2
3
drop table if exists t1;
3
4
drop database if exists mysqltest;
163
164
Warning 1364    Field 'ssl_cipher' doesn't have a default value
164
165
Warning 1364    Field 'x509_issuer' doesn't have a default value
165
166
Warning 1364    Field 'x509_subject' doesn't have a default value
166
 
insert into mysql.db (host, db, user, select_priv) values 
 
167
insert into mysql.db (host, db, user, select_priv) values
167
168
('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
168
169
alter table mysql.db order by db asc;
169
170
flush privileges;
263
264
SET NAMES koi8r;
264
265
CREATE DATABASE ��;
265
266
USE ��;
266
 
CREATE TABLE ��� (��� int);
 
267
CREATE TABLE ��� (��� INT);
267
268
GRANT SELECT ON ��.* TO ����@localhost;
268
269
SHOW GRANTS FOR ����@localhost;
269
270
Grants for ����@localhost
382
383
grant select (b) on mysqltest_1.t2 to mysqltest_3@localhost;
383
384
grant select (c) on mysqltest_2.t1 to mysqltest_3@localhost;
384
385
grant update (d) on mysqltest_2.t2 to mysqltest_3@localhost;
385
 
SELECT * FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES 
386
 
WHERE GRANTEE = '''mysqltest_3''@''localhost''' 
387
 
ORDER BY TABLE_NAME,COLUMN_NAME,PRIVILEGE_TYPE;
 
386
SELECT * FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES
 
387
WHERE GRANTEE = '''mysqltest_3''@''localhost'''
 
388
 ORDER BY TABLE_NAME,COLUMN_NAME,PRIVILEGE_TYPE;
388
389
GRANTEE TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     PRIVILEGE_TYPE  IS_GRANTABLE
389
390
'mysqltest_3'@'localhost'       NULL    mysqltest_1     t1      a       UPDATE  NO
390
391
'mysqltest_3'@'localhost'       NULL    mysqltest_2     t1      c       SELECT  NO
391
392
'mysqltest_3'@'localhost'       NULL    mysqltest_1     t2      b       SELECT  NO
392
393
'mysqltest_3'@'localhost'       NULL    mysqltest_2     t2      d       UPDATE  NO
393
394
SELECT * FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES
394
 
WHERE GRANTEE = '''mysqltest_3''@''localhost''' 
395
 
ORDER BY TABLE_NAME,PRIVILEGE_TYPE;
 
395
WHERE GRANTEE = '''mysqltest_3''@''localhost'''
 
396
 ORDER BY TABLE_NAME,PRIVILEGE_TYPE;
396
397
GRANTEE TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      PRIVILEGE_TYPE  IS_GRANTABLE
397
398
SELECT * from INFORMATION_SCHEMA.SCHEMA_PRIVILEGES
398
 
WHERE GRANTEE = '''mysqltest_3''@''localhost''' 
399
 
ORDER BY TABLE_SCHEMA,PRIVILEGE_TYPE;
 
399
WHERE GRANTEE = '''mysqltest_3''@''localhost'''
 
400
 ORDER BY TABLE_SCHEMA,PRIVILEGE_TYPE;
400
401
GRANTEE TABLE_CATALOG   TABLE_SCHEMA    PRIVILEGE_TYPE  IS_GRANTABLE
401
402
SELECT * from INFORMATION_SCHEMA.USER_PRIVILEGES
402
403
WHERE GRANTEE = '''mysqltest_3''@''localhost'''
458
459
Alter   Tables  To alter the table
459
460
Alter routine   Functions,Procedures    To alter or drop stored functions/procedures
460
461
Create  Databases,Tables,Indexes        To create new databases and tables
461
 
Create routine  Functions,Procedures    To use CREATE FUNCTION/PROCEDURE
 
462
Create routine  Databases       To use CREATE FUNCTION/PROCEDURE
462
463
Create temporary tables Databases       To use CREATE TEMPORARY TABLE
463
464
Create view     Tables  To create new views
464
465
Create user     Server Admin    To create new users
883
884
drop table t2;
884
885
drop table t1;
885
886
CREATE DATABASE mysqltest3;
886
 
use mysqltest3;
 
887
USE mysqltest3;
887
888
CREATE TABLE t_nn (c1 INT);
888
889
CREATE VIEW  v_nn AS SELECT * FROM t_nn;
889
890
CREATE DATABASE mysqltest2;
890
 
use mysqltest2;
 
891
USE mysqltest2;
891
892
CREATE TABLE t_nn (c1 INT);
892
893
CREATE VIEW  v_nn AS SELECT * FROM t_nn;
893
894
CREATE VIEW  v_yn AS SELECT * FROM t_nn;
957
958
DROP DATABASE mysqltest3;
958
959
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'mysqltest_1'@'localhost';
959
960
DROP USER 'mysqltest_1'@'localhost';
960
 
use test;
 
961
USE test;
961
962
create user mysqltest1_thisisreallytoolong;
962
963
ERROR HY000: String 'mysqltest1_thisisreallytoolong' is too long for user name (should be no longer than 16)
963
964
CREATE DATABASE mysqltest1;
1195
1196
DROP DATABASE mysqltest2;
1196
1197
DROP USER mysqltest_1@localhost;
1197
1198
DROP USER mysqltest_2@localhost;
1198
 
use test;
 
1199
USE test;
1199
1200
CREATE TABLE t1 (f1 int, f2 int);
1200
1201
INSERT INTO t1 VALUES(1,1), (2,2);
1201
1202
CREATE DATABASE db27878;
1202
1203
GRANT UPDATE(f1) ON t1 TO 'mysqltest_1'@'localhost';
1203
1204
GRANT SELECT ON `test`.* TO 'mysqltest_1'@'localhost';
1204
1205
GRANT ALL ON db27878.* TO 'mysqltest_1'@'localhost';
1205
 
use db27878;
 
1206
USE db27878;
1206
1207
CREATE SQL SECURITY INVOKER VIEW db27878.v1 AS SELECT * FROM test.t1;
1207
 
use db27878;
 
1208
USE db27878;
1208
1209
UPDATE v1 SET f2 = 4;
1209
1210
ERROR HY000: View 'db27878.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
1210
1211
SELECT * FROM test.t1;
1216
1217
REVOKE ALL ON db27878.* FROM 'mysqltest_1'@'localhost';
1217
1218
DROP USER mysqltest_1@localhost;
1218
1219
DROP DATABASE db27878;
1219
 
use test;
 
1220
USE test;
1220
1221
DROP TABLE t1;
1221
1222
#
1222
1223
#  Bug#33275 Server crash when creating temporary table mysql.user
1354
1355
Warning 1403    There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn2'
1355
1356
DROP PROCEDURE sp3;
1356
1357
DROP USER 'userbug33464'@'localhost';
1357
 
use test;
 
1358
USE test;
1358
1359
DROP DATABASE dbbug33464;
1359
 
End of 5.1 tests
 
1360
SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;