Skip to content

Commit

Permalink
Revert "Bug#23707238 - PROTOBUF LIMITS THE NUMBER OF NESTED OBJECTS T…
Browse files Browse the repository at this point in the history
…O 100 RECURSIONS"

This reverts commit 145efe432458cabb3fca519e720ece91e5434d08.
  • Loading branch information
Grzegorz Szwarc committed Jul 1, 2016
1 parent a051b92 commit c740c8f
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 154 deletions.
11 changes: 4 additions & 7 deletions rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,8 @@ class Command
m_commands["enablessl"] = &Command::cmd_enablessl;
m_commands["sleep "] = &Command::cmd_sleep;
m_commands["login "] = &Command::cmd_login;
m_commands["stmtadmin "] = &Command::cmd_stmtadmin;
m_commands["stmtsql "] = &Command::cmd_stmtsql;
m_commands["stmtadmin "] = &Command::cmd_stmt_admin;
m_commands["stmtsql "] = &Command::cmd_stmt_sql;
m_commands["loginerror "] = &Command::cmd_loginerror;
m_commands["repeat "] = &Command::cmd_repeat;
m_commands["endrepeat"] = &Command::cmd_endrepeat;
Expand Down Expand Up @@ -1149,7 +1149,7 @@ class Command
return Continue;
}

Result cmd_stmtsql(Execution_context &context, const std::string &args)
Result cmd_stmt_sql(Execution_context &context, const std::string &args)
{
Mysqlx::Sql::StmtExecute stmt;

Expand All @@ -1165,7 +1165,7 @@ class Command
}


Result cmd_stmtadmin(Execution_context &context, const std::string &args)
Result cmd_stmt_admin(Execution_context &context, const std::string &args)
{
std::string tmp = args;
replace_variables(tmp);
Expand Down Expand Up @@ -1296,9 +1296,6 @@ class Command
variable_name = argl[1];
}

// Allow use of variables as a source of number of iterations
replace_variables(argl[0]);

Loop_do loop = {context.m_stream.tellg(), atoi(argl[0].c_str()), 0, variable_name};

m_loop_stack.push_back(loop);
Expand Down
6 changes: 0 additions & 6 deletions rapid/plugin/x/ngs/src/protocol_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,6 @@ Error_code Message_decoder::parse(Request &request)
static_cast<int>(buffer.length()));
// variable 'mysqlx_max_allowed_packet' has been checked when buffer was filling by data
stream.SetTotalBytesLimit(static_cast<int>(buffer.length()), -1 /*no warnings*/);
// Protobuf limits the number of nested objects in decoded message
// 400 nested objects should be enough to write complicated queries.
// Protobuf doesn't print a readable error after reaching the limit
// thus we would like to ensure that user doesn't hit the error
stream.SetRecursionLimit(400);

message->ParseFromCodedStream(&stream);

if (!message->IsInitialized())
Expand Down
16 changes: 8 additions & 8 deletions rapid/plugin/x/protocol/mysqlx_datatypes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ message Scalar {
required bytes value = 1;
optional uint64 collation = 2;
};

// an opaque octet sequence, with an optional content_type
// See ``Mysqlx.Resultset.ColumnMetadata`` for list of known values.
message Octets {
required bytes value = 1;
optional uint32 content_type = 2;
};

// an opaque octet sequence, with an optional content_type
// See ``Mysqlx.Resultset.ColumnMetadata`` for list of known values.
message Octets {
required bytes value = 1;
optional uint32 content_type = 2;
};
enum Type {
V_SINT = 1;
V_UINT = 2;
Expand Down
3 changes: 0 additions & 3 deletions rapid/plugin/x/tests/mtr/include/connection_ssl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
# Modified : 19-08-2015 Lalit Choudhary

--echo Preamble
--source ../include/have_performance_schema_threads.inc

--source ../include/xplugin_preamble.inc

SET GLOBAL mysqlx_connect_timeout = 300;
call mtr.add_suppression("Unsuccessful login attempt");

Expand Down

This file was deleted.

23 changes: 0 additions & 23 deletions rapid/plugin/x/tests/mtr/r/protobuf_nested.result

This file was deleted.

2 changes: 0 additions & 2 deletions rapid/plugin/x/tests/mtr/t/connection_nonssl.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Created : 21-08-2015 Lalit Choudhary

--echo Preamble
--source ../include/have_performance_schema_threads.inc

--source ../include/xplugin_preamble.inc

SET GLOBAL mysqlx_connect_timeout = 300;
Expand Down
2 changes: 1 addition & 1 deletion rapid/plugin/x/tests/mtr/t/performance_schema.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Preamble
--source include/not_embedded.inc
--source ../include/have_performance_schema_threads.inc
--source include/have_perfschema.inc

--source ../include/xplugin_preamble.inc

Expand Down
1 change: 0 additions & 1 deletion rapid/plugin/x/tests/mtr/t/protobuf_nested-master.opt

This file was deleted.

98 changes: 0 additions & 98 deletions rapid/plugin/x/tests/mtr/t/protobuf_nested.test

This file was deleted.

0 comments on commit c740c8f

Please sign in to comment.