Loading include/mysql_com.h +5 −5 Original line number Diff line number Diff line Loading @@ -334,7 +334,7 @@ typedef struct st_udf_init unsigned int decimals; /* for real functions */ unsigned long max_length; /* For string functions */ char *ptr; /* free pointer for function data */ my_bool const_item; /* 0 if result is independent of arguments */ my_bool const_item; /* 1 if function always returns the same value */ } UDF_INIT; /* Constants when using compression */ Loading myisam/mi_check.c +1 −1 Original line number Diff line number Diff line Loading @@ -454,7 +454,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info) if ((!(param->testflag & T_SILENT))) printf ("- check data record references index: %d\n",key+1); if (keyinfo->flag & HA_FULLTEXT) if (keyinfo->flag & (HA_FULLTEXT | HA_SPATIAL)) full_text_keys++; if (share->state.key_root[key] == HA_OFFSET_ERROR && (info->state->records == 0 || keyinfo->flag & HA_FULLTEXT)) Loading mysql-test/r/gis.result +33 −1 Original line number Diff line number Diff line Loading @@ -668,7 +668,7 @@ def test t1 t1 g g 255 4294967295 0 Y 144 0 63 g select asbinary(g) from t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def asbinary(g) 252 8192 0 Y 128 0 63 def asbinary(g) 252 4294967295 0 Y 128 0 63 asbinary(g) drop table t1; create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b)); Loading Loading @@ -730,4 +730,36 @@ select geomfromtext(col9,col89) as a from t1; a NULL DROP TABLE t1; CREATE TABLE t1 ( geomdata polygon NOT NULL, SPATIAL KEY index_geom (geomdata) ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED; CREATE TABLE t2 ( geomdata polygon NOT NULL, SPATIAL KEY index_geom (geomdata) ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED; CREATE TABLE t3 select aswkb(ws.geomdata) AS geomdatawkb from t1 ws union select aswkb(ws.geomdata) AS geomdatawkb from t2 ws; describe t3; Field Type Null Key Default Extra geomdatawkb longblob YES NULL drop table t1; drop table t2; drop table t3; create table t1(col1 geometry not null,col15 geometrycollection not null,spatial index(col15),index(col1(15)))engine=myisam; insert into t1 set col15 = GeomFromText('POINT(6 5)'); insert into t1 set col15 = GeomFromText('POINT(6 5)'); check table t1 extended; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; End of 4.1 tests mysql-test/t/gis.test +42 −0 Original line number Diff line number Diff line Loading @@ -427,4 +427,46 @@ INSERT INTO `t1` VALUES ('','0000-00-00'); select geomfromtext(col9,col89) as a from t1; DROP TABLE t1; # # Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data) # CREATE TABLE t1 ( geomdata polygon NOT NULL, SPATIAL KEY index_geom (geomdata) ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED; CREATE TABLE t2 ( geomdata polygon NOT NULL, SPATIAL KEY index_geom (geomdata) ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED; CREATE TABLE t3 select aswkb(ws.geomdata) AS geomdatawkb from t1 ws union select aswkb(ws.geomdata) AS geomdatawkb from t2 ws; describe t3; drop table t1; drop table t2; drop table t3; # # Bug #30284 spatial key corruption # create table t1(col1 geometry not null,col15 geometrycollection not null,spatial index(col15),index(col1(15)))engine=myisam; insert into t1 set col15 = GeomFromText('POINT(6 5)'); insert into t1 set col15 = GeomFromText('POINT(6 5)'); check table t1 extended; drop table t1; --echo End of 4.1 tests sql/field.cc +1 −1 Original line number Diff line number Diff line Loading @@ -6975,7 +6975,7 @@ uint32 Field_blob::max_length() case 3: return 16777215 * field_charset->mbmaxlen; case 4: return (uint32) 4294967295U; return max_field_size; default: DBUG_ASSERT(0); // we should never go here return 0; Loading Loading
include/mysql_com.h +5 −5 Original line number Diff line number Diff line Loading @@ -334,7 +334,7 @@ typedef struct st_udf_init unsigned int decimals; /* for real functions */ unsigned long max_length; /* For string functions */ char *ptr; /* free pointer for function data */ my_bool const_item; /* 0 if result is independent of arguments */ my_bool const_item; /* 1 if function always returns the same value */ } UDF_INIT; /* Constants when using compression */ Loading
myisam/mi_check.c +1 −1 Original line number Diff line number Diff line Loading @@ -454,7 +454,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info) if ((!(param->testflag & T_SILENT))) printf ("- check data record references index: %d\n",key+1); if (keyinfo->flag & HA_FULLTEXT) if (keyinfo->flag & (HA_FULLTEXT | HA_SPATIAL)) full_text_keys++; if (share->state.key_root[key] == HA_OFFSET_ERROR && (info->state->records == 0 || keyinfo->flag & HA_FULLTEXT)) Loading
mysql-test/r/gis.result +33 −1 Original line number Diff line number Diff line Loading @@ -668,7 +668,7 @@ def test t1 t1 g g 255 4294967295 0 Y 144 0 63 g select asbinary(g) from t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def asbinary(g) 252 8192 0 Y 128 0 63 def asbinary(g) 252 4294967295 0 Y 128 0 63 asbinary(g) drop table t1; create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b)); Loading Loading @@ -730,4 +730,36 @@ select geomfromtext(col9,col89) as a from t1; a NULL DROP TABLE t1; CREATE TABLE t1 ( geomdata polygon NOT NULL, SPATIAL KEY index_geom (geomdata) ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED; CREATE TABLE t2 ( geomdata polygon NOT NULL, SPATIAL KEY index_geom (geomdata) ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED; CREATE TABLE t3 select aswkb(ws.geomdata) AS geomdatawkb from t1 ws union select aswkb(ws.geomdata) AS geomdatawkb from t2 ws; describe t3; Field Type Null Key Default Extra geomdatawkb longblob YES NULL drop table t1; drop table t2; drop table t3; create table t1(col1 geometry not null,col15 geometrycollection not null,spatial index(col15),index(col1(15)))engine=myisam; insert into t1 set col15 = GeomFromText('POINT(6 5)'); insert into t1 set col15 = GeomFromText('POINT(6 5)'); check table t1 extended; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; End of 4.1 tests
mysql-test/t/gis.test +42 −0 Original line number Diff line number Diff line Loading @@ -427,4 +427,46 @@ INSERT INTO `t1` VALUES ('','0000-00-00'); select geomfromtext(col9,col89) as a from t1; DROP TABLE t1; # # Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data) # CREATE TABLE t1 ( geomdata polygon NOT NULL, SPATIAL KEY index_geom (geomdata) ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED; CREATE TABLE t2 ( geomdata polygon NOT NULL, SPATIAL KEY index_geom (geomdata) ) ENGINE=MyISAM DEFAULT CHARSET=latin2 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED; CREATE TABLE t3 select aswkb(ws.geomdata) AS geomdatawkb from t1 ws union select aswkb(ws.geomdata) AS geomdatawkb from t2 ws; describe t3; drop table t1; drop table t2; drop table t3; # # Bug #30284 spatial key corruption # create table t1(col1 geometry not null,col15 geometrycollection not null,spatial index(col15),index(col1(15)))engine=myisam; insert into t1 set col15 = GeomFromText('POINT(6 5)'); insert into t1 set col15 = GeomFromText('POINT(6 5)'); check table t1 extended; drop table t1; --echo End of 4.1 tests
sql/field.cc +1 −1 Original line number Diff line number Diff line Loading @@ -6975,7 +6975,7 @@ uint32 Field_blob::max_length() case 3: return 16777215 * field_charset->mbmaxlen; case 4: return (uint32) 4294967295U; return max_field_size; default: DBUG_ASSERT(0); // we should never go here return 0; Loading