diff options
author | unknown <anozdrin/alik@station.> | 2007-10-23 18:03:51 +0400 |
---|---|---|
committer | unknown <anozdrin/alik@station.> | 2007-10-23 18:03:51 +0400 |
commit | 6044965c4fe14785eb7294c68067486f7451a85f (patch) | |
tree | eaae216f32a03ef82da350e4dcf6edb1038c090f /sql/sql_table.cc | |
parent | d927461052084fc876151c42ea9502b5bf3fef4a (diff) | |
download | mariadb-git-6044965c4fe14785eb7294c68067486f7451a85f.tar.gz |
Patch for BUG#30736: Row Size Too Large Error Creating a Table and
Inserting Data.
The problem was that under some circumstances Field class was not
properly initialized before calling create_length_to_internal_length()
function, which led to assert failure.
The fix is to do the proper initialization.
The user-visible problem was that under some circumstances
CREATE TABLE ... SELECT statement crashed the server or led
to wrong error message (wrong results).
mysql-test/r/select.result:
Update result file.
mysql-test/t/select.test:
Add a test case for BUG#30736: Row Size Too Large Error
Creating a Table and Inserting Data.
sql/sql_table.cc:
Move sql_field->decimals initialization before
sql_field->create_length_to_internal_length() call.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 6cbe98fe862..b5628ab011b 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -955,8 +955,8 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info, sql_field->length= dup_field->char_length; sql_field->pack_length= dup_field->pack_length; sql_field->key_length= dup_field->key_length; - sql_field->create_length_to_internal_length(); sql_field->decimals= dup_field->decimals; + sql_field->create_length_to_internal_length(); sql_field->unireg_check= dup_field->unireg_check; /* We're making one field from two, the result field will have |