mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
BUG#15981 Current 5.1 fails for NDB tests
This commit is contained in:
parent
a26ae25ee6
commit
7100dec8fe
1 changed files with 20 additions and 0 deletions
|
@ -3014,6 +3014,26 @@ void ha_ndbcluster::position(const byte *record)
|
|||
}
|
||||
*buff++= 0;
|
||||
}
|
||||
|
||||
size_t len = key_part->length;
|
||||
const byte * ptr = record + key_part->offset;
|
||||
Field *field = key_part->field;
|
||||
if ((field->type() == MYSQL_TYPE_VARCHAR) &&
|
||||
((Field_varstring*)field)->length_bytes == 1)
|
||||
{
|
||||
/**
|
||||
* Keys always use 2 bytes length
|
||||
*/
|
||||
buff[0] = ptr[0];
|
||||
buff[1] = 0;
|
||||
memcpy(buff+2, ptr + 1, len);
|
||||
len += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(buff, ptr, len);
|
||||
}
|
||||
buff += len;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue