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

« back to all changes in this revision

Viewing changes to mysql-test/t/outfile.test

  • 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
1
disable_query_log;
2
2
-- source include/test_outfile.inc
3
 
# Server are started in "var/master-data", so "../tmp" will be "var/tmp"
4
 
eval set @tmpdir="../tmp";
 
3
# Server are started in "var/master-data", so "../../tmp" will be "var/tmp"
 
4
eval set @tmpdir="../../tmp";
5
5
enable_query_log;
6
6
-- source include/have_outfile.inc
7
7
 
 
8
# Save the initial number of concurrent sessions
 
9
--source include/count_sessions.inc
 
10
 
 
11
 
8
12
#
9
13
# test of into outfile|dumpfile
10
14
#
16
20
create table t1 (`a` blob);
17
21
insert into t1 values("hello world"),("Hello mars"),(NULL);
18
22
disable_query_log;
19
 
eval select * into outfile "../tmp/outfile-test.1" from t1;
 
23
eval select * into outfile "../../tmp/outfile-test.1" from t1;
20
24
enable_query_log;
21
25
select load_file(concat(@tmpdir,"/outfile-test.1"));
22
26
disable_query_log;
23
 
eval select * into dumpfile "../tmp/outfile-test.2" from t1 limit 1;
 
27
eval select * into dumpfile "../../tmp/outfile-test.2" from t1 limit 1;
24
28
enable_query_log;
25
29
select load_file(concat(@tmpdir,"/outfile-test.2"));
26
30
disable_query_log;
27
 
eval select * into dumpfile "../tmp/outfile-test.3" from t1 where a is null;
 
31
eval select * into dumpfile "../../tmp/outfile-test.3" from t1 where a is null;
28
32
enable_query_log;
29
33
select load_file(concat(@tmpdir,"/outfile-test.3"));
30
34
 
32
36
 
33
37
disable_query_log;
34
38
--error ER_FILE_EXISTS_ERROR
35
 
eval select * into outfile "../tmp/outfile-test.1" from t1;
36
 
 
37
 
--error ER_FILE_EXISTS_ERROR
38
 
eval select * into dumpfile "../tmp/outfile-test.2" from t1;
39
 
 
40
 
--error ER_FILE_EXISTS_ERROR
41
 
eval select * into dumpfile "../tmp/outfile-test.3" from t1;
 
39
eval select * into outfile "../../tmp/outfile-test.1" from t1;
 
40
 
 
41
--error ER_FILE_EXISTS_ERROR
 
42
eval select * into dumpfile "../../tmp/outfile-test.2" from t1;
 
43
 
 
44
--error ER_FILE_EXISTS_ERROR
 
45
eval select * into dumpfile "../../tmp/outfile-test.3" from t1;
42
46
enable_query_log;
43
47
select load_file(concat(@tmpdir,"/outfile-test.not-exist"));
44
48
--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.1
46
50
--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.3
47
51
drop table t1;
48
52
 
49
 
# Bug#8191
 
53
# Bug#8191 SELECT INTO OUTFILE insists on FROM clause
50
54
disable_query_log;
51
 
eval select 1 into outfile "../tmp/outfile-test.4";
 
55
eval select 1 into outfile "../../tmp/outfile-test.4";
52
56
enable_query_log;
53
57
select load_file(concat(@tmpdir,"/outfile-test.4"));
54
58
--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4
55
59
 
56
60
#
57
 
# Bug #5382: 'explain select into outfile' crashes the server
 
61
# Bug#5382 'explain select into outfile' crashes the server
58
62
#
59
63
 
60
64
CREATE TABLE t1 (a INT);
61
 
EXPLAIN 
 
65
EXPLAIN
62
66
  SELECT *
63
67
  INTO OUTFILE '/tmp/t1.txt'
64
68
  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n'
68
72
# End of 4.1 tests
69
73
 
70
74
#
71
 
# Bug#13202  SELECT * INTO OUTFILE ... FROM information_schema.schemata now fails
 
75
# Bug#13202 SELECT * INTO OUTFILE ... FROM information_schema.schemata now fails
72
76
#
73
77
disable_query_log;
74
 
eval SELECT * INTO OUTFILE "../tmp/outfile-test.4"
 
78
eval SELECT * INTO OUTFILE "../../tmp/outfile-test.4"
75
79
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
76
80
FROM information_schema.schemata LIMIT 0, 5;
77
81
# enable_query_log;
79
83
 
80
84
use information_schema;
81
85
# disable_query_log;
82
 
eval SELECT * INTO OUTFILE "../tmp/outfile-test.4"
 
86
eval SELECT * INTO OUTFILE "../../tmp/outfile-test.4"
83
87
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
84
88
FROM schemata LIMIT 0, 5;
85
89
enable_query_log;
107
111
 
108
112
--error ER_DBACCESS_DENIED_ERROR
109
113
eval select schema_name
110
 
into outfile "../tmp/outfile-test.4"
 
114
into outfile "../../tmp/outfile-test.4"
111
115
fields terminated by ',' optionally enclosed by '"'
112
116
 lines terminated by '\n'
113
117
from information_schema.schemata
114
118
where schema_name like 'mysqltest';
115
119
 
116
120
connection default;
 
121
disconnect con28181_1;
117
122
grant file on *.* to user_1@localhost;
118
123
 
119
124
connect (con28181_2,localhost,user_1,,mysqltest);
120
125
eval select schema_name
121
 
into outfile "../tmp/outfile-test.4"
 
126
into outfile "../../tmp/outfile-test.4"
122
127
fields terminated by ',' optionally enclosed by '"'
123
128
 lines terminated by '\n'
124
129
from information_schema.schemata
125
130
where schema_name like 'mysqltest';
126
131
 
127
132
connection default;
 
133
disconnect con28181_2;
128
134
--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4
129
135
use test;
130
136
revoke all privileges on *.* from user_1@localhost;
131
137
drop user user_1@localhost;
132
138
drop database mysqltest;
133
139
 
 
140
# Wait till we reached the initial number of concurrent sessions
 
141
--source include/wait_until_count_sessions.inc