Skip to content

Commit cb7af34

Browse files
author
Allen.Lai
committed
Bug#20209756 MYSQL CRASHED BECAUSE OF APPEND OPERATION
This bug is caused by trying to do "append" on a integer column. We should block this operation. Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com> RB: 7804
1 parent 33c2404 commit cb7af34

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

plugin/innodb_memcached/innodb_memcache/src/innodb_api.c

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/***********************************************************************
22
3-
Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3+
Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
44
55
This program is free software; you can redistribute it and/or modify it
66
under the terms of the GNU General Public License as published by the
@@ -1488,9 +1488,19 @@ innodb_api_link(
14881488
column_used = 0;
14891489
}
14901490

1491+
/* For int column, we don't support append command. */
1492+
if (append && !result->extra_col_value[column_used].is_str) {
1493+
return DB_UNSUPPORTED;
1494+
}
1495+
14911496
before_len = result->extra_col_value[column_used].value_len;
14921497
before_val = result->extra_col_value[column_used].value_str;
14931498
} else {
1499+
/* For int column, we don't support append command. */
1500+
if (append && !result->col_value[MCI_COL_VALUE].is_str) {
1501+
return DB_UNSUPPORTED;
1502+
}
1503+
14941504
before_len = result->col_value[MCI_COL_VALUE].value_len;
14951505
before_val = result->col_value[MCI_COL_VALUE].value_str;
14961506
column_used = UPDATE_ALL_VAL_COL;

0 commit comments

Comments
 (0)