From 8897b50dca49df288595a9146631c4b789de7685 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 16 Feb 2017 13:24:00 +0100 Subject: MDEV-11525 Assertion `cp + len <= buff + buff_size' failed in JOIN_CACHE::write_record_data Workaround for join_cache + index on vcols + keyread bug. Initialize the record to avoid caching garbage in non-read fields. A proper fix (do not cache non-read fields at all) is done in 10.2 in commits 5d7607f340f..8d99166c697 --- sql/sql_join_cache.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sql/sql_join_cache.cc') diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index 9411b3a92c8..820ac75c885 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -589,6 +589,11 @@ void JOIN_CACHE::create_remaining_fields() { MY_BITMAP *rem_field_set; TABLE *table= tab->table; +#if MYSQL_VERSION_ID < 100204 + empty_record(table); +#else +#error remove +#endif if (all_read_fields) rem_field_set= table->read_set; -- cgit v1.2.1 From f0ec34002a98eeb669cb254eaba6a3d678a58cc1 Mon Sep 17 00:00:00 2001 From: iangilfillan Date: Fri, 10 Feb 2017 13:26:55 +0200 Subject: Correct FSF address --- sql/sql_join_cache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_join_cache.cc') diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index 9df993cf035..1023aea4cd4 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ /** @file -- cgit v1.2.1