Repair query error
The query:
mysql_query(&mysql,"REPAIR TABLE locations;");
generates following error:
2006:MySQL server has gone away
the query runs well when ran through php!
so i guess it is some problem with c connector...
below is the full c program:
#include <stdio.h>
#include <stdlib.h>
#include "mysql.h"
MYSQL mysql;
MYSQL_RES *res;
MYSQL_ROW row;
int main()
{
char *server = "localhost";
char *user = "root";
char *password ="password";
char *database ="db";
mysql_real_connect(&mysql, server, user, password, database, 0, NULL, 0);
mysql_query(&mysql,"REPAIR TABLE locations;");
printf("%d:%s\n",mysql_errno(&mysql),mysql_error(&mysql));
mysql_close(&mysql);
}
Please help;
i am working on a database which handles about 100's of readings per second. so in case of any failure i need to manually run query repair table query on the server.
Subject
Views
Written By
Posted
Repair query error
3436
November 21, 2010 07:52AM
1279
January 26, 2011 01:10PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.