diff options
Diffstat (limited to 'storage/innobase/handler/ha_innodb.cc')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 49611fc5231..83da62591e3 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7103,10 +7103,14 @@ wsrep_store_key_val_for_row( /* In a column prefix index, we may need to truncate the stored value: */ - if (true_len > key_len) { true_len = key_len; } + /* cannot exceed max column lenght either, we may need to truncate + the stored value: */ + if (true_len > sizeof(sorted)) { + true_len = sizeof(sorted); + } memcpy(sorted, data, true_len); true_len = wsrep_innobase_mysql_sort( @@ -7119,8 +7123,8 @@ wsrep_store_key_val_for_row( actual data. The rest of the space was reset to zero in the bzero() call above. */ if (true_len > buff_space) { - fprintf (stderr, - "WSREP: key truncated: %s\n", + WSREP_DEBUG ( + "write set key truncated for: %s\n", wsrep_thd_query(thd)); true_len = buff_space; } |