mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-21959 GIS error message doesn't show the wrong value, just the type.
Error message now shows the whole value.
This commit is contained in:
12
sql/field.cc
12
sql/field.cc
@ -8841,18 +8841,26 @@ int Field_geom::store(const char *from, uint length, CHARSET_INFO *cs)
|
||||
{
|
||||
const char *db= table->s->db.str;
|
||||
const char *tab_name= table->s->table_name.str;
|
||||
Geometry_buffer buffer;
|
||||
Geometry *geom= NULL;
|
||||
String wkt;
|
||||
const char *dummy;
|
||||
|
||||
if (!db)
|
||||
db= "";
|
||||
if (!tab_name)
|
||||
tab_name= "";
|
||||
wkt.set_charset(&my_charset_latin1);
|
||||
if (!(geom= Geometry::construct(&buffer, from, length)) ||
|
||||
geom->as_wkt(&wkt, &dummy))
|
||||
goto err;
|
||||
|
||||
my_error(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD, MYF(0),
|
||||
Geometry::ci_collection[geom_type]->m_name.str,
|
||||
Geometry::ci_collection[wkb_type]->m_name.str,
|
||||
db, tab_name, field_name,
|
||||
wkt.c_ptr(), db, tab_name, field_name,
|
||||
(ulong) table->in_use->get_stmt_da()->
|
||||
current_row_for_warning());
|
||||
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user