Commit 4b5dc47f authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-18659: Revert a non-functional change

fts_fetch_index_words(): Restore the initialization len=0.
The test innodb_fts.create in 10.2 would end up in an infinite loop
if this assignment is removed, because a following iteration of the
while() loop would assign zip->zp->avail_in=len with the original value
instead of the 0 that was reset in the previous iteration.
parent b7612116
...@@ -717,15 +717,15 @@ fts_fetch_index_words( ...@@ -717,15 +717,15 @@ fts_fetch_index_words(
zip->zp->next_in = static_cast<byte*>(data); zip->zp->next_in = static_cast<byte*>(data);
zip->zp->avail_in = len; zip->zp->avail_in = len;
ut_a(len <= FTS_MAX_WORD_LEN); ut_a(len <= FTS_MAX_WORD_LEN);
len = 0;
} }
break; continue;
case Z_STREAM_END: case Z_STREAM_END:
case Z_BUF_ERROR: case Z_BUF_ERROR:
case Z_STREAM_ERROR: case Z_STREAM_ERROR:
default: default:
ut_error; ut_error;
break;
} }
} }
......
...@@ -717,15 +717,15 @@ fts_fetch_index_words( ...@@ -717,15 +717,15 @@ fts_fetch_index_words(
zip->zp->next_in = static_cast<byte*>(data); zip->zp->next_in = static_cast<byte*>(data);
zip->zp->avail_in = len; zip->zp->avail_in = len;
ut_a(len <= FTS_MAX_WORD_LEN); ut_a(len <= FTS_MAX_WORD_LEN);
len = 0;
} }
break; continue;
case Z_STREAM_END: case Z_STREAM_END:
case Z_BUF_ERROR: case Z_BUF_ERROR:
case Z_STREAM_ERROR: case Z_STREAM_ERROR:
default: default:
ut_error; ut_error;
break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment