mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for BUG#35570 "CHECKSUM TABLE unreliable if LINESTRING field (same content/ differen
checksum)" The problem was that checksum of GEOMETRY type used memory addresses in the computation, making it un-repeatable thus useless. (This patch is a backport from 6.0 branch)
This commit is contained in:
@ -7897,8 +7897,14 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
|
||||
for (uint i= 0; i < t->s->fields; i++ )
|
||||
{
|
||||
Field *f= t->field[i];
|
||||
if ((f->type() == MYSQL_TYPE_BLOB) ||
|
||||
(f->type() == MYSQL_TYPE_VARCHAR))
|
||||
enum_field_types field_type= f->type();
|
||||
/*
|
||||
BLOB and VARCHAR have pointers in their field, we must convert
|
||||
to string; GEOMETRY is implemented on top of BLOB.
|
||||
*/
|
||||
if ((field_type == MYSQL_TYPE_BLOB) ||
|
||||
(field_type == MYSQL_TYPE_VARCHAR) ||
|
||||
(field_type == MYSQL_TYPE_GEOMETRY))
|
||||
{
|
||||
String tmp;
|
||||
f->val_str(&tmp);
|
||||
|
Reference in New Issue
Block a user