MCPcopy Create free account
hub / github.com/MariaDB/server / SendCommand

Method SendCommand

storage/connect/tabmysql.cpp:1045–1072  ·  view source on GitHub ↗

/ Send an UPDATE or DELETE command to the remote server. */ /

Source from the content-addressed store, hash-verified

1043/* Send an UPDATE or DELETE command to the remote server. */
1044/***********************************************************************/
1045int TDBMYSQL::SendCommand(PGLOBAL g)
1046 {
1047 int w;
1048
1049 if (Myc.ExecSQLcmd(g, Query->GetStr(), &w) == RC_NF) {
1050 AftRows = Myc.m_Afrw;
1051 snprintf(g->Message, sizeof(g->Message), "%s: %d affected rows", TableName, AftRows);
1052 PushWarning(g, this, 0); // 0 means a Note
1053
1054 if (trace(1))
1055 htrc("%s\n", g->Message);
1056
1057 if (w && Myc.ExecSQL(g, "SHOW WARNINGS") == RC_OK) {
1058 // We got warnings from the remote server
1059 while (Myc.Fetch(g, -1) == RC_OK) {
1060 snprintf(g->Message, sizeof(g->Message), "%s: (%s) %s", TableName,
1061 Myc.GetCharField(1), Myc.GetCharField(2));
1062 PushWarning(g, this);
1063 } // endwhile Fetch
1064
1065 Myc.FreeResult();
1066 } // endif w
1067
1068 return RC_EF; // Nothing else to do
1069 } else
1070 return RC_FX; // Error
1071
1072 } // end of SendCommand
1073
1074/***********************************************************************/
1075/* Data Base indexed read routine for MYSQL access method. */

Callers

nothing calls this directly

Calls 7

PushWarningFunction · 0.85
ExecSQLcmdMethod · 0.80
ExecSQLMethod · 0.80
GetCharFieldMethod · 0.80
FreeResultMethod · 0.80
htrcFunction · 0.70
FetchMethod · 0.45

Tested by

no test coverage detected