/ Send an UPDATE or DELETE command to the remote server. */ /
| 1043 | /* Send an UPDATE or DELETE command to the remote server. */ |
| 1044 | /***********************************************************************/ |
| 1045 | int 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. */ |
nothing calls this directly
no test coverage detected