Skip to content

Commit c497fb7

Browse files
author
Mats Kindahl
committed
Merging with mysql-5.5.
2 parents 6a396fd + 6745137 commit c497fb7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+958
-294
lines changed

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ For the avoidance of doubt, this particular copy of the software
55
is released under the version 2 of the GNU General Public License.
66
MySQL is brought to you by the MySQL team at Oracle.
77

8-
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
8+
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
99

1010
License information can be found in the COPYING file.
1111

client/mysql.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,8 @@ int main(int argc,char *argv[])
11271127
if (status.batch && !status.line_buff &&
11281128
!(status.line_buff= batch_readline_init(MAX_BATCH_BUFFER_SIZE, stdin)))
11291129
{
1130+
put_info("Can't initialize batch_readline - may be the input source is "
1131+
"a directory or a block device.", INFO_ERROR, 0);
11301132
free_defaults(defaults_argv);
11311133
my_end(0);
11321134
exit(1);

client/readline.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <my_global.h>
1919
#include <my_sys.h>
2020
#include <m_string.h>
21+
#include <my_dir.h>
2122
#include "my_readline.h"
2223

2324
static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
@@ -30,6 +31,13 @@ static char *intern_read_line(LINE_BUFFER *buffer, ulong *out_length);
3031
LINE_BUFFER *batch_readline_init(ulong max_size,FILE *file)
3132
{
3233
LINE_BUFFER *line_buff;
34+
MY_STAT input_file_stat;
35+
36+
if (my_fstat(fileno(file), &input_file_stat, MYF(MY_WME)) ||
37+
MY_S_ISDIR(input_file_stat.st_mode) ||
38+
MY_S_ISBLK(input_file_stat.st_mode))
39+
return 0;
40+
3341
if (!(line_buff=(LINE_BUFFER*)
3442
my_malloc(sizeof(*line_buff),MYF(MY_WME | MY_ZEROFILL))))
3543
return 0;

include/my_pthread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
1+
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by

mysql-test/collections/default.daily

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

2-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --report-features
3-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed
4-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=row --vardir=var-row --mysqld=--binlog-format=row
5-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --mysqld=--binlog-format=row --ps-protocol
6-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded
7-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --ps-protocol
8-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1
9-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps_funcs1 --vardir=var-ps_funcs_1 --suite=funcs_1 --ps-protocol
10-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs2 --vardir=var-funcs2 --suite=funcs_2
11-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=partitions --vardir=var-parts --suite=parts
12-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=stress --vardir=var-stress --suite=stress
13-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=jp --vardir=var-jp --suite=jp
14-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist --vardir=var-nist --suite=nist
15-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist+ps --vardir=var-ps_nist --suite=nist --ps-protocol
2+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --report-features
3+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed
4+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=row --vardir=var-row --mysqld=--binlog-format=row
5+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --mysqld=--binlog-format=row --ps-protocol
6+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded
7+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --ps-protocol
8+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1
9+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_funcs1 --vardir=var-ps_funcs_1 --suite=funcs_1 --ps-protocol
10+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=funcs2 --vardir=var-funcs2 --suite=funcs_2
11+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=partitions --vardir=var-parts --suite=parts
12+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=stress --vardir=var-stress --suite=stress
13+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=jp --vardir=var-jp --suite=jp
14+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist --vardir=var-nist --suite=nist
15+
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist+ps --vardir=var-ps_nist --suite=nist --ps-protocol

mysql-test/collections/default.experimental

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Severa
2424
sys_vars.plugin_dir_basic # Bug#52223 2010-11-24 alik Test "plugin_dir_basic" does not support RPM build (test) directory structure
2525
sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10
2626
sys_vars.wait_timeout_func # Bug#41255 2010-04-26 alik wait_timeout_func fails
27+
sys_vars.sys_vars # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
28+
sys_vars.rpl_semi_sync_master_enabled_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
29+
sys_vars.rpl_semi_sync_master_timeout_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
30+
sys_vars.rpl_semi_sync_master_trace_level_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
31+
sys_vars.rpl_semi_sync_master_wait_no_slave_basic # Bug #59148 2011-01-10 joro 'INSTALL PLUGIN rpl_semi_sync_master' fails in release build with debug binaries
2732

2833
# BUG #59055 : All ndb tests should be removed from the repository
2934
# Leaving the sys_vars tests for now. sys_vars.all_vars.test fails on removing ndb tests

mysql-test/collections/default.weekly

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
perl mysql-test-run.pl --timer --force --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_2_innodb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb funcs_1.myisam_views-big
2-
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam
3-
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-row-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=row
4-
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-mixed-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=mixed
5-
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb
6-
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row
7-
perl mysql-test-run.pl --timer --force --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed
1+
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_2_innodb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb funcs_1.myisam_views-big
2+
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam
3+
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=row
4+
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=mixed
5+
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb
6+
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row
7+
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed

mysql-test/include/mysqlhotcopy.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ DROP DATABASE hotcopy_save;
107107
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
108108
--list_files $MYSQLD_DATADIR/hotcopy_save
109109
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
110-
--error 9,2304
110+
--error 9,11,2304
111111
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
112112
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
113113
--exec $MYSQLHOTCOPY --quiet --allowold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save

mysql-test/mysql-test-run.pl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2168,6 +2168,16 @@ sub environment_setup {
21682168
$ENV{'MYSQL_LIBDIR'}= "$basedir/lib";
21692169
$ENV{'MYSQL_SHAREDIR'}= $path_language;
21702170
$ENV{'MYSQL_CHARSETSDIR'}= $path_charsetsdir;
2171+
2172+
if (IS_WINDOWS)
2173+
{
2174+
$ENV{'SECURE_LOAD_PATH'}= $glob_mysql_test_dir."\\std_data";
2175+
}
2176+
else
2177+
{
2178+
$ENV{'SECURE_LOAD_PATH'}= $glob_mysql_test_dir."/std_data";
2179+
}
2180+
21712181

21722182
# ----------------------------------------------------
21732183
# Setup env for NDB

mysql-test/r/grant.result

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,80 @@ CURRENT_USER()
13781378
root@localhost
13791379
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
13801380
SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
1381+
1382+
# Bug#57952
1383+
1384+
DROP DATABASE IF EXISTS mysqltest1;
1385+
DROP DATABASE IF EXISTS mysqltest2;
1386+
CREATE DATABASE mysqltest1;
1387+
CREATE DATABASE mysqltest2;
1388+
use mysqltest1;
1389+
CREATE TABLE t1(a INT, b INT);
1390+
INSERT INTO t1 VALUES (1, 1);
1391+
CREATE TABLE t2(a INT);
1392+
INSERT INTO t2 VALUES (2);
1393+
CREATE TABLE mysqltest2.t3(a INT);
1394+
INSERT INTO mysqltest2.t3 VALUES (4);
1395+
CREATE USER testuser@localhost;
1396+
GRANT CREATE ROUTINE, EXECUTE ON mysqltest1.* TO testuser@localhost;
1397+
GRANT SELECT(b) ON t1 TO testuser@localhost;
1398+
GRANT SELECT ON t2 TO testuser@localhost;
1399+
GRANT SELECT ON mysqltest2.* TO testuser@localhost;
1400+
1401+
# Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
1402+
PREPARE s1 FROM 'SELECT b FROM t1';
1403+
PREPARE s2 FROM 'SELECT a FROM t2';
1404+
PREPARE s3 FROM 'SHOW TABLES FROM mysqltest2';
1405+
CREATE PROCEDURE p1() SELECT b FROM t1;
1406+
CREATE PROCEDURE p2() SELECT a FROM t2;
1407+
CREATE PROCEDURE p3() SHOW TABLES FROM mysqltest2;
1408+
CALL p1;
1409+
b
1410+
1
1411+
CALL p2;
1412+
a
1413+
2
1414+
CALL p3;
1415+
Tables_in_mysqltest2
1416+
t3
1417+
1418+
# Connection: default
1419+
REVOKE SELECT ON t1 FROM testuser@localhost;
1420+
GRANT SELECT(a) ON t1 TO testuser@localhost;
1421+
REVOKE SELECT ON t2 FROM testuser@localhost;
1422+
REVOKE SELECT ON mysqltest2.* FROM testuser@localhost;
1423+
1424+
# Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
1425+
# - Check column-level privileges...
1426+
EXECUTE s1;
1427+
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
1428+
SELECT b FROM t1;
1429+
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
1430+
EXECUTE s1;
1431+
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
1432+
CALL p1;
1433+
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
1434+
# - Check table-level privileges...
1435+
SELECT a FROM t2;
1436+
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
1437+
EXECUTE s2;
1438+
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
1439+
CALL p2;
1440+
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
1441+
# - Check database-level privileges...
1442+
SHOW TABLES FROM mysqltest2;
1443+
ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
1444+
EXECUTE s3;
1445+
ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
1446+
CALL p3;
1447+
ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
1448+
1449+
# Connection: default
1450+
DROP DATABASE mysqltest1;
1451+
DROP DATABASE mysqltest2;
1452+
DROP USER testuser@localhost;
1453+
use test;
1454+
13811455
End of 5.0 tests
13821456
set names utf8;
13831457
grant select on test.* to юзер_юзер@localhost;

0 commit comments

Comments
 (0)