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

Portability fixes for windows

After merge fixes
This commit is contained in:
monty@mashka.mysql.fi
2003-10-15 22:40:36 +03:00
parent e71b53a8fe
commit 9ef2a83fbe
16 changed files with 58 additions and 39 deletions

View File

@ -2656,9 +2656,9 @@ int mysql_checksum_table(THD *thd, TABLE_LIST *tables, HA_CHECK_OPT *check_opt)
while (!t->file->rnd_next(t->record[0]))
{
ha_checksum row_crc= 0;
if (t->record[0] != t->field[0]->ptr)
if (t->record[0] != (byte*) t->field[0]->ptr)
row_crc= my_checksum(row_crc, t->record[0],
t->field[0]->ptr - t->record[0]);
((byte*) t->field[0]->ptr) - t->record[0]);
for (uint i= 0; i < t->fields; i++ )
{
@ -2667,10 +2667,11 @@ int mysql_checksum_table(THD *thd, TABLE_LIST *tables, HA_CHECK_OPT *check_opt)
{
String tmp;
f->val_str(&tmp,&tmp);
row_crc= my_checksum(row_crc, tmp.ptr(), tmp.length());
row_crc= my_checksum(row_crc, (byte*) tmp.ptr(), tmp.length());
}
else
row_crc= my_checksum(row_crc, f->ptr, f->pack_length());
row_crc= my_checksum(row_crc, (byte*) f->ptr,
f->pack_length());
}
crc+= row_crc;