00:04:46 bakataro has quit ("daabaa chizubaagaa setto onegaishimas") 00:06:32 davb: see: bug#1343 00:07:56 bbiaw 00:40:45 denshi has quit () 01:37:03 Psychephylax has quit ("BitchX-1.0c17 -- just do it.") 02:03:58 back 02:04:17 * jim will try to solve bug#1343 03:09:53 thom (~Snak@12-248-24-199.client.attbi.com) has joined #openacs 03:10:11 thom is now known as _thom_ 03:11:36 <_thom_> _thom_ has left #openacs 03:23:14 rbm has quit (Read error: 113 (No route to host)) 03:26:37 paje has quit (Read error: 110 (Connection timed out)) 03:26:48 hi, I'm having problems remembering how to order the ands for the where clause to make things most efficient 03:33:44 but more basic, I'm editing wp-slim/www/index-postgresql.xql and I'm realizing I don't know how to get the current package instance id 03:33:52 in a query 03:36:18 bind variable from whats stuffed in ad_conn ? 03:36:44 maybe ad_conn package_id ? (its been a while for me ;) 03:38:24 hazmat: Hi 03:38:32 and ao.context_id = :wp_instance_id 03:38:41 I added that to each query... 03:39:04 cool. 03:39:20 so now I make sure $wp_instance_id is set before any of those queries? 03:39:58 yup 03:40:08 set wp_instance_id [ad_conn package_id] ? 03:40:45 ooh, it is already, to a different variable name 03:40:54 which I'll change to 03:51:06 maan, the pg port is really a mess (seems like, of -all- of oacs) 03:51:30 deletes of packages or package instances never work 03:52:00 I have a strong suspicion the 0or1row doesn't work in pg 03:53:17 I have a somewhat less strong suspicion that fixing that might fix a lot of problems 03:56:29 docwolf (~docwolf@adsl-34-207-203.bct.bellsouth.net) has joined #openacs 03:57:56 ok, that query worked! 03:58:25 ls 03:59:56 cool 04:09:53 now I guess I gotta find everywhere else it wants a list of presentations 04:30:19 "show me the authors" is one 04:31:28 try to delete a presentation... boom... 0or1row problem 04:34:19 hmm? 04:34:57 0or1row doesn't work for pg? i kinda of doubt that.... 04:35:20 I would too, if I didn't run into it over and over again :) 04:35:46 ok, check this out: 04:35:54 I jsut made a new user, 04:36:01 and tried to create a presentation 04:36:03 boom 04:36:09 look at the logs... 04:36:12 sure enuf 04:36:21 0or1row problem 04:37:05 does this necessarily mean 0or1row is bad in the driver? -no-, of course not, because we haven't found all the conditions 04:37:26 but the magnitude of the indicating vector is growing :) 04:37:47 if we could just see exactly where it's pointing... 04:37:56 ;), except that its used all over the toolkit, but your powers of deduction are persuasive. 04:38:36 well, a really simple test is in order 04:39:13 here's my present theory, just thrown out here without looking at anything yet: 04:39:32 0or1row called, found one row, works -fine- 04:40:12 0or1row called, found zero rows, bzzt, "statement was not a query returning rows" 04:40:33 hmm... 04:42:39 consider also that login uses it to check passwords in ad_check_password... 04:43:41 well, see, if the zero-row condition works there, then my theory is dead... 04:45:29 and in my simple test, I'm factoring out -all- of acs, leaving just aolserver api 04:45:54 well, I'm not doing that completely unless my theory holds under that condition 04:48:24 hmm... 04:48:36 i don't have a test server setup at the moment. so i can't confirm. 04:52:21 talilee (~talli@talli.dialup.access.net) has joined #openacs 04:58:03 hi talilee: is that you or a ghost? 04:58:08 hey hazmat 04:58:10 que pasa? 04:58:23 you never know what ghost lives in your machine... 05:00:53 hopefully, it's casper 05:01:21 so hows nyc around midnight? 05:01:59 ugh, don't get me started again 05:02:17 wow, that good. 05:02:42 i just spent got back from my semi-annual test of NYC nite life and confirmed that it sucks 05:03:00 at least, i can no longer stand the people 05:03:01 depends on where you go i suppose... 05:03:10 true enough 05:03:55 i had fun for two nites in the city, although bar hopping was probably a low point, and heading into the catskills was a high point :) 05:04:42 yeah, i was doing the bar hopping thing with newcomers to NYC. also, fake hipsters. or real hipsters. dunno which is sworse 05:05:45 * hazmat is still trying to quit smoking.. as he chews another piece of gum and fiends.. 05:06:17 stay strong, miman 05:06:19 my man 05:06:44 are you cold turkeying or quiting slowly? 05:07:02 cold turkey from a pack a day (well a little over)... 05:07:11 whoa 05:07:15 impressive 05:07:25 good luck! what was the impetus? 05:07:43 wanted to start living again. 05:07:57 :) 05:07:58 hazmat: don't be a hero. get some gum or the patch. 05:08:08 seriously, you're gonna go postal 05:08:11 i'm chewing gum at the moment. 05:08:16 cool 05:08:37 hazmat, i found that i could quit much easier if i slowly lowered the number i would smoke over time 05:08:47 but that was my appraoch 05:08:57 for others it's one way or the other. smoke or no smoke 05:09:03 doesn't work for me, if i have them i smoke them... addictive personality or some such. 05:09:12 yeah, i understand 05:09:38 i just got back from a couple smoky bars though. the stuff is truly disgusting. it's fun, but not worth all of its aggravation 05:10:38 i don't understand why it's so fashionable again to smoke 05:10:45 it seems like every young lady does it. 05:11:10 something about not having morals... too much consumer society sucks the marrow of life. 05:12:03 what's odd though is that women are usually concerned about their looks 05:12:14 ... smoking will turn you into a leathery prune faster than almost anything else 05:12:30 yeah, that's the real issue 05:13:03 most young women are more concerned with fitting and being cool, same with young men. 05:13:04 not to mention that it destroys your taste buds, your sense of smell, the ability to do things like, uhm, walk and heal... 05:24:20 Nope, the driver works 05:24:36 talk to you guys later... gonna crash. have a good night all 05:24:38 talilee has left #openacs 05:26:16 so, let's see, what does that mean... 05:26:26 ok, I used this script... 05:26:48 set h [ns_db gethandle] 05:26:48 set out "before
    " 05:26:48 set result [ns_db 0or1row $h {select i from x}] 05:26:56 if {$result == ""} { 05:26:56 append out "
  • no rows" 05:26:56 } else { 05:26:56 append out "
  • one row: [ns_set get $result {i}]" 05:26:56 } 05:27:04 append out "
after" 05:27:04 ns_db releasehandle $h 05:27:04 ns_return 200 "text/html" $out 05:27:26 I tried 0 rows in x, 1 row, 2 rows 05:27:36 2 rows gave an error 05:28:02 1 row made 0or1row return an Ns_Set 05:28:26 0 rows made 0or1row return "" 05:29:18 well that looks good 05:30:17 so: supposedly, this means I shouldn't go deeper into lower levels, cause I'll find the same thing for this script 05:32:32 next thing would be to to use the db api in a test script. 05:33:02 well, I just did that, right? 05:33:19 or you mean acs api? 05:34:16 the thing I just showed you, I put into a.tcl 05:34:23 and I browsed to a.tcl 05:34:36 before 05:34:36 * no rows 05:34:36 after 05:35:07 that's after I did 'delete from x;' 05:36:47 I just now inserted a single row, i = 2 05:37:00 before 05:37:00 * one row: 2 05:37:00 after 05:37:36 so that tests: the driver, and aolserver's database api 05:39:02 so next thing to test is openacs-4 database api? 05:39:04 i meant acsapi, although honestly i think looking over the original script might be more fruitful. 05:39:50 so you're suspecting many, many cases of sloppy portage 05:40:46 not really... i think there is something subtle probably happenig in the wp arena, thats causing the problem. 05:40:58 and by "the original script", you mean the one(s) that produced that error? 05:41:20 of course i could be wrong... it happens alot :) .. yes the one that produced the error . 05:42:17 I'm still hoping to find "there's one single central problem causing all these symptoms"... 05:45:42 I'm hoping this because if it is, and it can be stamped in one blow and all those symptoms go away, openacs suddenly gets much more stable in many areas... 05:46:31 if not, it means we have to find what's wrong in a lot of code, pretty much over and over again 05:48:00 so I don't mind doing one or two more tests in that direction 05:48:26 except now, there's a bigger chance I'm wrong about it 05:59:33 why do you think there is a problem in lots of code and not localized to wp ? 07:04:19 rbm (rmello@fslc.usu.edu) has joined #openacs 07:09:15 paje (~paje@slxwy.dorms.usu.edu) has joined #openacs 08:39:07 andyn has quit ("leaving") 09:58:39 andyn (~andy@12-254-190-230.client.attbi.com) has joined #openacs 10:43:15 andyn has quit (Remote closed the connection) 10:55:46 andyn (~andy@12-254-190-230.client.attbi.com) has joined #openacs 14:08:52 talilee (~talli@talli.dialup.access.net) has joined #openacs 14:42:58 til (~tils@port-212-202-128-195.reverse.qsc.de) has joined #openacs 16:20:55 Psychephylax (nblyumbe@ool-18bd7775.dyn.optonline.net) has joined #openacs 16:21:09 :-D 16:30:51 I was really hoping to find that the problem with all the places that use 0or1row were hosed in one place that could be fixed and then everything would be fine... however, I just ruled that out... 16:31:13 (just in postgres, oracle is fine) 16:33:03 specificaly, there are a lot of queries that use 0or1row, and when they run, they say "query was not a statement returning rows" 16:39:49 jim has quit (Remote closed the connection) 16:44:12 jim (~jim@12-233-187-5.client.attbi.com) has joined #openacs 18:31:24 djg has quit ("Hey! Where'd my controlling terminal go?") 19:01:46 til has quit (Read error: 113 (No route to host)) 19:05:03 hazmat: ayh? 19:05:09 hi 19:05:14 hi :) 19:05:18 you were right 19:05:21 hey guys 19:05:30 there's no problem with the driver, 19:05:30 hi talilee 19:05:44 and no problem with db_0or1row 19:05:47 did you localize the problem to wp 19:05:56 check out what this guy runs as his server: http://www.sixgirls.org 19:05:57 i didn't understand why you thought it wasn't localized? 19:07:25 no, there's definitely more than just wp 19:07:35 cool, amiga and netbsd... sounds like someone with too much time on there hands... 19:07:41 because I was getting the same message every time 19:08:08 talk to you guys later 19:08:09 hmm.. have any openacs4 sites on pg been released todate ? 19:08:14 hey talli 19:08:15 latter talilee 19:08:18 hazmat, yeah 19:08:20 see ya talli :) 19:08:21 we've built some 19:08:36 not entirely released, but they're running. some are internal web apps, though 19:08:42 ok, just wanted a reference point. 19:08:53 also, openacs.museatech.net is OACS4, but it hasn't been "released" yet 19:08:58 ok, gotta jet. bbl 19:09:21 talilee: do/did you sometimes get something like "0or1row: query was not a statement returning rows"? 19:09:28 dang :) 19:10:34 hazmat: and I was getting them -often-, usually when I was deleting package instances 19:10:47 but also when deleting other things 19:10:50 hmm... 19:10:57 (acs_object??) 19:11:34 is your server public? 19:12:05 temporary different subject: is anyone planning on approaching redhat and asking them to GPL acs 4.6? 19:13:15 I have 2 servers that are available (public is relatively not, but you can see them, and I can put up yet another one if desired) 19:13:27 but... 19:14:00 if you yourself are running a pg oacs, no reason why you couldn't see the messages there that I can think of 19:14:49 do you have about a half hour to engage in a hack session to find one instance of the problem and fix it? 19:27:59 the one I consider most public is http://12.233.187.5:9000/ 19:31:09 here's a ferinstance 19:31:10 hmmm 19:31:26 I tried to delete a package instance... and I got this: 19:31:48 Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.") 19:31:48 while executing 19:31:48 "ns_pg_bind 0or1row nsdb0 { 19:31:48 19:31:49 select case when count(*) = 0 then 0 else 1 end from apm_packages 19:31:51 where package_id = :package_id 19:31:53 19:31:55 }" 19:40:09 hmm, wonder if it's in decode() 19:40:24 or db_string 19:41:05 or that either oracle or pg doesn't support things like case when count(*) = 0 then 0 else 1 19:52:59 ok, pg does accept that case 19:53:16 but decode seems hard to use 19:54:47 * jim looks for decode 19:58:28 sorry jim, i don't have the time at the moment. i just wanted to see the error and look at the function source. 19:59:37 ok, np 20:02:12 that's what I want to do too... but the api browser is broken, the message I get is "query was not a statement returning rows" but not from 0or1row 20:03:29 about seeing the error, I'm running mozilla which doesn't do well with showing source 20:03:57 but that's OK, I'll keep pluggin for awhile 20:24:42 markd2 (~Snak@63.224.172.190) has joined #openacs 20:36:53 * Psychephylax thwapsc markd 20:36:55 doh 20:39:29 heh 20:39:32 thwap(tm)sc 20:40:03 no 20:40:18 stupid telnet in Winblows doesn't push the ascii chars well 20:40:35 * Psychephylax tries to benchmark his memory 20:40:42 i'll be back if my computer fudges up 20:47:25 markd2 has quit ("wheeeee") 21:44:40 k2pts (~nkd@adsl-168-174.cytanet.com.cy) has joined #openacs 21:44:55 hey guys, is tilmann around? 21:45:09 paje: k2pts? 21:45:09 somebody said k2pts was blah blah blah blah :) 21:45:17 paje: hi 21:45:17 hello, k2pts 21:45:28 paje: seen til? 21:45:28 til was last seen on #openacs 1 days, 3 hours, 14 minutes and 19 seconds ago, saying: particularily nice i found the interactive features of wish, so that one can manipulate the running programm via a shell ... is python capable of something comparable? [Fri Feb 22 11:33:04 2002] 21:45:35 denshi (toddg@linux126.ma.utexas.edu) has joined #openacs 21:45:39 hey denshi 21:45:57 hey k2. 21:46:03 how's it going? 21:46:31 pretty good. There was a wealth of basketball that needed playing, so I obliged. With bigor. 21:46:46 s/bigor/vigor/g. Damn mac keyboards. 21:47:25 paje: seen talli? 21:47:25 talli was last seen on #openacs 1 days, 21 hours, 17 minutes and 2 seconds ago, saying: cool [Thu Feb 21 17:32:18 2002] 21:47:37 how's cypriot? 21:47:57 cyprus: nice weather as usual, too much work these days 21:49:58 hey k2pts 21:50:01 hey denshi 21:50:26 word up, talli. 21:51:51 how's everyone this afternoon? 21:52:26 hey talilee 21:52:42 k2, I want to find a coffee place as fast as that. 21:52:50 must be a greek thing. 21:52:53 hey denshi, i'm goign to post some ideas for how to get new developers into the community 21:52:55 frape 21:53:12 shaken ice coffee (do it myself) 21:53:14 one of the ideas is to start looking at building developer tools 21:53:34 like aolserver debug tools, nsadmin and TOra stuff 22:01:05 either I'm dead or my watch has stopped. Or maybe talli stopped typing. 22:01:13 you're dead 22:05:31 wow... decode() is everywhere in acs 22:06:23 does anyone know where it's defined? (tried recursive grep in an openacs dir, couldn't find the def) 22:06:53 jim: decode() in SQL or Tcl? 22:07:05 jim: that's an oracle construct 22:07:09 tcl is ad_decode, yes? 22:08:02 k2pts: yeah, which is used everywhere in openacs... it -appears- to work, but I can't find the def 22:08:02 yes 22:08:28 it's everywhere in the openacs (oracle or pg). oracle I presume... 22:08:29 I have an oracle openacs4 and 3 pg ones 22:08:47 bye guys. 22:08:50 and I get err msgs involving decode 22:08:52 bye denshi 22:08:55 heya denshi 22:08:56 denshi has quit ("denshi has no reason") 22:09:09 or, well, sometimes... 22:09:19 so apparently it's defined somehow 22:09:30 on the sql side 22:09:49 jim: on postgresql queries or oracle? 22:10:01 postgres 22:10:29 denshi (toddg@linux126.ma.utexas.edu) has joined #openacs 22:10:43 much like MacArthur, I have returned. 22:10:52 what's needed, jim? 22:11:04 hiya denshi 22:11:04 jim: could you point me to query (pg) that uses it 22:11:20 try deleting a wp package instance 22:12:06 there's no decode in the wp-slim-drop.sql script 22:12:17 denshi: I'm trying to locate what I see as a fairly widespread problem which I initially thought was related to 0or1row, 22:12:28 k2pts: package -instance- :) 22:12:35 ok, moment 22:12:41 you tried to delete a package :) 22:13:16 not that much time on my hands atm. I'll read the logs and check this later. 22:13:21 bye again. 22:13:22 denshi has quit (Client Quit) 22:13:27 I'm still hooked on this idea that I can find the problem in a fairly localized mabnner 22:13:42 err, that didn't make sense 22:14:10 I'm still hooked on this idea that I can find the problem in one place, or a few places that are fairly close together 22:14:31 yes, it sounds strange because we ported oracle decode with "case when" 22:14:35 in postgresql 22:14:51 ohh ok 22:15:01 yes, I saw an instance of that 22:15:07 and I tried the case 22:15:12 by itself 22:15:13 aha 22:15:14 it worked 22:15:47 what kind of thing is decode? 22:16:35 think of it like the C switch statement (returns a value based on some conditions) 22:16:48 I think openacs could benefit from a general macro facility that could optionally be applied to queries 22:16:56 e.g. decode (value, 0, 'zero', 1, 'one', 'unknown') 22:17:07 CASE WHEN value=0 THEN 'zero' WHEN value=1 THEN 'one' ELSE 'unknown' END 22:17:14 ok, I know what decode does, but how/where is it defined? 22:17:25 it's an oracle construct 22:17:34 yes, I know that also 22:17:43 what about the pg version? 22:17:50 sorry, my english are not that good...don't get your question 22:17:59 is it tcl? plpgsql? something else? 22:18:08 we don't use decode in the postgresql version...we use case when as above 22:18:26 so you replace decode 22:18:29 yes 22:18:35 see example above 22:19:29 so anything that uses decode in the pg version hasn't been properly ported? 22:20:04 anything that uses decode in the oracle version has been ported to postgresql using "case when...then...else..end' 22:20:25 so you're saying the port is complete and working 22:20:27 they are "equivalent" 22:20:29 yes 22:20:34 I'm not sure that's true 22:20:45 if we missed any queries you can submit a patch 22:21:30 don't be confused by the queries in the tcl files, the query dispatcher will select the appropriate query based on the dbms you are using (ie. oracle or postgresql) 22:21:39 from the xql files 22:21:50 which are in .xql, yes, knew that too 22:21:59 ok 22:23:03 so, can you create a wimpy, create a presentation, unmount the wimpy and delete it? 22:23:25 haven't tried it...I'll have to do a fresh install to do that...sorry 22:24:08 (btw, davb and I are working on altering wp so that package instances only see the presentations created using that instance... 22:24:55 sounds good. I applied davb's patches a while ago. you might want to give it a whirl 22:25:05 "whirl" (I hope that's the right word) 22:25:23 is it? :) 22:25:41 he made a patch that puts the package instance ID in the context ID of the presentation's acs_object row 22:26:10 yes, "give it a whirl" is correct slang for "try it" 22:26:30 thanks, and yes a package_id is the right thing to do 22:26:44 did you see my patch along those lines? 22:26:53 number? 22:27:10 wait, I just filed the bug, haven't genrated a patch 22:27:14 Jim Lynch 22:27:21 ah ok. i have only seen the patches... 22:27:30 lemme find it 22:27:32 got a question for you give a min 22:27:59 hello. 22:28:08 ok 22:28:17 hi hazmat 22:28:30 hey hazmat 22:28:38 I can shoot you a strangely made patch 22:28:48 jim: patch #123, is it to allow html entries 22:29:00 that's my other one, unrelated to this 22:29:02 please no strange patches, show some mercy :) 22:29:24 ok, lemme try to generate 22:29:30 jim: patch #123, is it for allowing html entries? (question) 22:29:35 yes 22:29:38 ok 22:29:51 I'll try to apply it tomorrow, I'm done for this evening 22:33:03 ok, have to head out guys, later 22:33:14 k2pts has left #openacs