mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fixed bug with UPDATE/DELETE on UNIQUE key which could be NULL
Docs/manual.texi: Updated replication section mysql-test/r/null_key.result: Added test UPDATE/DELETE with IS NULL on unique key mysql-test/t/null_key.test: Added test UPDATE/DELETE with IS NULL on unique key mysys/Makefile.am: Removed -f from $CP as this is not portable Fixed rule for testhash sql/field.cc: Safety fix sql/opt_range.cc: Fixed bug with UPDATE/DELETE on UNIQUE key which could be NULL sql/opt_range.h: Fixed bug with UPDATE/DELETE on UNIQUE key which could be NULL
This commit is contained in:
@@ -3891,7 +3891,7 @@ String *Field_blob::val_str(String *val_buffer __attribute__((unused)),
|
||||
char *blob;
|
||||
memcpy_fixed(&blob,ptr+packlength,sizeof(char*));
|
||||
if (!blob)
|
||||
val_ptr->length(0);
|
||||
val_ptr->set("",0); // A bit safer than ->length(0)
|
||||
else
|
||||
val_ptr->set((const char*) blob,get_length(ptr));
|
||||
return val_ptr;
|
||||
|
||||
Reference in New Issue
Block a user