1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug #31145: ALTER TABLE DROP COLUMN, ADD COLUMN crashes (linux) or

freezes (win) the server

The check for equality was assuming the field object is always 
created. If it's not it was de-referencing a NULL pointer.
Fixed to use the data in the create object instead.
This commit is contained in:
Georgi Kodinov
2009-12-18 14:00:30 +02:00
parent 479668498b
commit dbb7073c21
3 changed files with 20 additions and 2 deletions

View File

@ -8282,8 +8282,7 @@ uint Field_blob::is_equal(Create_field *new_field)
return ((new_field->sql_type == get_blob_type_from_length(max_data_length()))
&& new_field->charset == field_charset &&
((Field_blob *)new_field->field)->max_data_length() ==
max_data_length());
new_field->pack_length == pack_length());
}