mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-7540 Information Schema SPATIAL_REF_SYS contents don't match the expected contents.
Table content filled appropriately. Thare are still just two records as we don't have geodetics yet.
This commit is contained in:
@ -1727,7 +1727,7 @@ Table Create Table
|
|||||||
SPATIAL_REF_SYS CREATE TEMPORARY TABLE `SPATIAL_REF_SYS` (
|
SPATIAL_REF_SYS CREATE TEMPORARY TABLE `SPATIAL_REF_SYS` (
|
||||||
`SRID` smallint(5) NOT NULL DEFAULT '0',
|
`SRID` smallint(5) NOT NULL DEFAULT '0',
|
||||||
`AUTH_NAME` varchar(512) NOT NULL DEFAULT '',
|
`AUTH_NAME` varchar(512) NOT NULL DEFAULT '',
|
||||||
`AUTH_SRID` smallint(5) NOT NULL DEFAULT '0',
|
`AUTH_SRID` int(5) NOT NULL DEFAULT '0',
|
||||||
`SRTEXT` varchar(2048) NOT NULL DEFAULT ''
|
`SRTEXT` varchar(2048) NOT NULL DEFAULT ''
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8
|
) ENGINE=MEMORY DEFAULT CHARSET=utf8
|
||||||
create table t1(g GEOMETRY, pt POINT);
|
create table t1(g GEOMETRY, pt POINT);
|
||||||
|
@ -326,7 +326,7 @@ def information_schema SESSION_STATUS VARIABLE_VALUE 2 NO varchar 2048 6144 NUL
|
|||||||
def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
|
def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||||
def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select
|
def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select
|
||||||
def information_schema SPATIAL_REF_SYS AUTH_NAME 2 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select
|
def information_schema SPATIAL_REF_SYS AUTH_NAME 2 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select
|
||||||
def information_schema SPATIAL_REF_SYS AUTH_SRID 3 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select
|
def information_schema SPATIAL_REF_SYS AUTH_SRID 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(5) select
|
||||||
def information_schema SPATIAL_REF_SYS SRID 1 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select
|
def information_schema SPATIAL_REF_SYS SRID 1 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select
|
||||||
def information_schema SPATIAL_REF_SYS SRTEXT 4 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select
|
def information_schema SPATIAL_REF_SYS SRTEXT 4 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select
|
||||||
def information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select
|
def information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select
|
||||||
@ -855,7 +855,7 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet
|
|||||||
3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
|
3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
|
||||||
NULL information_schema SPATIAL_REF_SYS SRID smallint NULL NULL NULL NULL smallint(5)
|
NULL information_schema SPATIAL_REF_SYS SRID smallint NULL NULL NULL NULL smallint(5)
|
||||||
3.0000 information_schema SPATIAL_REF_SYS AUTH_NAME varchar 512 1536 utf8 utf8_general_ci varchar(512)
|
3.0000 information_schema SPATIAL_REF_SYS AUTH_NAME varchar 512 1536 utf8 utf8_general_ci varchar(512)
|
||||||
NULL information_schema SPATIAL_REF_SYS AUTH_SRID smallint NULL NULL NULL NULL smallint(5)
|
NULL information_schema SPATIAL_REF_SYS AUTH_SRID int NULL NULL NULL NULL int(5)
|
||||||
3.0000 information_schema SPATIAL_REF_SYS SRTEXT varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
|
3.0000 information_schema SPATIAL_REF_SYS SRTEXT varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
|
||||||
3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
|
3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
|
||||||
3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
|
3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
|
||||||
|
@ -344,14 +344,21 @@ static int fill_spatial_ref_sys(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||||||
table->field[0]->store(-1, FALSE); /*SRID*/
|
table->field[0]->store(-1, FALSE); /*SRID*/
|
||||||
table->field[1]->store(STRING_WITH_LEN("Not defined"), cs); /*AUTH_NAME*/
|
table->field[1]->store(STRING_WITH_LEN("Not defined"), cs); /*AUTH_NAME*/
|
||||||
table->field[2]->store(-1, FALSE); /*AUTH_SRID*/
|
table->field[2]->store(-1, FALSE); /*AUTH_SRID*/
|
||||||
table->field[3]->store(STRING_WITH_LEN(""), cs);/*SRTEXT*/
|
table->field[3]->store(STRING_WITH_LEN(
|
||||||
|
"LOCAL_CS[\"Spatial reference wasn't specified\","
|
||||||
|
"LOCAL_DATUM[\"Unknown\",0]," "UNIT[\"m\",1.0]," "AXIS[\"x\",EAST],"
|
||||||
|
"AXIS[\"y\",NORTH]]"), cs);/*SRTEXT*/
|
||||||
if (schema_table_store_record(thd, table))
|
if (schema_table_store_record(thd, table))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
table->field[0]->store(0, TRUE); /*SRID*/
|
table->field[0]->store(0, TRUE); /*SRID*/
|
||||||
table->field[1]->store(STRING_WITH_LEN("Cartesian plane"), cs); /*AUTH_NAME*/
|
table->field[1]->store(STRING_WITH_LEN("EPSG"), cs); /*AUTH_NAME*/
|
||||||
table->field[2]->store(0, TRUE); /*AUTH_SRID*/
|
table->field[2]->store(404000, TRUE); /*AUTH_SRID*/
|
||||||
table->field[3]->store(STRING_WITH_LEN(""), cs);/*SRTEXT*/
|
table->field[3]->store(STRING_WITH_LEN(
|
||||||
|
"LOCAL_CS[\"Wildcard 2D cartesian plane in metric unit\","
|
||||||
|
"LOCAL_DATUM[\"Unknown\",0]," "UNIT[\"m\",1.0],"
|
||||||
|
"AXIS[\"x\",EAST]," "AXIS[\"y\",NORTH],"
|
||||||
|
"AUTHORITY[\"EPSG\",\"404000\"]]"), cs);/*SRTEXT*/
|
||||||
if (schema_table_store_record(thd, table))
|
if (schema_table_store_record(thd, table))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
@ -8977,7 +8984,7 @@ ST_FIELD_INFO spatial_ref_sys_fields_info[]=
|
|||||||
{
|
{
|
||||||
{"SRID", 5, MYSQL_TYPE_SHORT, 0, 0, 0, SKIP_OPEN_TABLE},
|
{"SRID", 5, MYSQL_TYPE_SHORT, 0, 0, 0, SKIP_OPEN_TABLE},
|
||||||
{"AUTH_NAME", FN_REFLEN, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
|
{"AUTH_NAME", FN_REFLEN, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
|
||||||
{"AUTH_SRID", 5, MYSQL_TYPE_SHORT, 0, 0, 0, SKIP_OPEN_TABLE},
|
{"AUTH_SRID", 5, MYSQL_TYPE_LONG, 0, 0, 0, SKIP_OPEN_TABLE},
|
||||||
{"SRTEXT", 2048, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
|
{"SRTEXT", 2048, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
|
||||||
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, 0}
|
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user