Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Commit 6db4ec1

Browse files
committed
Fix the DBUG_ASSERT in Proto_manager::get_descriptor
The read_proto_file and find_proto_definition change state so we cannot run them only in debug mode.
1 parent ce445d0 commit 6db4ec1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sql/proto_manager.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,11 @@ Descriptor *Proto_manager::get_descriptor(String *file_path, String *field,
142142
struct proto_file_data data;
143143
String proto_def;
144144

145-
DBUG_ASSERT(read_proto_file(&data, &file_name, mem_root));
146-
DBUG_ASSERT(find_proto_definition(&data, field, &proto_def));
145+
bool success;
146+
success= read_proto_file(&data, &file_name, mem_root);
147+
DBUG_ASSERT(success);
148+
success= find_proto_definition(&data, field, &proto_def);
149+
DBUG_ASSERT(success);
147150

148151
DescriptorPool *pool= new DescriptorPool;
149152
const Descriptor *mdesc= create_descriptor(&proto_def, pool, &field_path);

0 commit comments

Comments
 (0)