Exemplo n.º 1
0
static void set_character_set_cont(int fd, short event, void *_userdata) {
  struct maria_status *ms = (struct maria_status *)_userdata;
  MYSQL *conn = (MYSQL *)ms->data;
  lua_State *L = ms->L;

  int ret = 0;
  int status = mysql_set_character_set_cont(&ret, conn, ms->status);
  if (status) {
    wait_for_status(L, ms->conn_data, conn, status, set_character_set_cont,
                    ms->extra);
  } else if (ret == 0) {
    lua_pushboolean(L, 1);
    FAN_RESUME(L, NULL, 1);
    UNREF_CO(ms->conn_data);
  } else {
    FAN_RESUME(L, NULL, luamariadb_push_errno(L, ms->conn_data));
    UNREF_CO(ms->conn_data);
  }

  event_free(ms->event);
  free(ms);
}
Exemplo n.º 2
0
void MySQL_Connection::set_names_cont(short event) {
	proxy_debug(PROXY_DEBUG_MYSQL_PROTOCOL, 6,"event=%d\n", event);
	async_exit_status = mysql_set_character_set_cont(&interr,mysql, mysql_status(event, true));
}