int main(int argc, char **argv) 
{
  MYSQL *mysql = NULL;

  mysql = mysql_init(mysql);

  if (!mysql) {
    puts("Init faild, out of memory?");
    return EXIT_FAILURE;
  }
        
  if (!mysql_real_connect(mysql,       /* MYSQL structure to use */
			  MYSQL_HOST,         /* server hostname or IP address */ 
			  MYSQL_USER,         /* mysql user */
			  MYSQL_PWD,          /* password */
			  NULL,               /* default database to use, NULL for none */
			  0,           /* port number, 0 for default */
			  NULL,        /* socket file or named pipe name */
			  CLIENT_FOUND_ROWS /* connection flags */ )) {
    puts("Connect failed\n");
  } else {
    if (mysql_dump_debug_info(mysql)) {
      printf("Debug dump error: %s\n", mysql_error(mysql));
    } else {
      puts("Debug Dump OK, check server error log for output\n");
    }
  }
        
  mysql_close(mysql);

  return EXIT_SUCCESS;
}
Пример #2
0
/*	dump_debug_info()	*/
static VALUE dump_debug_info(VALUE obj)
{
    MYSQL* m = GetHandler(obj);
    if (mysql_dump_debug_info(m) != 0)
	mysql_raise(m);
    return obj;
}
Пример #3
0
static int test_bug28075(MYSQL *mysql)
{
  int rc;

  rc= mysql_dump_debug_info(mysql);
  check_mysql_rc(rc, mysql);

  rc= mysql_ping(mysql);
  check_mysql_rc(rc, mysql);

  return OK;
}
Пример #4
0
static PyObject* wsql_connection_dump_debug_info(wsql_connection *self)
{
    int error;
    CHECK_CONNECTION(self, NULL);
    Py_BEGIN_ALLOW_THREADS
    error = mysql_dump_debug_info(&(self->connection));
    Py_END_ALLOW_THREADS
    if (error)
        return wsql_raise_error(self);

    Py_RETURN_NONE;
}
Пример #5
0
int CDatabase_Connection::dump_debug_info()
{
	return mysql_dump_debug_info(&my);
}