MCPcopy Create free account
hub / github.com/DeNA/HandlerSocket-Plugin-for-MySQL / dump_record

Method dump_record

handlersocket/database.cpp:547–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547void
548dbcontext::dump_record(dbcallback_i& cb, TABLE *const table,
549 const prep_stmt& pst)
550{
551 char rwpstr_buf[64];
552 String rwpstr(rwpstr_buf, sizeof(rwpstr_buf), &my_charset_bin);
553 const prep_stmt::fields_type& rf = pst.get_ret_fields();
554 const size_t n = rf.size();
555 for (size_t i = 0; i < n; ++i) {
556 uint32_t fn = rf[i];
557 Field *const fld = table->field[fn];
558 if (fld->is_null()) {
559 /* null */
560 fprintf(stderr, "NULL");
561 } else {
562 fld->val_str(&rwpstr, &rwpstr);
563 const std::string s(rwpstr.ptr(), rwpstr.length());
564 fprintf(stderr, "[%s]", s.c_str());
565 }
566 }
567 fprintf(stderr, "\n");
568}
569
570int
571dbcontext::modify_record(dbcallback_i& cb, TABLE *const table,

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected