[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2389 - in GNUnet: contrib src/applications/sqstore_mysql
From: |
grothoff |
Subject: |
[GNUnet-SVN] r2389 - in GNUnet: contrib src/applications/sqstore_mysql |
Date: |
Fri, 23 Dec 2005 14:04:15 -0800 (PST) |
Author: grothoff
Date: 2005-12-23 14:04:13 -0800 (Fri, 23 Dec 2005)
New Revision: 2389
Modified:
GNUnet/contrib/config-daemon.in
GNUnet/src/applications/sqstore_mysql/check.conf
GNUnet/src/applications/sqstore_mysql/mysql.c
Log:
fixing problems with delayed
Modified: GNUnet/contrib/config-daemon.in
===================================================================
--- GNUnet/contrib/config-daemon.in 2005-12-23 21:38:26 UTC (rev 2388)
+++ GNUnet/contrib/config-daemon.in 2005-12-23 22:04:13 UTC (rev 2389)
@@ -883,20 +883,6 @@
endmenu
- if Meta::ADVANCED
-
- menu "MySQL" "MYSQL"
- config DELAYED
- bool "Delayed operations"
- default n
- help
- If you suffer from too slow index/insert speeds,
- you might try to set this to YES for a small
- efficiency boost. If you run into any trouble
- because of it, you're on your own.
- Default: NO
- endmenu
-
endif
if Meta::EXPERIMENTAL && Meta::RARE && Meta::ADVANCED
Modified: GNUnet/src/applications/sqstore_mysql/check.conf
===================================================================
--- GNUnet/src/applications/sqstore_mysql/check.conf 2005-12-23 21:38:26 UTC
(rev 2388)
+++ GNUnet/src/applications/sqstore_mysql/check.conf 2005-12-23 22:04:13 UTC
(rev 2389)
@@ -36,5 +36,5 @@
POOL = 32
[MYSQL]
-DELAYED = YES
DATABASE = "gnunetcheck"
+CONFIG = ~/my.cnf
Modified: GNUnet/src/applications/sqstore_mysql/mysql.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysql.c 2005-12-23 21:38:26 UTC
(rev 2388)
+++ GNUnet/src/applications/sqstore_mysql/mysql.c 2005-12-23 22:04:13 UTC
(rev 2389)
@@ -111,19 +111,6 @@
* 2) by executing
* mysql> REPAIR TABLE gn070;
*
- * EFFICIENCY ISSUES
- *
- * If you suffer from too slow index/insert speeds,
- * you might try to define /etc/gnunetd.conf option
- *
- * [MYSQL]
- * DELAYED = YES
- *
- * for small efficiency boost. The option will let MySQL bundle multiple
- * inserts before actually writing them to disk. You shouldn't use this
- * option unless you're an (my)sql expert and really know what you're doing.
- * Especially, if you run into any trouble due to this, you're on your own.
- *
* PROBLEMS?
*
* If you have problems related to the mysql module, your best
@@ -170,7 +157,6 @@
Mutex DATABASE_Lock_;
int avgLength_ID; /* which column contains the Avg_row_length
* in SHOW TABLE STATUS resultset */
- int useDelayed; /* use potentially unsafe delayed inserts? */
char * cnffile;
int prepare;
MYSQL_STMT * insert;
@@ -188,7 +174,6 @@
} mysqlHandle;
#define INSERT_SAMPLE "INSERT INTO gn070
(size,type,prio,anonLevel,expire,hash,value) VALUES (?,?,?,?,?,?,?)"
-#define INSERT_SAMPLE_DELAYED "INSERT DELAYED INTO gn070
(size,type,prio,anonLevel,expire,hash,value) VALUES (?,?,?,?,?,?,?)"
#define SELECT_SAMPLE "SELECT * FROM gn070 WHERE hash=?"
#define SELECT_SAMPLE_COUNT "SELECT count(*) FROM gn070 WHERE hash=?"
@@ -374,12 +359,8 @@
return SYSERR;
}
if (mysql_stmt_prepare(dbhI->insert,
- dbh->useDelayed
- ? INSERT_SAMPLE_DELAYED
- : INSERT_SAMPLE,
- strlen(dbh->useDelayed
- ? INSERT_SAMPLE_DELAYED
- : INSERT_SAMPLE)) ||
+ INSERT_SAMPLE,
+ strlen(INSERT_SAMPLE)) ||
mysql_stmt_prepare(dbhI->select,
SELECT_SAMPLE,
strlen(SELECT_SAMPLE)) ||
@@ -411,7 +392,6 @@
mysql_stmt_close(dbhI->selectc);
mysql_stmt_close(dbhI->selects);
mysql_stmt_close(dbhI->selectsc);
- mysql_stmt_close(dbhI->insert);
mysql_stmt_close(dbhI->update);
mysql_stmt_close(dbhI->deleteh);
mysql_stmt_close(dbhI->deleteg);
@@ -1213,6 +1193,10 @@
if (cnffile == NULL) {
cnffile = MALLOC(nX);
SNPRINTF(cnffile, nX, "%s/.my.cnf", home_dir);
+ } else {
+ char * ex = expandFileName(cnffile);
+ FREE(cnffile);
+ cnffile = ex;
}
#ifdef WINDOWS
FREE(home_dir);
@@ -1231,12 +1215,6 @@
dbh = MALLOC(sizeof(mysqlHandle));
dbh->cnffile = cnffile;
- if (testConfigurationString("MYSQL",
- "DELAYED",
- "YES"))
- dbh->useDelayed = YES;
- else
- dbh->useDelayed = NO;
if (OK != iopen(dbh, YES)) {
FREE(cnffile);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2389 - in GNUnet: contrib src/applications/sqstore_mysql,
grothoff <=