Commit 66b87280 authored by unknown's avatar unknown

Post-merge fixes.


mysql-test/r/sp.result:
  Update results.
mysql-test/r/view.result:
  Update results.
server-tools/instance-manager/guardian.cc:
  Post-merge fixes (instance_name is a LEX_STRING).
server-tools/instance-manager/instance.cc:
  Post-merge fixes (instance_name is a LEX_STRING).
parent d946b64d
......@@ -5470,5 +5470,161 @@ CAD
CHF
DROP FUNCTION bug21493|
DROP TABLE t3,t4|
drop function if exists func_20028_a|
drop function if exists func_20028_b|
drop function if exists func_20028_c|
drop procedure if exists proc_20028_a|
drop procedure if exists proc_20028_b|
drop procedure if exists proc_20028_c|
drop table if exists table_20028|
create table table_20028 (i int)|
SET @save_sql_mode=@@sql_mode|
SET sql_mode=''|
create function func_20028_a() returns integer
begin
declare temp integer;
select i into temp from table_20028 limit 1;
return ifnull(temp, 0);
end|
create function func_20028_b() returns integer
begin
return func_20028_a();
end|
create function func_20028_c() returns integer
begin
declare div_zero integer;
set SQL_MODE='TRADITIONAL';
select 1/0 into div_zero;
return div_zero;
end|
create procedure proc_20028_a()
begin
declare temp integer;
select i into temp from table_20028 limit 1;
end|
create procedure proc_20028_b()
begin
call proc_20028_a();
end|
create procedure proc_20028_c()
begin
declare div_zero integer;
set SQL_MODE='TRADITIONAL';
select 1/0 into div_zero;
end|
select func_20028_a()|
func_20028_a()
0
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
select func_20028_b()|
func_20028_b()
0
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
select func_20028_c()|
ERROR 22012: Division by 0
call proc_20028_a()|
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
call proc_20028_b()|
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
call proc_20028_c()|
ERROR 22012: Division by 0
SET sql_mode='TRADITIONAL'|
drop function func_20028_a|
drop function func_20028_b|
drop function func_20028_c|
drop procedure proc_20028_a|
drop procedure proc_20028_b|
drop procedure proc_20028_c|
create function func_20028_a() returns integer
begin
declare temp integer;
select i into temp from table_20028 limit 1;
return ifnull(temp, 0);
end|
create function func_20028_b() returns integer
begin
return func_20028_a();
end|
create function func_20028_c() returns integer
begin
declare div_zero integer;
set SQL_MODE='';
select 1/0 into div_zero;
return div_zero;
end|
create procedure proc_20028_a()
begin
declare temp integer;
select i into temp from table_20028 limit 1;
end|
create procedure proc_20028_b()
begin
call proc_20028_a();
end|
create procedure proc_20028_c()
begin
declare div_zero integer;
set SQL_MODE='';
select 1/0 into div_zero;
end|
select func_20028_a()|
func_20028_a()
0
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
select func_20028_b()|
func_20028_b()
0
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
select func_20028_c()|
func_20028_c()
NULL
call proc_20028_a()|
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
call proc_20028_b()|
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
call proc_20028_c()|
SET @@sql_mode=@save_sql_mode|
drop function func_20028_a|
drop function func_20028_b|
drop function func_20028_c|
drop procedure proc_20028_a|
drop procedure proc_20028_b|
drop procedure proc_20028_c|
drop table table_20028|
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
drop table t1,t2;
......@@ -2968,6 +2968,8 @@ INSERT INTO t1 VALUES (1);
CREATE FUNCTION f1() RETURNS INT RETURN (SELECT * FROM v1);
UPDATE t1 SET i= f1();
DROP FUNCTION f1;
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1(id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, val INT UNSIGNED NOT NULL);
CREATE VIEW v1 AS SELECT id, val FROM t1 WHERE val >= 1 AND val <= 5 WITH CHECK OPTION;
INSERT INTO v1 (val) VALUES (2);
......
......@@ -158,7 +158,7 @@ void Guardian_thread::process_instance(Instance *instance,
{
/* clear status fields */
log_info("guardian: instance '%s' is running, set state to STARTED.",
(const char *) instance->options.instance_name);
(const char *) instance->options.instance_name.str);
current_node->restart_counter= 0;
current_node->crash_moment= 0;
current_node->state= STARTED;
......@@ -169,7 +169,7 @@ void Guardian_thread::process_instance(Instance *instance,
switch (current_node->state) {
case NOT_STARTED:
log_info("guardian: starting instance '%s'...",
(const char *) instance->options.instance_name);
(const char *) instance->options.instance_name.str);
/* NOTE, set state to STARTING _before_ start() is called */
current_node->state= STARTING;
......@@ -194,7 +194,7 @@ void Guardian_thread::process_instance(Instance *instance,
{
instance->start();
log_info("guardian: starting instance '%s'...",
(const char *) instance->options.instance_name);
(const char *) instance->options.instance_name.str);
}
}
else
......@@ -212,13 +212,13 @@ void Guardian_thread::process_instance(Instance *instance,
current_node->last_checked= current_time;
current_node->restart_counter++;
log_info("guardian: restarting instance '%s'...",
(const char *) instance->options.instance_name);
(const char *) instance->options.instance_name.str);
}
}
else
{
log_info("guardian: cannot start instance %s. Abandoning attempts "
"to (re)start it", instance->options.instance_name);
"to (re)start it", instance->options.instance_name.str);
current_node->state= CRASHED_AND_ABANDONED;
}
}
......
......@@ -166,7 +166,7 @@ static int start_process(Instance_options *instance_options,
exit(1);
case -1:
log_info("cannot create a new process to start instance '%s'.",
(const char *) instance_options->instance_name);
(const char *) instance_options->instance_name.str);
return 1;
}
return 0;
......@@ -312,9 +312,9 @@ void Instance::remove_pid()
int pid;
if ((pid= options.get_pid()) != 0) /* check the pidfile */
if (options.unlink_pidfile()) /* remove stalled pidfile */
log_error("cannot remove pidfile for instance '%s', this might be \
since IM lacks permmissions or hasn't found the pidifle",
(const char *) options.instance_name);
log_error("cannot remove pidfile for instance '%s', this might be "
"since IM lacks permmissions or hasn't found the pidifle",
(const char *) options.instance_name.str);
}
......@@ -620,7 +620,7 @@ void Instance::kill_instance(int signum)
log_error("The instance '%s' is being stopped forcibly. Normally"
"it should not happen. Probably the instance has been"
"hanging. You should also check your IM setup",
(const char *) options.instance_name);
(const char *) options.instance_name.str);
/* After sucessful hard kill the pidfile need to be removed */
options.unlink_pidfile();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment