Back to the month index |
Back to the list index
|
Henrik Olsen (Henrik.Olsen@iaeste.dk)
Thu, 27 Nov 1997 18:07:38 +0200
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: John Cartwright: "access control"
- Previous message: Daniel A. Christenson: "Salt for mod_auth"
From: "Henrik Olsen" <Henrik.Olsen@iaeste.dk> Date: Thu, 27 Nov 1997 18:07:38 +0200 Subject: Re: Synchronisation in msql Message-ID: <4061C3D2AAD@iaeste.dk>On 26 Nov 97 at 3:02, BJARKE CHRISTESEN wrote:
> Hello
>
> I am a student at advanced computer Studies, and we are using msql in
> a project. Now have to show, how there is taken care of
> synchronisation problems (readers/writers). Since I don't get any
> Answer from Hughes, I guess there may be somebody ou here who has an
> idea about where to get some material.
>
>
> Greetinrgs
> Bjarke Christesen
> d96bc@novell02.sdrborges.dk
Since mSQL is non-threaded, and queues multiple requests, there
aren't really any syncronisation problems.
Henrik Olsen
-- CNA, working on CNE. URL="http://www.iaeste.dk/~henrik/" Rule #1 for keeping your face young and good looking: Don't breathe fire when you have a beard. From grantt@nortel.ca Thu Nov 27 17:03:51 1997 Received: from mocha.bunyip.com (mocha.Bunyip.Com [192.197.208.1]) by services.bunyip.com (8.8.5/8.8.5) with ESMTP id RAA29798 for <msql-list@services.bunyip.com>; Thu, 27 Nov 1997 17:03:50 -0500 (EST) Received: from bcarsde4.localhost (mailgate.nortel.ca [192.58.194.74]) by mocha.bunyip.com (8.8.5/8.8.5) with ESMTP id RAA24148 for <msql-list@Bunyip.Com>; Thu, 27 Nov 1997 17:03:47 -0500 (EST) Message-Id: <199711272203.RAA24148@mocha.bunyip.com> Received: from bcarsfba.ca.nortel.com (actually bcarsfba.bnr.ca) by bcarsde4.localhost; Thu, 27 Nov 1997 17:01:23 -0500 Received: from bnr.ca by bcarsfba.bnr.ca id <27313-0@bcarsfba.bnr.ca>; Thu, 27 Nov 1997 17:00:57 -0500 Date: 27 Nov 1997 17:00 EST Sender: "Grant Totten" <grantt@nortel.ca> To: msql-list@Bunyip.Com From: "Grant Totten" <grantt@nortel.ca> Subject: [msql-list] Bad handshake still happening with 2.0.3!Hi all,
A while ago I posted about getting an error message every once in a while when connecting to a database. The message indicated a 'bad handshake' was happening. It only seemed to happen when the database server was fairly busy.
Recently, someone sent me an e-mail indicating they were having this problem and that going to version 2.0.3 of msql solved it. So today I downloaded and installed 2.0.3 on our server. This afternoon, I did some testing and discovered that the connect call will still fail every once in a while with a 'bad handshake' message. Argh!
So I had to write a hack like this:
while ($tries-- > 0) { # # Attempt to connect to database # if(!($DBH = Msql->connect($host, $database))) { # # This means the connect failed. Set error status # and sleep for 2 seconds before trying again. # $error = 1; &main::Debug("Trying..."); sleep 2; } else { # # The connection was successful. Skip to the end # of the loop. # $error = 0; last; } } #end while # # Return error status or Database Handle # if ($error) { return (0); } else { return ($DBH); }
Sigh.
Any suggestions?
Thanks.
Grant Totten Nortel Public Data Networks grantt@nortel.ca From wcchu@e3000.kh.misnet.net Fri Nov 28 04:31:21 1997 Received: from e3000.kh.misnet.net (e3000.kh.misnet.net [202.132.117.1]) by services.bunyip.com (8.8.5/8.8.5) with SMTP id EAA17038 for <msql-list@services.bunyip.com>; Fri, 28 Nov 1997 04:31:19 -0500 (EST) Received: (from Received: (from wcchu@localhost) by e3000.kh.misnet.net (8.6.12/8.6.12) id RAA16691 for msql-list@services.bunyip.com; Fri, 28 Nov 1997 17:27:02 +0800 From: Wei-Cheng Chu <wcchu@e3000.kh.misnet.net> Message-Id: <199711280927.RAA16691@e3000.kh.misnet.net> Subject: How do I duplicate tables? To: msql-list@services.bunyip.com Date: Fri, 28 Nov 1997 17:27:02 +0800 (CST) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit
Hi!
Can anyone tell me how to duplicate a new table from an existing one in the same database in C programs in msql-2.0.3?
I've check msql.h and found that there's a declaration for function msqlCreateTable(), but it seems not to be described in the manual. Can I use it? If I can, how should I use it?
If I can't, I think the only way is to use msqlQuery(). But I don't want the SQL statement for the table definition fixed in the source since the definition of the "template table" maybe changed some other day. So how can I dynamically obtain an existing table's definition and convert it into a SQL statement for creating new tables?
Thanks in advance. From ernst@pem.com Fri Nov 28 09:52:07 1997 Received: from mocha.bunyip.com (mocha.Bunyip.Com [192.197.208.1]) by services.bunyip.com (8.8.5/8.8.5) with ESMTP id JAA20969 for <msql-list@services.bunyip.com>; Fri, 28 Nov 1997 09:52:06 -0500 (EST) Received: from pemcom.pem.com (pemcom.pem.com [193.141.1.250]) by mocha.bunyip.com (8.8.5/8.8.5) with ESMTP id JAA26506 for <msql-list@Bunyip.Com>; Fri, 28 Nov 1997 09:52:03 -0500 (EST) Received: (from Received: (from root@localhost) by pemcom.pem.com (8.8.5/8.8.5) id PAA01502; Fri, 28 Nov 1997 15:51:47 +0100 (MET) Message-Id: <199711281451.PAA01502@pemcom.pem.com> Received: from cobra.pem.com(10.1.0.64) by amnesiac via smap (V1.3) id sma001500; Fri Nov 28 15:51:36 1997 Comments: Authenticated sender is <ernst@pemcom.pem.com> From: "Ernesto Baschny" <ernst@pem.com> To: Kevin McQuiggin <mcquiggi@sfu.ca>, msql-list@Bunyip.Com Date: Fri, 28 Nov 1997 15:51:52 +0100 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Simple Question, Apache and mSQL Priority: normal In-reply-to: <3.0.1.32.19971126122452.03095ef8@ferrari.sfu.ca> X-mailer: Pegasus Mail for Win32 (v2.54)
> Date: Wed, 26 Nov 1997 15:25:49 -0500 (EST) > Subject: Simple Question, Apache and mSQL
> Here's a question that is alluded to in the FAQ, but not specifically > answered: > > I run Apache as my web server, under FreeBSD. Both are current versions. > > How must I modify my srm.conf file to allow files of type ".msql" to be > automatically parsed by /usr/local/www/cgi-bin/w3-msql ? > > I gather from an extensive reading of the docs and FAQ that the AddHandler, > AddType, and Action directives (or some combo) are the way to do this. But > several combinations, e.g. > > AddHandler w3-msql .msql > Action w3-msql /usr/local/www/cgi-bin/w3-msql > > etc. have all proven unsuccessful.
Try not using the full path, just the path beginning from your document root:
AddHandler w3-msql .msql Action w3-msql /cgi-bin/w3-msql
This works fine for me.
-- Ernesto <baschneo@trick.informatik.uni-stuttgart.de> PEM GmbH <ernst@pem.com> Stuttgart - Germany From mario@wright.zmms.tu-berlin.de Fri Nov 28 10:44:14 1997 Received: from mail.zrz.TU-Berlin.DE (mail.zrz.TU-Berlin.DE [130.149.4.15]) by services.bunyip.com (8.8.5/8.8.5) with ESMTP id KAA22111 for <msql-list@services.bunyip.com>; Fri, 28 Nov 1997 10:44:13 -0500 (EST) Received: from wright.zmms.tu-berlin.de by mail.zrz.TU-Berlin.DE with SMTP (IC-PP); Fri, 28 Nov 1997 16:43:51 +0100 Received: from wright (nanna@wright.zmms.tu-berlin.de [130.149.124.4]) by wright.zmms.tu-berlin.de (8.8.5/8.8.5) with SMTP id QAA04359 for <msql-list@services.bunyip.com>; Fri, 28 Nov 1997 16:44:02 +0100 Sender: nanna@wright.zmms.tu-berlin.de Message-ID: <347EE6C2.71962230@wright.zmms.tu-berlin.de> Date: Fri, 28 Nov 1997 16:44:02 +0100 From: Mario Lasch <Mario.Lasch@zmms.tu-berlin.de> X-Mailer: Mozilla 3.0Gold (X11; I; Linux 2.0.30 i686) MIME-Version: 1.0 To: msql-list@services.bunyip.com Subject: Question about _rowid Content-Type: multipart/mixed; boundary="------------6FE803DF734C1F4E45E5D350"--------------6FE803DF734C1F4E45E5D350 Content-type: text/plain; charset="iso-8859-1" Content-transfer-encoding: 8bit
Question about _rowid:
Using Mini SQL Version 2.0.3 on our system (Linux 2.0.30 i686, S.u.S.E. 5.0), we have a database X containing two tables X1 and X2.
X1 and X2 are defined as:
CREATE TABLE X1 ( a text(10), b int not null )\g CREATE TABLE X2 ( a text(10), b int not null )\g
with these values:
INSERT INTO X1 (a,b) VALUES ('test1',0)\g INSERT INTO X1 (a,b) VALUES ('test2',1)\g INSERT INTO X2 (a,b) VALUES ('test3',0)\g INSERT INTO X2 (a,b) VALUES ('test4',1)\g
1) using the msql-interface we get an error on every select after this select:
SELECT X1.a, X1.b, X1._rowid, X2.a, X2.b, X2._rowid FROM X1, X2 WHERE X2.b = X1._rowid\g
the server msql2d crashes with this output:
Hit by a sig 11 Forced server shutdown due to bad signal! Forcing close on Socket 6 IOT trap/Abort
2) if we reverse the condition as in this select:
SELECT X1.a, X1.b, X1._rowid, X2.a, X2.b, X2._rowid FROM X1, X2 WHERE X1._rowid = X2.b\g
we get this - in our opinion wrong - output:
Query OK. 0 row(s) modified or retrieved.
Is this behaviour caused by our misunderstanding of the semantics of msql or is the reason for this an msql-error?
Can anyone produce the same results? For your convenience we attached a shell-script to reproduce this sequence. When you run it, it prompts you for the name of an already created database where you want to test this and which case you want to use.
mario
-- ----------------------------------------------- Mario LascheMail: Mario.Lasch@zmms.tu-berlin.de http://www.zmms.tu-berlin.de/~mario
Technische Universität Berlin Zentrum Mensch-Maschine-Systeme (ZMMS) Sekr. TIB 4/5-3 Gustav-Meyer-Allee 25 D-13355 Berlin
Tel.: ++49 30 314 72578 Fax : ++49 30 314 72581 http://www.zmms.tu-berlin.de/ -----------------------------------------------
--------------6FE803DF734C1F4E45E5D350 Content-type: application/x-sh; name="script.sh" Content-transfer-encoding: 7bit Content-Disposition: inline; filename="script.sh"
#!/bin/sh if [ "$1" != "" ]; then DB=$1; else echo -n "Which database should be used to run the example? "; read DB; echo fi if relshow $DB | egrep "( X1 | X2 )" > /dev/null; then echo "In database $DB you already have table X1 or X2." echo "Using this script would drop these tables." echo "Please use another database instead or drop these tables," echo "if you really want this." exit; fi CASE=$2 while [ "$CASE" != "1" -a "$CASE" != "2" ]; do echo "Case 1: SELECT ... WHERE X2.b = X1._rowid\g" echo "Case 2: SELECT ... WHERE X1._rowid = X2.b\g" echo -n "Which case should be used? (1,2) "; read CASE; if [ "$CASE" = "1" -o "$CASE" = "2" ]; then break; else echo echo "You have to type 1 or 2"; fi; done if [ "$CASE" = "1" ]; then WHERE="WHERE X2.b = X1._rowid\g"; elif [ "$CASE" = "2" ]; then WHERE="WHERE X1._rowid = X2.b\g"; fi; echo echo "running case $CASE (SELECT ... $WHERE) in database: $DB"; cat <<- eof | msql $DB CREATE TABLE X1 ( a text(10), b int not null )\g CREATE TABLE X2 ( a text(10), b int not null )\g INSERT INTO X1 (a,b) VALUES ('test1',0)\g INSERT INTO X1 (a,b) VALUES ('test2',1)\g INSERT INTO X2 (a,b) VALUES ('test3',0)\g INSERT INTO X2 (a,b) VALUES ('test4',1)\g SELECT X1.a, X1.b, X1._rowid, X2.a, X2.b, X2._rowid FROM X1, X2\g SELECT X1.a, X1.b, X1._rowid, X2.a, X2.b, X2._rowid FROM X1, X2 $WHERE DROP TABLE X1\g DROP TABLE X2\g eof
--------------6FE803DF734C1F4E45E5D350-- From royolsen@indra.com Fri Nov 28 12:45:55 1997 Received: from server.indra.com (server.indra.com [204.144.142.2]) by services.bunyip.com (8.8.5/8.8.5) with ESMTP id MAA24593 for <msql-list@services.bunyip.com>; Fri, 28 Nov 1997 12:45:55 -0500 (EST) Received: from indra.com (net.indra.com [204.144.142.1]) by server.indra.com (8.8.5/) with ESMTP id KAA01443 for <msql-list@services.bunyip.com>; Fri, 28 Nov 1997 10:45:56 -0700 (MST) Received: from indra.indra.com (dynamic085.indra.com [204.144.142.185]) by indra.com (8.8.5/Spike-8-1.0) with SMTP id KAA16226 for <msql-list@services.bunyip.com>; Fri, 28 Nov 1997 10:45:54 -0700 (MST) Message-Id: <3.0.1.32.19971128104545.00bf5a24@mail.indra.com> X-Sender: royolsen@mail.indra.com X-Mailer: Windows Eudora Light Version 3.0.1 (32) Date: Fri, 28 Nov 1997 10:45:45 -0700 To: msql-list@services.bunyip.com From: Roy Olsen <royolsen@indra.com> Subject: Re: a question of msql with Win95 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"
xiyuan,
Did you solve this problem? I replied to your second message but apparently it bounced. I notice your domain is not always available. I noticed that when I ping'ed it sometimes it timed out. Here is the reply I sent...
Once you create the "test" subdirectory of "msqldb" the database has been created. Just run the msql monitor and use the SQL statement "create table..." to make tables in the database.
Roy
At 01:37 PM 11/25/97 +0800, you wrote: >Hi, thanks a lot. >I just do it as you told me but unluck, I can not create the table and can >do nothing more. > >--xiyuan > >> >> This is a problem with mSQL 1.0.16 and Win95. The workaround is simple. >> Just create a "test" subdirectory in your "msqldb" directory. >> >> >Hi, I have setup the msql116.zip on my win95 box and also download the >> >php2msql1.exe file. Msqld run ok. But when I enter "msqladm create test" to >> >create a database, there is a error message: >> >mSQL command fialed! >> >Server error = Permission denied >> > > >
- Next message: John Cartwright: "access control"
- Previous message: Daniel A. Christenson: "Salt for mod_auth"