DESCRIPTION

JVMCBC-403 Fix incorrect escape processing in streaming parser

Motivation
----------
Streaming parser with incorrectly consider escaped quote in a string
like "\\\"" as unescaped. Fix to consider the quote as correctly
escaped.

Changes
-------
String bytebuf processor keeps track of last two bytes to check if the
current byte is escaped. This is incorrect if the n-2th byte is already
escaped. So just keep track if the last byte is escaped to make
transitions to escaped or unescaped state.

Results
-------
Query parser now correctly parses continuous escape sequences. Added
unit test to verify.

Change-Id: Iba6bd747d19be7c93a031ea6235c93cf798309ff
Reviewed-on: http://review.couchbase.org/75374
Tested-by: Marques Ellis xxx@xxx.xxx
Reviewed-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Marques Ellis
date: 2017-03-21 20:12:07.585000000

Change has been successfully cherry-picked as d2d3d0a342ec07862448a638bc227f20b94c3207 by Marques Ellis

-------------------------------------
