mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1
This commit is contained in:
@ -88,9 +88,16 @@ install-data-local:
|
||||
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
|
||||
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
|
||||
|
||||
std_data/%.pem:
|
||||
std_data/client-key.pem:
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
std_data/client-cert.pem:
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
std_data/cacert.pem:
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
std_data/server-cert.pem:
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
std_data/server-key.pem:
|
||||
@CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data
|
||||
|
||||
|
||||
SUFFIXES = .sh
|
||||
|
||||
|
@ -126,16 +126,6 @@ sub collect_one_test_case($$$$$) {
|
||||
return;
|
||||
}
|
||||
|
||||
# FIXME temporary solution, we have a hard coded list of test cases to
|
||||
# skip if we are using the embedded server
|
||||
|
||||
if ( $::glob_use_embedded_server and
|
||||
mtr_match_any_exact($tname,\@::skip_if_embedded_server) )
|
||||
{
|
||||
$tinfo->{'skip'}= 1;
|
||||
return;
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Collect information about test case
|
||||
# ----------------------------------------------------------------------
|
||||
|
@ -100,31 +100,6 @@ require "lib/mtr_misc.pl";
|
||||
|
||||
$Devel::Trace::TRACE= 1;
|
||||
|
||||
my @skip_if_embedded_server=
|
||||
(
|
||||
"alter_table",
|
||||
"bdb-deadlock",
|
||||
"connect",
|
||||
"flush_block_commit",
|
||||
"grant2",
|
||||
"grant_cache",
|
||||
"grant",
|
||||
"init_connect",
|
||||
"innodb-deadlock",
|
||||
"innodb-lock",
|
||||
"mix_innodb_myisam_binlog",
|
||||
"mysqlbinlog2",
|
||||
"mysqlbinlog",
|
||||
"mysqldump",
|
||||
"mysql_protocols",
|
||||
"ps_1general",
|
||||
"rename",
|
||||
"show_check",
|
||||
"system_mysql_db_fix",
|
||||
"user_var",
|
||||
"variables",
|
||||
);
|
||||
|
||||
# Used by gcov
|
||||
our @mysqld_src_dirs=
|
||||
(
|
||||
@ -196,6 +171,7 @@ our $exe_mysqlbinlog;
|
||||
our $exe_mysql_client_test;
|
||||
our $exe_mysqld;
|
||||
our $exe_mysqldump; # Called from test case
|
||||
our $exe_mysqlshow; # Called from test case
|
||||
our $exe_mysql_fix_system_tables;
|
||||
our $exe_mysqltest;
|
||||
our $exe_slave_mysqld;
|
||||
@ -241,6 +217,7 @@ our $opt_ndbcluster_port;
|
||||
our $opt_ndbconnectstring;
|
||||
|
||||
our $opt_no_manager; # Does nothing now, we never use manager
|
||||
our $opt_manager_port; # Does nothing now, we never use manager
|
||||
|
||||
our $opt_old_master;
|
||||
|
||||
@ -495,6 +472,7 @@ sub command_line_setup () {
|
||||
'master_port=i' => \$opt_master_myport,
|
||||
'slave_port=i' => \$opt_slave_myport,
|
||||
'ndbcluster_port=i' => \$opt_ndbcluster_port,
|
||||
'manager-port' => \$opt_manager_port,
|
||||
|
||||
# Test case authoring
|
||||
'record' => \$opt_record,
|
||||
@ -823,6 +801,14 @@ sub executable_setup () {
|
||||
{
|
||||
$exe_mysqldump= "$glob_basedir/client/mysqldump";
|
||||
}
|
||||
if ( -f "$glob_basedir/client/.libs/mysqlshow" )
|
||||
{
|
||||
$exe_mysqlshow= "$glob_basedir/client/.libs/mysqlshow";
|
||||
}
|
||||
else
|
||||
{
|
||||
$exe_mysqlshow= "$glob_basedir/client/mysqlshow";
|
||||
}
|
||||
if ( -f "$glob_basedir/client/.libs/mysqlbinlog" )
|
||||
{
|
||||
$exe_mysqlbinlog= "$glob_basedir/client/.libs/mysqlbinlog";
|
||||
@ -850,6 +836,7 @@ sub executable_setup () {
|
||||
$path_client_bindir= "$glob_basedir/bin";
|
||||
$exe_mysqltest= "$path_client_bindir/mysqltest";
|
||||
$exe_mysqldump= "$path_client_bindir/mysqldump";
|
||||
$exe_mysqlshow= "$path_client_bindir/mysqlshow";
|
||||
$exe_mysqlbinlog= "$path_client_bindir/mysqlbinlog";
|
||||
$exe_mysqladmin= "$path_client_bindir/mysqladmin";
|
||||
$exe_mysql= "$path_client_bindir/mysql";
|
||||
@ -2056,6 +2043,14 @@ sub run_mysqltest ($$) {
|
||||
" --debug=d:t:A,$opt_vardir/log/mysqldump.trace";
|
||||
}
|
||||
|
||||
my $cmdline_mysqlshow= "$exe_mysqlshow -uroot " .
|
||||
"--socket=$master->[0]->{'path_mysock'} --password=";
|
||||
if ( $opt_debug )
|
||||
{
|
||||
$cmdline_mysqlshow .=
|
||||
" --debug=d:t:A,$opt_vardir/log/mysqlshow.trace";
|
||||
}
|
||||
|
||||
my $cmdline_mysqlbinlog=
|
||||
"$exe_mysqlbinlog --no-defaults --local-load=$opt_tmpdir";
|
||||
|
||||
@ -2088,6 +2083,7 @@ sub run_mysqltest ($$) {
|
||||
|
||||
$ENV{'MYSQL'}= $cmdline_mysql;
|
||||
$ENV{'MYSQL_DUMP'}= $cmdline_mysqldump;
|
||||
$ENV{'MYSQL_SHOW'}= $cmdline_mysqlshow;
|
||||
$ENV{'MYSQL_BINLOG'}= $cmdline_mysqlbinlog;
|
||||
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
|
||||
$ENV{'MYSQL_CLIENT_TEST'}= $cmdline_mysql_client_test;
|
||||
|
@ -21,7 +21,7 @@ set b = 8;
|
||||
insert into t1 values (b);
|
||||
insert into t1 values (unix_timestamp());
|
||||
end|
|
||||
ERROR HY000: This routine is declared to be non-deterministic and to modify data and binary logging is enabled (you *might* want to use the less safe log_bin_trust_routine_creators variable)
|
||||
ERROR HY000: This routine has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_routine_creators variable)
|
||||
show binlog events from 98|
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # create database if not exists mysqltest1
|
||||
@ -84,7 +84,7 @@ not deterministic
|
||||
reads sql data
|
||||
select * from mysqltest1.t1
|
||||
alter procedure foo2 contains sql;
|
||||
ERROR HY000: This routine is declared to be non-deterministic and to modify data and binary logging is enabled (you *might* want to use the less safe log_bin_trust_routine_creators variable)
|
||||
ERROR HY000: This routine has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_routine_creators variable)
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
create table t2 like t1;
|
||||
@ -97,7 +97,7 @@ grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1;
|
||||
create procedure foo4()
|
||||
deterministic
|
||||
insert into t1 values (10);
|
||||
ERROR HY000: You do not have SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_routine_creators variable)
|
||||
ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_routine_creators variable)
|
||||
set global log_bin_trust_routine_creators=1;
|
||||
create procedure foo4()
|
||||
deterministic
|
||||
@ -109,7 +109,7 @@ call foo4();
|
||||
Got one of the listed errors
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1417 A routine failed and is declared to modify data and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes
|
||||
Warning 1417 A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes
|
||||
call foo3();
|
||||
show warnings;
|
||||
Level Code Message
|
||||
@ -117,7 +117,7 @@ call foo4();
|
||||
Got one of the listed errors
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1417 A routine failed and is declared to modify data and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes
|
||||
Warning 1417 A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes
|
||||
alter procedure foo4 sql security invoker;
|
||||
call foo4();
|
||||
show warnings;
|
||||
|
@ -1726,3 +1726,20 @@ sum(a)
|
||||
drop procedure p1;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
create table t1 (s1 int);
|
||||
create view v1 as select sum(distinct s1) from t1;
|
||||
select * from v1;
|
||||
sum(distinct s1)
|
||||
NULL
|
||||
drop view v1;
|
||||
create view v1 as select avg(distinct s1) from t1;
|
||||
select * from v1;
|
||||
avg(distinct s1)
|
||||
NULL
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
create view v1 as select cast(1 as decimal);
|
||||
select * from v1;
|
||||
cast(1 as decimal)
|
||||
1.00
|
||||
drop view v1;
|
||||
|
@ -1569,3 +1569,21 @@ drop procedure p1;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# using sum(distinct ) & avg(distinct ) in views (BUG#7015)
|
||||
#
|
||||
create table t1 (s1 int);
|
||||
create view v1 as select sum(distinct s1) from t1;
|
||||
select * from v1;
|
||||
drop view v1;
|
||||
create view v1 as select avg(distinct s1) from t1;
|
||||
select * from v1;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# using cast(... as decimal) in views (BUG#11387);
|
||||
#
|
||||
create view v1 as select cast(1 as decimal);
|
||||
select * from v1;
|
||||
drop view v1;
|
||||
|
Reference in New Issue
Block a user