Archived
1
0
Fork 0

arch/mysql.c: fixed the test and a overflow in init(). mysql needs alot more love.

This commit is contained in:
H Hautakoski 2010-08-26 21:37:47 +02:00 committed by Henrik Hautakoski
parent bc7492cb1d
commit 8cafb25c42
3 changed files with 63 additions and 74 deletions

View file

@ -1,33 +1,20 @@
#ifndef INOTIFY_DEBUG
#define INOTIFY_DEBUG
#endif
#include <stdio.h>
#include "../src/notify_db.h"
#include "../src/arch/db.h"
int main(int argc, char *argv[]) {
// Keep me safe
printf("Run!\n");
// Connect
notify_db_init("localhost", "warez", "elebobo", "filesystem", "filesystem");
// Truncate
//notify_db_truncate();
arch_db_init("localhost", "warez", "elebobo", "filesystem", "filesystem");
sleep(10);
// Insert
notify_db_insert("/this/is/my/path/to/", "myfile", 0);
arch_db_insert("/this/is/my/path/to/", "myfile", 0);
// Delete
//notify_db_delete("/this/is/my/path/to/", "myfile");
arch_db_delete("/this/is/my/path/to/", "myfile");
// Close
notify_db_close();
arch_db_close();
// Kill me
return 0;
}
}