1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2020-03-20 22:06:55 +02:00
81 changed files with 2790 additions and 2803 deletions

View File

@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2017, Oracle and/or its affiliates.
Copyright (c) 2008, 2019, MariaDB
Copyright (c) 2008, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -9084,18 +9084,26 @@ int Field_geom::store(const char *from, size_t 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, uint32(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.str,
wkt.c_ptr(), db, tab_name, field_name.str,
(ulong) table->in_use->get_stmt_da()->
current_row_for_warning());
goto err_exit;
}