Wednesday, 2009-11-25

GerhardHi all, frequent problem with an old OpenRoad 4.0 application: locally installed on many PCs --> locally installed symbol.tbl files --> troubles because of different Ingres variables...01:01
GerhardI'm thinking about writing some kind of script...01:03
Gerhardingcompenv PC1 PC2 PC3...01:04
*** Mud|game has joined #ingres01:04
Gerhardthat will invoke an "ingprenv | sort" on all the PCs, somehow parse the results, save it to a .CSV which can be displayed in Excel01:06
GerhardBefore I start: is such a tool already available...?01:06
grantcGerhard, i'm not aware of such a beast. you might want to chat with support as they may have instructions on setting up ingres in a common environment01:07
GerhardGood idea.01:08
grantci know it used to be possible ala NFS but I don't know if it is possible still01:09
grantcthere are tricks you can do with the config.dat to simplify things but I don't know about symbol.tbl01:09
Vroomfondlegrantc: I've not used prepared statements before. If I set up a bunch of them (the PHP manual seems to suggest that this adds them all to the same transaction), then I execute a non-prepared statement using ingres_query with autocommit on, am I going to effectively close all my prepared statements? Or will a new transaction be opened when I pass them to ingres_execute?01:18
grantcuntil you do the commit they form part of the same transaction01:19
grantcyou should not be able to auto commit with existing active statements01:19
VroomfondleI see01:20
grantcthe same if you do queries in tm/sql and then exectute "set autocommit on"01:21
grantci cannot remember if the driver checks to see if there is a transaction in effect or if there are active statements but the dbms server would kick you back01:21
grantcthe driver blocks auto commit with active statements (just re-read the source)01:24
Vroomfondlebut if I do an ingres_commit() manually, all my open prepared statements will be closed?01:25
Vroomfondlebasically I'm wondering if one can set up a central pool of common statements which can be used by $whichever_script as the user navigates around the site. However if an ingres_commit() is going to close all open statements then I guess that's not going to work very well.01:27
grantcthere's no guarantee you will be served by the same thread/process for each http request01:32
Vroomfondletrue.01:32
VroomfondleYeah, it's probably not such a good idea in general.01:32
*** PaulM05 has joined #ingres01:50
*** Gerhard has quit IRC01:50
*** raial01 has joined #ingres02:22
Vroomfondlegrantc: is there any way to check if a prepared statement is still valid (i.e. the transaction hasn't been committed), other than trying to use it and checking for an error?02:32
*** cthibert has joined #ingres03:35
Vroomfondleis there any documentation on cache_dynamic? I can't seem to find anything in the manual. I just want to check I'm not re-inventing the wheel.04:16
PaulM05the only thing I'm aware of is the HELP in CBF04:32
Vroomfondlewell... I guess that all I really want to know is that if I prepare a statement, then commit, does the QEP get wiped from the cache? i.e. do I need to avoid committing until I've finished using and re-using the statement?04:34
PaulM05I don't know (but I would hope not)04:34
VroomfondleI'm basing my work on the way that a colleague does it, but he uses MySQL04:35
PaulM05IIRC cache_dynamic was supposed to be like REPEATED for dynamic SQL, so *assuming* it works the same way, the QEP would be flushed eventually on an LRU basis04:37
Vroomfondlehe keeps a central pool of prepared statements in his app, then each time his app wants to do something it looks in the pool for the required statement and executes it with the required parameters. Do I actually need to keep my own pool like that, or can I just rely on Ingres to notice that the statement currently being prepared matches one that was prepared a little while ago...04:37
pboroVroomfondle, a small warning about dynamic_cache and LOBs... there are currently bugs in the dynamic_cache which cause errors in errlog.log and may hang the dbms under stress04:38
Vroomfondlewhat's a LOB, exactly?04:38
pboroVroomfondle, large binary object, i.e. LONG VARCHAR or LONG BINARY04:38
Vroomfondleoh right, I see04:38
Vroomfondlewe don't use those, fortunately, but I will make a note of it for the future in case we want to start04:39
pboroare you using java?04:39
VroomfondleNo, PHP04:39
pboroah, ok04:39
grantcVroomfondle, sorry I had to pop out - there is no real way to know if a prepared statement is still valid04:44
VroomfondleOkay. I'll just remember not to commit the transaction until I'm done with the statement.04:45
VroomfondleDo you have any views on what I said at 12:37?04:45
VroomfondleI'm really not sure if I'm doing things the right way here or if I'm just writing unnecessary code04:45
grantcregarding cache_dynamic? I don't know if there is a way to know for sure if your QEP is still in QSF or not but it would be expensive to find out.04:47
grantcversus the cost of running the query, which you are going to do anyway ... :)04:48
Vroomfondletbh I'm not even sure if I'm using ingres_prepare correctly, really. Is the idea: call it, store the result in a variable, then repeatedly pass that result to ingres_execute with different parameters each time?04:50
grantcsounds good to me04:51
VroomfondleRight. And once I've committed the transaction, I should through away the result identifier because it's presumably now useless as it belongs to a completed transaction.04:51
*** cthibert has left #ingres04:52
grantccorrect - the driver closes all open statements, free's all the active result resources associated with the link/connection and then commits04:54
VroomfondleOkey-doke. I'll write my code so that it prepares its statements, executes them repeatedly as necessary, then commits once it's finsihed, and then clears its "pool" of prepared statements to make sure they don't get accidentally re-used later.04:55
Vroomfondleall this in the name of showing off04:55
Vroomfondlestill, we've a departmental restructuring coming up so brownie points are worth having ;)04:56
*** cthibert has joined #ingres04:56
grantcyou could execute the same statements via ingres_query() and compare the difference in speed vs  prepare + execute/execute/execute/execute/execute/execute04:57
grantci would be interested in general numbers as it's not something i've tested yet04:57
*** Mud|game is now known as Mud04:58
VroomfondleI'm still waiting for admins to switch cache_dymanic on but yeah, once they've done that I'll knock up a quick test-script04:58
grantccheers05:00
*** PaulM05 is now known as PaulM05_lunch05:12
*** zxiiro has quit IRC05:14
*** Dejan has joined #ingres05:15
Dejanhello05:15
grantcmorning05:15
*** Alex| has quit IRC05:36
*** atrofast has quit IRC05:42
*** atrofast has joined #ingres05:45
*** zxiiro has joined #ingres06:01
*** ChanServ sets mode: +v zxiiro06:01
Vroomfondleew, nasty06:04
Vroomfondle*** glibc detected *** /usr/sbin/apache2: double free or corruption (out): 0x00007fde5bc18d80 ***06:04
Vroomfondle======= Backtrace: =========06:04
Vroomfondle/lib/libc.so.6[0x7fde5a591dd6]06:04
Vroomfondle/lib/libc.so.6(cfree+0x6c)[0x7fde5a59670c]06:04
Vroomfondle/usr/lib/php5/20060613/ingres.so[0x7fde53d832bd]06:04
Vroomfondlethat happens when I try to execute a prepared query on Ingres 9.2, PHP5, driver 2.2.106:04
atrofastVroomfondle: Hack for workaround: export MALLOC_CHECK_=0 :D06:04
Vroomfondleheh06:05
grantcVroomfondle, if you configure the driver using "CFLAGS=-g ./configure" then do make... you'll get a line number in ingres.c where that is happening06:06
*** rossand has joined #ingres06:09
*** ChanServ sets mode: +o rossand06:09
Vroomfondlek, will try that06:09
*** PaulM05_lunch is now known as PaulM0506:13
Vroomfondleannoyingly, it now doesn't give any backtrace at all06:19
Vroomfondleit just hangs and my local copy of the web app becomes useless until I restart apache06:19
Vroomfondlethe problem seems to be in ingres_execute06:19
grantctest case please :)06:23
*** grantc is now known as grantc|afk06:27
* grantc|afk is away: Away06:27
*** Gerhard has joined #ingres06:34
*** Gerhard has quit IRC06:44
*** grantc|afk is now known as grantc07:11
* grantc is back (gone 00:44:20)07:11
*** cthibert has left #ingres07:12
*** cthibert has joined #ingres07:17
VroomfondleHmm. Can't log in to service-desk.07:17
Vroomfondleeven after a password reset.07:17
*** ccsidiot has joined #ingres07:21
ccsidiotHello everyone :) I was doing some code reading under the src of geospatial, I'm just wondering what's WKB?07:56
atrofastWell Known Binary08:00
atrofastccsidiot: http://en.wikipedia.org/wiki/Well-known_text08:00
ccsidiot:) Cool, thanks!08:04
atrofastWhy would you get this error on an update statement? An error occurred when attempting to create or alter a table. The specified row size exceeded the maximum allowable row width08:20
PaulM05max_tuple_length is too small for the row width you want08:21
atrofastAh thanks PaulM0508:21
PaulM05if you set it to 0 it'll use the maximum possible for the page size08:22
atrofastThat's good to know, thanks PaulM05... I've never run into that error before for some reason08:22
PaulM05it happened on an update? was it an update ... from?08:24
atrofastNo update table set (long list of sets) where blah08:25
atrofastI put max_tuple_length at 0 and it still gives me the error08:25
atrofastIt only just started after I added ONE more column to the set08:25
PaulM05did you re-start the DBMS?08:26
atrofastYes08:26
PaulM05what's the full error number (E_..)08:27
* Vroomfondle gives up on prepared statements for the moment08:28
atrofastE_US07FD08:28
Vroomfondlegrantc: I've been struggling to come up with a reliable test-case; will have another go at it next week and let you know. Errors only seem to occur when cache_dynamic is turned on and prepared statements are used. Even after re-configuring with the CFLAG you gave me it still won't give me a line-number. *shrug*.08:29
grantctry --enable-debug as well with configure08:30
Vroomfondleannoyingly, whilst my main code crashes & burns my test code (which follows the same structure, at least in theory) runs just fine08:30
Vroomfondleokay, I'll try that tomorrow08:30
PaulM05not sure what's happening there atrofast - if you can reproduce it reliably might be worth raising a bug08:42
atrofastThanks for your help PaulM0508:43
Vroomfondlewoohoo!08:54
Vroomfondlegrantc: I think I've identified the problem, ish08:54
Vroomfondlegrantc: I was using xdebug for profiling. If I tell PHP not to load xdebug.so, Ingres prepared statements seem to work.08:54
grantcinteresting08:55
Vroomfondlexdebug kind of inserts itself into the call-stack before the ingres functions are called:08:55
Vroomfondle/usr/lib/php5/20060613/ingres.so[0x7fde53d7b928]08:55
Vroomfondle/usr/lib/php5/20060613/ingres.so[0x7fde53d7c1bb]08:55
Vroomfondle/usr/lib/php5/20060613/ingres.so(zif_ingres_commit+0xc7)[0x7fde53d86548]08:56
Vroomfondle/usr/lib/php5/20060613/xdebug.so(xdebug_execute_internal+0x166)[0x7fde53375b33]08:56
Vroomfondleoh... poo08:58
Vroomfondleno wonder if worked. cache_dynamic's been turned off.08:58
VroomfondleDamn. I thought I'd be able to go home on a high today :/08:58
*** Alex| has joined #ingres08:59
*** ChanServ sets mode: +o Alex|08:59
VroomfondleMeh. Now I'm all dissapointed. Ah well, home time.09:00
atrofastgrantc: Does the php driver have something like Ingres_escape_string function?09:28
grantcrtfm :)09:28
atrofastYeah found it, thanks :)09:29
atrofastgrantc: What if I don't have a link yet?09:31
grantcno go09:33
atrofastDarn09:33
atrofastOkay thanks09:33
*** raial01 has left #ingres09:37
*** Dejan has quit IRC10:12
*** atrofast has quit IRC10:16
*** atrofast has joined #ingres10:18
*** ccsidiot has quit IRC10:25
*** PaulM05 has quit IRC10:45
*** ii_log has joined #ingres11:23
*** Mud has quit IRC11:49
*** zxiiro has quit IRC13:29
*** Alex| has quit IRC13:38
*** cthibert has left #ingres13:50
*** DarylM has quit IRC13:53
*** ccsidiot has joined #ingres14:05
*** pboro has quit IRC14:11
*** pboro has joined #ingres14:16
*** zxiiro has joined #ingres15:52
*** ChanServ sets mode: +v zxiiro15:52
*** rossand has quit IRC17:21
*** cytrinox_ has joined #ingres19:21
*** cytrinox has quit IRC19:21
*** cytrinox_ is now known as cytrinox19:21
*** pboro has quit IRC19:39
*** dyki has quit IRC19:39
*** ccsidiot has quit IRC19:39
*** pboro has joined #ingres19:40
*** ccsidiot has joined #ingres19:40
*** dyki has joined #ingres19:40
*** grantc has quit IRC22:06
*** ccsidiot has left #ingres22:14
*** Mud|game has joined #ingres22:25
*** Alex| has joined #ingres22:35
*** ChanServ sets mode: +o Alex|22:35
*** tc has joined #ingres22:47
*** Mud|game is now known as Mud22:51
*** tc has quit IRC23:02
*** Alex| has quit IRC23:13
*** withdefault has joined #ingres23:24
*** ChanServ sets mode: +o withdefault23:25
*** Alex| has joined #ingres23:29
*** ChanServ sets mode: +o Alex|23:29

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!