Commit 0327ec4a authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-5.1-runtime

into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build

parents aec4823b d1c57f50
...@@ -53,7 +53,6 @@ get_lock('test_bug16407', 60) ...@@ -53,7 +53,6 @@ get_lock('test_bug16407', 60)
create event e_16407 on schedule every 60 second do create event e_16407 on schedule every 60 second do
begin begin
select get_lock('test_bug16407', 60); select get_lock('test_bug16407', 60);
drop table "hashed_num";
end| end|
"Now if everything is fine the event has compiled and is locked" "Now if everything is fine the event has compiled and is locked"
select /*1*/ user, host, db, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; select /*1*/ user, host, db, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info;
......
...@@ -1161,3 +1161,44 @@ CALL p1(); ...@@ -1161,3 +1161,44 @@ CALL p1();
v_text v_text
abc|def abc|def
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP PROCEDURE IF EXISTS bug27415_text_test|
DROP PROCEDURE IF EXISTS bug27415_text_test2|
CREATE PROCEDURE bug27415_text_test(entity_id_str_in text)
BEGIN
DECLARE str_remainder text;
SET str_remainder = entity_id_str_in;
select 'before substr', str_remainder;
SET str_remainder = SUBSTRING(str_remainder, 3);
select 'after substr', str_remainder;
END|
CREATE PROCEDURE bug27415_text_test2(entity_id_str_in text)
BEGIN
DECLARE str_remainder text;
DECLARE str_remainder2 text;
SET str_remainder2 = entity_id_str_in;
select 'before substr', str_remainder2;
SET str_remainder = SUBSTRING(str_remainder2, 3);
select 'after substr', str_remainder;
END|
CALL bug27415_text_test('a,b,c')|
before substr str_remainder
before substr a,b,c
after substr str_remainder
after substr b,c
CALL bug27415_text_test('a,b,c')|
before substr str_remainder
before substr a,b,c
after substr str_remainder
after substr b,c
CALL bug27415_text_test2('a,b,c')|
before substr str_remainder2
before substr a,b,c
after substr str_remainder
after substr b,c
CALL bug27415_text_test('a,b,c')|
before substr str_remainder
before substr a,b,c
after substr str_remainder
after substr b,c
DROP PROCEDURE bug27415_text_test|
DROP PROCEDURE bug27415_text_test2|
...@@ -87,7 +87,6 @@ delimiter |; ...@@ -87,7 +87,6 @@ delimiter |;
create event e_16407 on schedule every 60 second do create event e_16407 on schedule every 60 second do
begin begin
select get_lock('test_bug16407', 60); select get_lock('test_bug16407', 60);
drop table "hashed_num";
end| end|
delimiter ;| delimiter ;|
......
...@@ -1367,4 +1367,48 @@ CALL p1(); ...@@ -1367,4 +1367,48 @@ CALL p1();
DROP PROCEDURE p1; DROP PROCEDURE p1;
#
# Bug #27415 Text Variables in stored procedures
# If the SP varible was also referenced on the right side
# the result was corrupted.
#
DELIMITER |;
--disable_warnings
DROP PROCEDURE IF EXISTS bug27415_text_test|
DROP PROCEDURE IF EXISTS bug27415_text_test2|
--enable_warnings
CREATE PROCEDURE bug27415_text_test(entity_id_str_in text)
BEGIN
DECLARE str_remainder text;
SET str_remainder = entity_id_str_in;
select 'before substr', str_remainder;
SET str_remainder = SUBSTRING(str_remainder, 3);
select 'after substr', str_remainder;
END|
CREATE PROCEDURE bug27415_text_test2(entity_id_str_in text)
BEGIN
DECLARE str_remainder text;
DECLARE str_remainder2 text;
SET str_remainder2 = entity_id_str_in;
select 'before substr', str_remainder2;
SET str_remainder = SUBSTRING(str_remainder2, 3);
select 'after substr', str_remainder;
END|
CALL bug27415_text_test('a,b,c')|
CALL bug27415_text_test('a,b,c')|
CALL bug27415_text_test2('a,b,c')|
CALL bug27415_text_test('a,b,c')|
DROP PROCEDURE bug27415_text_test|
DROP PROCEDURE bug27415_text_test2|
DELIMITER ;|
# End of 5.0 tests. # End of 5.0 tests.
...@@ -1914,7 +1914,7 @@ Event_job_data::execute(THD *thd, bool drop) ...@@ -1914,7 +1914,7 @@ Event_job_data::execute(THD *thd, bool drop)
thd->variables.time_zone= time_zone; thd->variables.time_zone= time_zone;
/* /*
Peculiar initialization order is a clutch to avoid races in SHOW Peculiar initialization order is a crutch to avoid races in SHOW
PROCESSLIST which reads thd->{query/query_length} without a mutex. PROCESSLIST which reads thd->{query/query_length} without a mutex.
*/ */
thd->query_length= 0; thd->query_length= 0;
...@@ -1974,7 +1974,7 @@ end: ...@@ -1974,7 +1974,7 @@ end:
else else
{ {
/* /*
Peculiar initialization order is a clutch to avoid races in SHOW Peculiar initialization order is a crutch to avoid races in SHOW
PROCESSLIST which reads thd->{query/query_length} without a mutex. PROCESSLIST which reads thd->{query/query_length} without a mutex.
*/ */
thd->query_length= 0; thd->query_length= 0;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#define NDB_MGM_MAX_LOGLEVEL 15 #define NDB_MGM_MAX_LOGLEVEL 15
/** /**
* @mainpage MySQL Cluster Management API * @section MySQL Cluster Management API
* *
* The MySQL Cluster Management API (MGM API) is a C language API * The MySQL Cluster Management API (MGM API) is a C language API
* that is used for: * that is used for:
......
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