mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bodhi.local:/opt/local/work/mysql-5.0-root
into bodhi.local:/opt/local/work/mysql-5.0-runtime mysql-test/mysql-test-run.pl: Auto merged
This commit is contained in:
@ -1268,6 +1268,9 @@ sub environment_setup () {
|
|||||||
$ENV{'IM_PATH_PID'}= $instance_manager->{path_pid};
|
$ENV{'IM_PATH_PID'}= $instance_manager->{path_pid};
|
||||||
$ENV{'IM_PATH_ANGEL_PID'}= $instance_manager->{path_angel_pid};
|
$ENV{'IM_PATH_ANGEL_PID'}= $instance_manager->{path_angel_pid};
|
||||||
$ENV{'IM_PORT'}= $instance_manager->{port};
|
$ENV{'IM_PORT'}= $instance_manager->{port};
|
||||||
|
$ENV{'IM_PATH_SOCK'}= $instance_manager->{path_sock};
|
||||||
|
$ENV{'IM_USERNAME'}= $instance_manager->{admin_login};
|
||||||
|
$ENV{'IM_PASSWORD'}= $instance_manager->{admin_password};
|
||||||
|
|
||||||
$ENV{'IM_MYSQLD1_SOCK'}= $instance_manager->{instances}->[0]->{path_sock};
|
$ENV{'IM_MYSQLD1_SOCK'}= $instance_manager->{instances}->[0]->{path_sock};
|
||||||
$ENV{'IM_MYSQLD1_PORT'}= $instance_manager->{instances}->[0]->{port};
|
$ENV{'IM_MYSQLD1_PORT'}= $instance_manager->{instances}->[0]->{port};
|
||||||
@ -1276,6 +1279,9 @@ sub environment_setup () {
|
|||||||
$ENV{'IM_MYSQLD2_PORT'}= $instance_manager->{instances}->[1]->{port};
|
$ENV{'IM_MYSQLD2_PORT'}= $instance_manager->{instances}->[1]->{port};
|
||||||
$ENV{'IM_MYSQLD2_PATH_PID'}=$instance_manager->{instances}->[1]->{path_pid};
|
$ENV{'IM_MYSQLD2_PATH_PID'}=$instance_manager->{instances}->[1]->{path_pid};
|
||||||
|
|
||||||
|
$ENV{'EXE_MYSQL'}= $exe_mysql;
|
||||||
|
|
||||||
|
|
||||||
$ENV{MTR_BUILD_THREAD}= 0 unless $ENV{MTR_BUILD_THREAD}; # Set if not set
|
$ENV{MTR_BUILD_THREAD}= 0 unless $ENV{MTR_BUILD_THREAD}; # Set if not set
|
||||||
|
|
||||||
# We are nice and report a bit about our settings
|
# We are nice and report a bit about our settings
|
||||||
|
@ -8,6 +8,7 @@ mysqld2 offline
|
|||||||
Killing the process...
|
Killing the process...
|
||||||
Sleeping...
|
Sleeping...
|
||||||
Success: the process was restarted.
|
Success: the process was restarted.
|
||||||
|
Success: server is ready to accept connection on socket.
|
||||||
|
|
||||||
--------------------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
-- Test for BUG#12751
|
-- Test for BUG#12751
|
||||||
|
@ -5470,5 +5470,32 @@ CAD
|
|||||||
CHF
|
CHF
|
||||||
DROP FUNCTION bug21493|
|
DROP FUNCTION bug21493|
|
||||||
DROP TABLE t3,t4|
|
DROP TABLE t3,t4|
|
||||||
|
drop procedure if exists proc_21462_a|
|
||||||
|
drop procedure if exists proc_21462_b|
|
||||||
|
create procedure proc_21462_a()
|
||||||
|
begin
|
||||||
|
select "Called A";
|
||||||
|
end|
|
||||||
|
create procedure proc_21462_b(x int)
|
||||||
|
begin
|
||||||
|
select "Called B";
|
||||||
|
end|
|
||||||
|
call proc_21462_a|
|
||||||
|
Called A
|
||||||
|
Called A
|
||||||
|
call proc_21462_a()|
|
||||||
|
Called A
|
||||||
|
Called A
|
||||||
|
call proc_21462_a(1)|
|
||||||
|
ERROR 42000: Incorrect number of arguments for PROCEDURE test.proc_21462_a; expected 0, got 1
|
||||||
|
call proc_21462_b|
|
||||||
|
ERROR 42000: Incorrect number of arguments for PROCEDURE test.proc_21462_b; expected 1, got 0
|
||||||
|
call proc_21462_b()|
|
||||||
|
ERROR 42000: Incorrect number of arguments for PROCEDURE test.proc_21462_b; expected 1, got 0
|
||||||
|
call proc_21462_b(1)|
|
||||||
|
Called B
|
||||||
|
Called B
|
||||||
|
drop procedure proc_21462_a|
|
||||||
|
drop procedure proc_21462_b|
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
@ -17,6 +17,12 @@
|
|||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
|
# Wait for IM to start accepting connections.
|
||||||
|
|
||||||
|
--exec $MYSQL_TEST_DIR/t/wait_for_socket.sh $EXE_MYSQL $IM_PATH_SOCK $IM_USERNAME $IM_PASSWORD '' 30
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#12751: Instance Manager: client hangs
|
# BUG#12751: Instance Manager: client hangs
|
||||||
#
|
#
|
||||||
|
@ -6420,6 +6420,39 @@ SELECT bug21493(Member_ID) FROM t3|
|
|||||||
DROP FUNCTION bug21493|
|
DROP FUNCTION bug21493|
|
||||||
DROP TABLE t3,t4|
|
DROP TABLE t3,t4|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#21462 Stored procedures with no arguments require parenthesis
|
||||||
|
#
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop procedure if exists proc_21462_a|
|
||||||
|
drop procedure if exists proc_21462_b|
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
create procedure proc_21462_a()
|
||||||
|
begin
|
||||||
|
select "Called A";
|
||||||
|
end|
|
||||||
|
|
||||||
|
create procedure proc_21462_b(x int)
|
||||||
|
begin
|
||||||
|
select "Called B";
|
||||||
|
end|
|
||||||
|
|
||||||
|
call proc_21462_a|
|
||||||
|
call proc_21462_a()|
|
||||||
|
-- error ER_SP_WRONG_NO_OF_ARGS
|
||||||
|
call proc_21462_a(1)|
|
||||||
|
|
||||||
|
-- error ER_SP_WRONG_NO_OF_ARGS
|
||||||
|
call proc_21462_b|
|
||||||
|
-- error ER_SP_WRONG_NO_OF_ARGS
|
||||||
|
call proc_21462_b()|
|
||||||
|
call proc_21462_b(1)|
|
||||||
|
|
||||||
|
drop procedure proc_21462_a|
|
||||||
|
drop procedure proc_21462_b|
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
--echo End of 5.0 tests
|
||||||
|
|
||||||
|
|
||||||
|
62
mysql-test/t/wait_for_socket.sh
Executable file
62
mysql-test/t/wait_for_socket.sh
Executable file
@ -0,0 +1,62 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
if [ $# -ne 6 ]; then
|
||||||
|
echo "Usage: wait_for_socket.sh <executable path> <socket path> <username> <password> <db> <timeout>"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
client_exe="$1"
|
||||||
|
socket_path="$2"
|
||||||
|
username="$3"
|
||||||
|
password="$4"
|
||||||
|
db="$5"
|
||||||
|
total_timeout="$6"
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
if [ -z "$client_exe" ]; then
|
||||||
|
echo "Error: invalid path to client executable ($client_exe)."
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$client_exe" ]; then
|
||||||
|
echo "Error: client by path '$client_exe' is not available."
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$socket_path" ]; then
|
||||||
|
echo "Error: invalid socket patch."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
client_args="--silent --socket=$socket_path "
|
||||||
|
|
||||||
|
[ -n "$username" ] && client_args="$client_args --user=$username "
|
||||||
|
[ -n "$password" ] && client_args="$client_args --password=$password "
|
||||||
|
[ -n "$db" ] && client_args="$client_args $db"
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
cur_attempt=1
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
|
||||||
|
if ( echo 'quit' | "$client_exe" $client_args >/dev/null 2>&1 ); then
|
||||||
|
echo "Success: server is ready to accept connection on socket."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ $cur_attempt -ge $total_timeout ] && break
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
cur_attempt=`expr $cur_attempt + 1`
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Error: server does not accept connections after $total_timeout seconds."
|
||||||
|
exit 0
|
@ -650,11 +650,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
|||||||
%token UNIX_TIMESTAMP
|
%token UNIX_TIMESTAMP
|
||||||
%token UNKNOWN_SYM
|
%token UNKNOWN_SYM
|
||||||
%token UNLOCK_SYM
|
%token UNLOCK_SYM
|
||||||
%token UNLOCK_SYM
|
|
||||||
%token UNSIGNED
|
%token UNSIGNED
|
||||||
%token UNTIL_SYM
|
%token UNTIL_SYM
|
||||||
%token UNTIL_SYM
|
|
||||||
%token UPDATE_SYM
|
|
||||||
%token UPDATE_SYM
|
%token UPDATE_SYM
|
||||||
%token UPGRADE_SYM
|
%token UPGRADE_SYM
|
||||||
%token USAGE
|
%token USAGE
|
||||||
@ -1447,15 +1444,20 @@ call:
|
|||||||
lex->value_list.empty();
|
lex->value_list.empty();
|
||||||
sp_add_used_routine(lex, YYTHD, $2, TYPE_ENUM_PROCEDURE);
|
sp_add_used_routine(lex, YYTHD, $2, TYPE_ENUM_PROCEDURE);
|
||||||
}
|
}
|
||||||
'(' sp_cparam_list ')' {}
|
opt_sp_cparam_list {}
|
||||||
;
|
;
|
||||||
|
|
||||||
/* CALL parameters */
|
/* CALL parameters */
|
||||||
sp_cparam_list:
|
opt_sp_cparam_list:
|
||||||
/* Empty */
|
/* Empty */
|
||||||
| sp_cparams
|
| '(' opt_sp_cparams ')'
|
||||||
;
|
;
|
||||||
|
|
||||||
|
opt_sp_cparams:
|
||||||
|
/* Empty */
|
||||||
|
| sp_cparams
|
||||||
|
;
|
||||||
|
|
||||||
sp_cparams:
|
sp_cparams:
|
||||||
sp_cparams ',' expr
|
sp_cparams ',' expr
|
||||||
{
|
{
|
||||||
@ -5166,7 +5168,7 @@ when_list2:
|
|||||||
/* Warning - may return NULL in case of incomplete SELECT */
|
/* Warning - may return NULL in case of incomplete SELECT */
|
||||||
table_ref:
|
table_ref:
|
||||||
table_factor { $$=$1; }
|
table_factor { $$=$1; }
|
||||||
| join_table { $$=$1; }
|
| join_table
|
||||||
{
|
{
|
||||||
LEX *lex= Lex;
|
LEX *lex= Lex;
|
||||||
if (!($$= lex->current_select->nest_last_join(lex->thd)))
|
if (!($$= lex->current_select->nest_last_join(lex->thd)))
|
||||||
@ -5208,7 +5210,7 @@ join_table:
|
|||||||
| table_ref normal_join table_ref
|
| table_ref normal_join table_ref
|
||||||
ON
|
ON
|
||||||
{
|
{
|
||||||
YYERROR_UNLESS($1 && ($$=$3));
|
YYERROR_UNLESS($1 && $3);
|
||||||
/* Change the current name resolution context to a local context. */
|
/* Change the current name resolution context to a local context. */
|
||||||
if (push_new_name_resolution_context(YYTHD, $1, $3))
|
if (push_new_name_resolution_context(YYTHD, $1, $3))
|
||||||
YYABORT;
|
YYABORT;
|
||||||
@ -5223,7 +5225,7 @@ join_table:
|
|||||||
| table_ref STRAIGHT_JOIN table_factor
|
| table_ref STRAIGHT_JOIN table_factor
|
||||||
ON
|
ON
|
||||||
{
|
{
|
||||||
YYERROR_UNLESS($1 && ($$=$3));
|
YYERROR_UNLESS($1 && $3);
|
||||||
/* Change the current name resolution context to a local context. */
|
/* Change the current name resolution context to a local context. */
|
||||||
if (push_new_name_resolution_context(YYTHD, $1, $3))
|
if (push_new_name_resolution_context(YYTHD, $1, $3))
|
||||||
YYABORT;
|
YYABORT;
|
||||||
|
Reference in New Issue
Block a user