File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed
cdk/include/mysql/cdk/foundation Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -287,16 +287,8 @@ size_t str_decode(
287
287
rapidjson::EncodedInputStream<FROM, Mem_stream<char > > input (bytes);
288
288
Str_stream<typename TO::Ch> output (out);
289
289
290
- /*
291
- Note: EncodedInputStream looks for BOM mark and for that reason
292
- the underlying byte stream is ahead of the current position in the
293
- stream.
294
- */
295
-
296
- for (bool more = true ; more;)
290
+ while (input.Peek () != ' \0 ' )
297
291
{
298
- more = bytes.hasData ();
299
-
300
292
if (!Transcoder::Transcode (input, output))
301
293
{
302
294
// TODO: add some context info from the input stream.
Original file line number Diff line number Diff line change @@ -754,3 +754,21 @@ TEST_F(Bugs, bug29394723)
754
754
cout << " _platform: " << _platform << endl;
755
755
EXPECT_NE (" " , _platform);
756
756
}
757
+
758
+ TEST_F (Bugs, bug29847865)
759
+ {
760
+ SKIP_IF_NO_XPLUGIN
761
+
762
+ get_sess ().sql (" DROP TABLE IF EXISTS test.t" ).execute ();
763
+ get_sess ().sql (" CREATE TABLE test.t(a TEXT)" ).execute ();
764
+ Table t = get_sess ().getSchema (" test" ).getTable (" t" );
765
+
766
+ string foo = u" \x00000281\x00000282\x00000283\x00000284\x00000285\x00000286 " ;
767
+
768
+ t.insert ().values (foo).execute ();
769
+ Row r = t.select ().limit (1 ).execute ().fetchOne ();
770
+ string bar = r.get (0 );
771
+
772
+ EXPECT_EQ (foo.size (), bar.size ());
773
+ EXPECT_EQ (foo, bar);
774
+ }
You can’t perform that action at this time.
0 commit comments