Commit 9f5ef4a1 authored by unknown's avatar unknown
Browse files

Merge rurik.mysql.com:/home/igor/mysql-5.0

into rurik.mysql.com:/home/igor/dev/mysql-5.0-0

parents 28920f59 3a65c1b1
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -1045,8 +1045,12 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
	      /* We don't need to lock the key tree here as we don't allow
		 concurrent threads when running myisamchk
	      */
	      if (_mi_search(info,keyinfo,info->lastkey,key_length,
			     SEARCH_SAME, info->s->state.key_root[key]))
              int search_result= (keyinfo->flag & HA_SPATIAL) ?
                rtree_find_first(info, key, info->lastkey, key_length,
                                 SEARCH_SAME) : 
                _mi_search(info,keyinfo,info->lastkey,key_length,
                           SEARCH_SAME, info->s->state.key_root[key]);
              if (search_result)
              {
                mi_check_print_error(param,"Record at: %10s  Can't find key for index: %2d",
                                     llstr(start_recpos,llbuff),key+1);
+13 −0
Original line number Diff line number Diff line
@@ -803,3 +803,16 @@ CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom));
INSERT INTO t2 SELECT GeomFromText(st) FROM t1;
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1, t2;
CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`(32))) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO t1 (geometry) VALUES
(PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000
-66.8158332999, -18.7186111000 -66.8102777000, -18.7211111000 -66.9269443999,
-18.6086111000 -66.9327777000))'));
INSERT INTO t1 (geometry) VALUES
(PolygonFromText('POLYGON((-65.7402776999 -96.6686111000, -65.7372222000
-96.5516666000, -65.8502777000 -96.5461111000, -65.8527777000 -96.6627777000,
-65.7402776999 -96.6686111000))'));
check table t1 extended;
Table	Op	Msg_type	Msg_text
test.t1	check	status	OK
drop table t1;
+10 −0
Original line number Diff line number Diff line
@@ -670,3 +670,13 @@ create trigger t1_bu before update on t1 for each row set new.s1 = null;
insert into t1 values (null,null);
ERROR 23000: Column 's1' cannot be null
drop table t1;
drop procedure if exists fn3;
create function fn3 () returns point return GeomFromText("point(1 1)");
show create function fn3;
Function	sql_mode	Create Function
fn3		CREATE FUNCTION `fn3`() RETURNS point
return GeomFromText("point(1 1)")
select astext(fn3());
astext(fn3())
POINT(1 1)
drop function fn3;
+2 −2
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ Function sql_mode Create Function
sub1		
show create function sub2;
Function	sql_mode	Create Function
sub2		CREATE FUNCTION `test`.`sub2`(i int) RETURNS int(11)
sub2		CREATE FUNCTION `sub2`(i int) RETURNS int(11)
return i+1
show function status like "sub2";
Db	Name	Type	Definer	Modified	Created	Security_type	Comment
@@ -316,7 +316,7 @@ test sub2 FUNCTION mysqltest_1@localhost # # DEFINER
drop function sub2;
show create procedure sel2;
Procedure	sql_mode	Create Procedure
sel2		CREATE PROCEDURE `test`.`sel2`()
sel2		CREATE PROCEDURE `sel2`()
begin
select * from t1;
select * from t2;
+17 −10
Original line number Diff line number Diff line
@@ -788,7 +788,7 @@ comment 'Characteristics procedure test'
  insert into t1 values ("chistics", 1)|
show create procedure chistics|
Procedure	sql_mode	Create Procedure
chistics		CREATE PROCEDURE `test`.`chistics`()
chistics		CREATE PROCEDURE `chistics`()
    MODIFIES SQL DATA
    COMMENT 'Characteristics procedure test'
insert into t1 values ("chistics", 1)
@@ -800,7 +800,7 @@ delete from t1|
alter procedure chistics sql security invoker|
show create procedure chistics|
Procedure	sql_mode	Create Procedure
chistics		CREATE PROCEDURE `test`.`chistics`()
chistics		CREATE PROCEDURE `chistics`()
    MODIFIES SQL DATA
    SQL SECURITY INVOKER
    COMMENT 'Characteristics procedure test'
@@ -815,7 +815,7 @@ comment 'Characteristics procedure test'
  return 42|
show create function chistics|
Function	sql_mode	Create Function
chistics		CREATE FUNCTION `test`.`chistics`() RETURNS int(11)
chistics		CREATE FUNCTION `chistics`() RETURNS int(11)
    DETERMINISTIC
    SQL SECURITY INVOKER
    COMMENT 'Characteristics procedure test'
@@ -828,7 +828,7 @@ no sql
comment 'Characteristics function test'|
show create function chistics|
Function	sql_mode	Create Function
chistics		CREATE FUNCTION `test`.`chistics`() RETURNS int(11)
chistics		CREATE FUNCTION `chistics`() RETURNS int(11)
    NO SQL
    DETERMINISTIC
    SQL SECURITY INVOKER
@@ -1210,7 +1210,7 @@ end while;
end|
show create procedure opp|
Procedure	sql_mode	Create Procedure
opp		CREATE PROCEDURE `test`.`opp`(n bigint unsigned, out pp bool)
opp		CREATE PROCEDURE `opp`(n bigint unsigned, out pp bool)
begin
declare r double;
declare b, s bigint unsigned default 0;
@@ -1263,7 +1263,7 @@ alter procedure bar comment "3333333333"|
alter procedure bar|
show create procedure bar|
Procedure	sql_mode	Create Procedure
bar		CREATE PROCEDURE `test`.`bar`(x char(16), y int)
bar		CREATE PROCEDURE `bar`(x char(16), y int)
    COMMENT '3333333333'
insert into test.t1 values (x, y)
show procedure status like 'bar'|
@@ -1821,20 +1821,20 @@ return x || y$
set @@sql_mode = ''|
show create procedure bug2564_1|
Procedure	sql_mode	Create Procedure
bug2564_1		CREATE PROCEDURE `test`.`bug2564_1`()
bug2564_1		CREATE PROCEDURE `bug2564_1`()
    COMMENT 'Joe''s procedure'
insert into `t1` values ("foo", 1)
show create procedure bug2564_2|
Procedure	sql_mode	Create Procedure
bug2564_2	ANSI_QUOTES	CREATE PROCEDURE "test"."bug2564_2"()
bug2564_2	ANSI_QUOTES	CREATE PROCEDURE "bug2564_2"()
insert into "t1" values ('foo', 1)
show create function bug2564_3|
Function	sql_mode	Create Function
bug2564_3		CREATE FUNCTION `test`.`bug2564_3`(x int, y int) RETURNS int(11)
bug2564_3		CREATE FUNCTION `bug2564_3`(x int, y int) RETURNS int(11)
return x || y
show create function bug2564_4|
Function	sql_mode	Create Function
bug2564_4	REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI	CREATE FUNCTION "test"."bug2564_4"(x int, y int) RETURNS int(11)
bug2564_4	REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI	CREATE FUNCTION "bug2564_4"(x int, y int) RETURNS int(11)
return x || y
drop procedure bug2564_1|
drop procedure bug2564_2|
@@ -3186,4 +3186,11 @@ end|
call bug11333(10)|
drop procedure bug11333|
drop table t3|
drop function if exists bug9048|
create function bug9048(f1 char binary) returns char binary
begin
set f1= concat( 'hello', f1 );
return f1;
end|
drop function bug9048|
drop table t1,t2;
Loading