Fixed some byte order bugs with prepared statements on machines with high-byte-first. (Bug #4173)

Fixed problem with NULL and derived tables (Bug #4097)
Cleanup of new pushed code


BitKeeper/etc/ignore:
  added mysql-test/ndb/ndbcluster
client/mysqltest.c:
  simple cleanup
innobase/os/os0file.c:
  fix for netware
libmysql/libmysql.c:
  Fixed some byte order bugs with prepared statements on machines with
  high-byte-first. (Bug #4173)
myisam/ft_boolean_search.c:
  Comment cleanup
myisam/mi_check.c:
  Removed not needed check (check is done in check_index())
myisam/mi_unique.c:
  crc must be of type ha_checksum.
myisam/myisamchk.c:
  Portability fix.
mysql-test/mysql-test-run.sh:
  Simple cleanup
mysql-test/r/subselect.result:
  Test problem with NULL and derived tables (Bug #4097)
mysql-test/t/subselect.test:
  Test problem with NULL and derived tables (Bug #4097)
sql/mysqld.cc:
  Remove not used defines
sql/sql_select.cc:
  Fixed problem with NULL and derived tables (Bug #4097)
  Indentation fixes
sql/sql_string.cc:
  Code cleanup
sql/sql_yacc.yy:
  Allow one to use DROP PREPARE ...
This commit is contained in:
unknown 2004-06-18 03:02:29 +03:00
commit 7d52eabb39
15 changed files with 95 additions and 64 deletions

View file

@ -69,7 +69,7 @@ my_bool mi_check_unique(MI_INFO *info, MI_UNIQUEDEF *def, byte *record,
ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
{
const byte *pos, *end;
ulong crc= 0;
ha_checksum crc= 0;
ulong seed= 4;
HA_KEYSEG *keyseg;
@ -109,8 +109,11 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
end= pos+length;
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT)
{
ulong tmp= 0;
keyseg->charset->coll->hash_sort(keyseg->charset,
(const uchar*) pos, length, &crc, &seed);
(const uchar*) pos, length, &tmp,
&seed);
crc^= tmp;
}
else
while (pos != end)
@ -118,7 +121,7 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
(((uchar) *(uchar*) pos++))) +
(crc >> (8*sizeof(ha_checksum)-8));
}
return (ha_checksum)crc;
return crc;
}
/*