@@ -82,10 +82,10 @@ Member_actions_handler_configuration::enable_disable_action(
82
82
char buffer[MAX_FIELD_WIDTH];
83
83
String string (buffer, sizeof (buffer), &my_charset_bin);
84
84
table->field [3 ]->val_str (&string);
85
- std::string type (string. c_ptr_safe (), string. length () );
85
+ std::string type = to_string (string );
86
86
uint priority = static_cast <uint >(table->field [4 ]->val_int ());
87
87
table->field [5 ]->val_str (&string);
88
- std::string error_handling (string. c_ptr_safe (), string. length () );
88
+ std::string error_handling = to_string (string );
89
89
90
90
// delete row
91
91
error |= table->file ->ha_delete_row (table->record [0 ]);
@@ -188,21 +188,21 @@ bool Member_actions_handler_configuration::get_actions_for_event(
188
188
protobuf_replication_group_member_actions::Action *action =
189
189
action_list.add_action ();
190
190
table->field [0 ]->val_str (&string);
191
- action->set_name (string. c_ptr_safe (), string. length ( ));
191
+ action->set_name (to_string ( string));
192
192
193
193
table->field [1 ]->val_str (&string);
194
- action->set_event (string. c_ptr_safe (), string. length ( ));
194
+ action->set_event (to_string ( string));
195
195
196
196
action->set_enabled (table->field [2 ]->val_int ());
197
197
198
198
table->field [3 ]->val_str (&string);
199
- action->set_type (string. c_ptr_safe (), string. length ( ));
199
+ action->set_type (to_string ( string));
200
200
201
201
uint priority = static_cast <uint >(table->field [4 ]->val_int ());
202
202
action->set_priority (priority);
203
203
204
204
table->field [5 ]->val_str (&string);
205
- action->set_error_handling (string. c_ptr_safe (), string. length ( ));
205
+ action->set_error_handling (to_string ( string));
206
206
} while (!key_access.next ());
207
207
} else if (HA_ERR_END_OF_FILE == key_error) {
208
208
/* Table is empty, nothing to read. */
@@ -265,21 +265,21 @@ bool Member_actions_handler_configuration::get_all_actions_internal(
265
265
protobuf_replication_group_member_actions::Action *action =
266
266
action_list.add_action ();
267
267
table->field [0 ]->val_str (&string);
268
- action->set_name (string. c_ptr_safe (), string. length ( ));
268
+ action->set_name (to_string ( string));
269
269
270
270
table->field [1 ]->val_str (&string);
271
- action->set_event (string. c_ptr_safe (), string. length ( ));
271
+ action->set_event (to_string ( string));
272
272
273
273
action->set_enabled (table->field [2 ]->val_int ());
274
274
275
275
table->field [3 ]->val_str (&string);
276
- action->set_type (string. c_ptr_safe (), string. length ( ));
276
+ action->set_type (to_string ( string));
277
277
278
278
uint priority = static_cast <uint >(table->field [4 ]->val_int ());
279
279
action->set_priority (priority);
280
280
281
281
table->field [5 ]->val_str (&string);
282
- action->set_error_handling (string. c_ptr_safe (), string. length ( ));
282
+ action->set_error_handling (to_string ( string));
283
283
} while (!key_access.next ());
284
284
} else if (HA_ERR_END_OF_FILE == key_error) {
285
285
/* Table is already empty, nothing to read. */
0 commit comments