From ghutchis@wso.williams.edu Mon Dec 27 10:12:16 1999 Date: Mon, 27 Dec 1999 11:53:23 -0500 (EST) From: Geoff Hutchison To: htdig3-dev@htdig.org Subject: [htdig3-dev] ht://Dig and MySQL patches ... (fwd) I'm forwarding the first of two messages (with attachments) from someone who has expanded the database support. I haven't the time to review them, but post them here for others to look at them. -Geoff ---------- Forwarded message ---------- Date: Mon, 27 Dec 1999 14:23:57 +0100 (MET) From: Zoran Constantinescu-Fulop To: Geoff Hutchison Subject: ht://Dig and MySQL patches ... Hi, > You can always get the latest development code through > since a snapshot is made every > week from the CVS tree. It's quite a bit different from the 3.0.x and > 3.1.x code, so we'd be willing to see patches to 3.1.4 as well. > I figured out how to work with CVS :-) It's great! However I made the patches for the 3.1.4 release and not for the current snapshot. I attached a file describing the changes i've made to use MySQL with ht://Dig. I added the X_db, SQL_db and MySQL_db classes, and the hierarchy of classes becomes: X_db | `--- Database | `------ DB2_db | `------ SQL_db | `------ MySQL_db The only MySQL specific code is in the MySQL class, which uses the API of mysql (library libmysqlclient.a). The SQL code doesn't serialize the information as the DB2 code does, instead it uses specialized tables for all information (URLS, URLINFO, WORDS, LINKS and so). The Perl scripts for creating the SQL tables in the database are found in htdig3/contrib/sqldb. So I had to change all Database::Put/Get() calls everywhere to specialized calls. That's what I've put in the X_db class. To keep the DB2 functionality unchanged, I added a config variable 'db_type' which I used where the Put/Get methods where called (if we use SQL then the new functions will be called). I've attached also a patch with the changes to the 3.1.4 version. --zoran ------------------------------- Zoran Constantinescu -o) zoran@idi.ntnu.no /\\ http://www.idi.ntnu.no/~zoran _\_v ------------------------------- [Part 2, "" Text/PLAIN 57 lines] [Unable to print this part] [Part 3, "" Application/OCTET-STREAM (Name: "htdig-3.1.4-patch.tar.gz") 27KB] [Unable to print this part] [ Part 4: "Attached Text" ] ------------------------------------ To unsubscribe from the htdig3-dev mailing list, send a message to htdig3-dev-unsubscribe@htdig.org You will receive a message to confirm this.