Xavier Camier wrote :

>
>Anhaus, Thomas a �crit :
>
>>Hi Xavier,
>>I tried to reproduce the problem, till now without success. I 
>fear that I have
>>to do exactly the same what you did. 
>>If your database is not too big and does not contain any 
>confidential data I
>>would like to ask you for a complete backup and the statement
>>that crashes the database.  
>>Maybe I'm then able to reproduce the problem. Otherwise I 
>don't see any
>>chances to fix the bug, because the backtrace does not give me any
>>hints what's going wrong.
>>
>>Best Regards and thanks in advance
>>Thomas 
>> 
>>
>>  
>>
>>>-----Urspr�ngliche Nachricht-----
>>>Von: Xavier CAMIER [mailto:[EMAIL PROTECTED] 
>>>Gesendet: Montag, 18. Oktober 2004 09:11
>>>An: Anhaus, Thomas
>>>Betreff: Re: AW: A trigger stops my database
>>>
>>>
>>>Anhaus, Thomas a �crit :
>>>
>>>    
>>>
>>>>Hi Xavier,
>>>>I think I will have to reproduce the problem in order to find out
>>>>what happens. Is it possible to send me the required schema 
>>>>      
>>>>
>>>and maybe the
>>>    
>>>
>>>>data stored in that schema ?
>>>>That would help me very much.
>>>>
>>>>Thanks in advance,
>>>>Thomas
>>>>
>>>> 
>>>>
>>>>      
>>>>
>>>>>-----Urspr�ngliche Nachricht-----
>>>>>Von: Xavier CAMIER [mailto:[EMAIL PROTECTED] 
>>>>>Gesendet: Montag, 11. Oktober 2004 13:20
>>>>>An: [EMAIL PROTECTED]
>>>>>Betreff: A trigger stops my database
>>>>>
>>>>>
>>>>>Good afternoon
>>>>>
>>>>>A trigger executed twice makes my database crashing. When the 
>>>>>result is 
>>>>>updated and NEWVARIABLE<>'' the trigger calls the 
>>>>>        
>>>>>
>>>TLIGNEMETRERESULTMAJ 
>>>    
>>>
>>>>>DBProc. The first time it is called everything happen as 
>>>>>exepected. The 
>>>>>2nd time the trigger is started (with the same "environment") the 
>>>>>database stops (it's not really a crash as we just have to 
>>>>>re-launch it 
>>>>>without having to check the datas).
>>>>>
>>>>>Would someone understand why ? Thanks in advance for your help.
>>>>>
>>>>>Best Regards, Xavier.
>>>>>
>>>>>P.S. Here are the kernel trace and the trigger / procedures 
>>>>>I'm writting 
>>>>>about :
>>>>>
>>>>>Voil� le KNLDIAGERR :
>>>>>
>>>>>2004-10-08 14:18:23     0 ERR 11330 COREHAND ABORTING due to 
>>>>>        
>>>>>
>>>signal 11
>>>    
>>>
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   ----> Emergency 
>>>>>Stack Back 
>>>>>Trace <----
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (0):0x83cf6c2 
>>>>>[0x460bf310](0x460c4964,0x460bf4ac,0x0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (1):0x83c704a 
>>>>>[0x460bf310](0x460c4964,0x460bf4ac,0x0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (3):0x81ca45a 
>>>>>[0x460bf460](0x486103ec,0x460bf4ac,0x0,0x4860ffac)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (5):0x867e24f 
>>>>>[0x460bfd90](0x460c39ac,0x486103cc,0x4860ffac,0x867e18a)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (7):0x867df22 
>>>>>[0x460bfdd0](0x460c39ac,0x486103cc,0x486103ec,0x867d741)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (9):0x867e5da 
>>>>>[0x460bfea0](0x460c39ac,0x460bfefc,0x20202020,0x867e5c4)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (11):0x81c46bb 
>>>>>[0x460bfed0](0x460c39ac,0x460bfefc,0x1ffff,0x81c46a2)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (13):0x81bebd6 
>>>>>[0x460bff00](0x460c39ac,0x460c3b98,0x460bff4e,0x81be951)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (15):0x81be620 
>>>>>[0x460c0020](0x460c39ac,0x460c0114,0x0,0x81be561)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (17):0x8331dc2 
>>>>>[0x460c0120](0x460c39ac,0x3,0x0,0x8331a24)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (19):0x83310bc 
>>>>>[0x460c0260](0x460c39ac,0x1,0x460c02c0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (21):0x81c8883 
>>>>>[0x460c0310](0x460c39ac,0x49504ab0,0x460c0410,0x81c8873)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (23):0x81d5fc0 
>>>>>[0x460c0410](0x460c39ac,0x460c087c,0x4860efd0,0x4860fb84)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (25):0x867d4d8 
>>>>>[0x460c0470](0x460c39ac,0x460c087c,0x4860efd0,0x4860fb84)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (27):0x867e567 
>>>>>[0x460c0590](0x460c39ac,0x460c087c,0x4860efd0,0x4860fb84)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (29):0x83d0299 
>>>>>[0x460c05d0](0x460c39ac,0x460c087c,0x4860efd0,0x4860fb84)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (31):0x83c704a 
>>>>>[0x460c06e0](0x460c4964,0x460c087c,0x0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (33):0x81ca45a 
>>>>>[0x460c0830](0x4860fcac,0x460c087c,0x0,0x460c1320)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (35):0x81c9556 
>>>>>[0x460c1160](0x460c39ac,0x4860fc8c,0x460c1320,0x81c9085)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (37):0x833211c 
>>>>>[0x460c3380](0x460c39ac,0x3,0x460c34c0,0x8331f25)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (39):0x8330a1d 
>>>>>[0x460c34c0](0x460c39ac,0x1,0x460c3528,0x1)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (41):0x813a661 
>>>>>[0x460c3560](0x460c39ac,0x460c359a,0x460c359b,0x813a54d)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (43):0x813a905 
>>>>>[0x460c4e30](0x460c4f14,0x3,0x402406c4,0x813a8d1)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (45):0x851feb1 
>>>>>[0x460c4e60](0x460c4f14,0x2,0xffffffff,0x26)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (47):0x813a8a8 
>>>>>[0x460c4ee0](0x460c4f14,0x0,0x0,0x813a87c)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (49):0x877bf12 
>>>>>[0x460c4f80](0x8a6a034,0x4022ecb0,0x877c3b8,0x877c3b8)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (51):0x877c3e6 
>>>>>[0x460c4fb0](0x50016f8c,0x8b13aa0,0x0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   (53):0x40132884 
>>>>>[0x460c4ff0](0x8745e8a,0x0,0x0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   ----> Register 
>>>>>        
>>>>>
>>>Dump <----
>>>    
>>>
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   
>>>>>-------------------------------
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   ds   es   0x0000002b 
>>>>>0x0000002b
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   fs   gs   0x00000000 
>>>>>0x0000009f
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   trap err  0x0000000e 
>>>>>0x00000004
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   efl  ss   0x00010246 
>>>>>0x0000002b
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   edi  esi  0x00003ec5 
>>>>>0x460bf4ac
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   eax  ebx  0x00000000
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   ecx  edx  0x460bf4ac
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   esp  uesp 0x460bf228 
>>>>>0x460bf228
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   ebp  eip  0x460bf310 
>>>>>0x083cf6c2
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   cs   cr2  0x00000023 
>>>>>0x00003ec5
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   
>>>>>-------------------------------
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   cw - sw - tag   
>>>>>0xffff037f 
>>>>>0xffff0120 0xffffffff
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   ipoff - cssel   
>>>>>0x00000000 
>>>>>0x00000000
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   dataoff-datasel 
>>>>>0x00000000 
>>>>>0x00000000
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   f00      
>[0x0000 0x0000 
>>>>>0x0000 0x0000 - 0x0000]
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   f01      
>[0x5c4d 0x2178 
>>>>>0xe2dc 0xd0dd - 0x3ffd]
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   f02      
>[0x5c4d 0x2178 
>>>>>0xe2dc 0xd0dd - 0x3ffd]
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   f03      
>[0x3a00 0xce70 
>>>>>0xd288 0xefde - 0x4005]
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   f04      
>[0x0000 0x0000 
>>>>>0x0000 0x9300 - 0x4007]
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   f05      
>[0xe5be 0xbe5b 
>>>>>0x5be5 0xa7fe - 0x4005]
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   f06      
>[0x0000 0x0000 
>>>>>0x0000 0x989a - 0x400d]
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   f07      
>[0x0000 0x0000 
>>>>>0x0000 0xbe00 - 0x4008]
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   
>>>>>-------------------------------
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   ----> Module 
>List <----
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   |.text Start 
>>>>>|.text End   | 
>>>>>Module File Name
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   | 0x08048000 | 
>>>>>0x088e8000 | 
>>>>>/u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   | 0x40000000 | 
>>>>>0x40013000 | 
>>>>>/lib/ld-2.3.2.so
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   | 0x4001b000 | 
>>>>>0x40028000 | 
>>>>>/lib/i686/libpthread-0.10.so
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   | 0x4006b000 | 
>>>>>0x4006d000 | 
>>>>>/lib/libdl-2.3.2.so
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   | 0x4006e000 | 
>>>>>0x40074000 | 
>>>>>/lib/i686/librt-2.3.2.so
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   | 0x40080000 | 
>>>>>0x400b7000 | 
>>>>>/usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   | 0x400cb000 | 
>>>>>0x400ed000 | 
>>>>>/lib/i686/libm-2.3.2.so
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   | 0x400ee000 | 
>>>>>0x40218000 | 
>>>>>/lib/i686/libc-2.3.2.so
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   | 0x40320000 | 
>>>>>0x40328000 | 
>>>>>/lib/libnss_files-2.3.2.so
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   | 0x4954f000 | 
>>>>>0x4961b000 | 
>>>>>/u01/lib/liboms.so
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE  2004-10-08 
>>>>>        
>>>>>
>>>14:18:23     0 
>>>    
>>>
>>>>>ERR 11599 BTRACE   ----> Symbolic Stack Back Trace <----
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE      0: 0x083cf6c2 
>>>>>k71qual_handling +0x02e2
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460bf310] (0x460c4964,0x460bf4ac,0x0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE      1: 0x083c704a 
>>>>>k71sel_qualification_test +0x00be
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460bf310] (0x460c4964,0x460bf4ac,0x0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE      2: 
>>>>>        
>>>>>
>>>0x081ca45a a262Call 
>>>    
>>>
>>>>>+0x02fe
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460bf460] (0x486103ec,0x460bf4ac,0x0,0x4860ffac)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE      3: 0x0867e24f 
>>>>>PLDBProcCall__14DBProc_HandlerR14SQLMan_ContextP23Catalog_MessB
>>>>>lockObjectR16SQLMan_MessBlock 
>>>>>+0x00
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE                    d3
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460bfd90] (0x460c39ac,0x486103cc,0x4860ffac,0x867e18a)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE      4: 0x0867df22 
>>>>>ProcedureCall__14DBProc_HandlerR14SQLMan_ContextRi +0x07f2
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460bfdd0] (0x460c39ac,0x486103cc,0x486103ec,0x867d741)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE      5: 0x0867e5da 
>>>>>a101_ProcedureCall +0x0022
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460bfea0] (0x460c39ac,0x460bfefc,0x20202020,0x867e5c4)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE      6: 0x081c46bb 
>>>>>ak260CallInternalDBProc +0x0027
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460bfed0] (0x460c39ac,0x460bfefc,0x1ffff,0x81c46a2)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE      7: 0x081bebd6 
>>>>>ak260CallDBProc +0x0296
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460bff00] (0x460c39ac,0x460c3b98,0x460bff4e,0x81be951)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE      8: 0x081be620 
>>>>>a260exec_dialog +0x00d0
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c0020] (0x460c39ac,0x460c0114,0x0,0x81be561)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE      9: 0x08331dc2 
>>>>>ak93one_command +0x0746
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c0120] (0x460c39ac,0x3,0x0,0x8331a24)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     10: 0x083310bc 
>>>>>a93request 
>>>>>+0x01cc
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c0260] (0x460c39ac,0x1,0x460c02c0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     11: 0x081c8883 
>>>>>ak262execute +0x0957
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c0310] (0x460c39ac,0x49504ab0,0x460c0410,0x81c8873)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     12: 0x081d5fc0 
>>>>>a262execute +0x003c
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c0410] (0x460c39ac,0x460c087c,0x4860efd0,0x4860fb84)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     13: 0x0867d4d8 
>>>>>ExecuteSqlStatement__14DBProc_HandlerP14SQLMan_ContextR23tgg00_
>>>>>   
>>>>>
>>>>>        
>>>>>
>>>>SelectFieldsParamP10tsp00_VoidP16tg 
>>>> 
>>>>
>>>>      
>>>>
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE                    
>>>>>g00_StackEntryRi +0x0284
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c0470] (0x460c39ac,0x460c087c,0x4860efd0,0x4860fb84)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     14: 0x0867e567 
>>>>>a101_ExecuteSqlStatement +0x0033
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c0590] (0x460c39ac,0x460c087c,0x4860efd0,0x4860fb84)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     15: 0x083d0299 
>>>>>k71qual_handling +0x0eb9
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c05d0] (0x460c39ac,0x460c087c,0x4860efd0,0x4860fb84)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     16: 0x083c704a 
>>>>>k71sel_qualification_test +0x00be
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c06e0] (0x460c4964,0x460c087c,0x0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     17: 
>>>>>        
>>>>>
>>>0x081ca45a a262Call 
>>>    
>>>
>>>>>+0x02fe
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c0830] (0x4860fcac,0x460c087c,0x0,0x460c1320)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     18: 0x081c9556 
>>>>>a262execute_trigger +0x04e2
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c1160] (0x460c39ac,0x4860fc8c,0x460c1320,0x81c9085)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     19: 0x0833211c 
>>>>>ak93one_command +0x0aa0
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c3380] (0x460c39ac,0x3,0x460c34c0,0x8331f25)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     20: 0x08330a1d 
>>>>>a93_user_commands +0x047d
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c34c0] (0x460c39ac,0x1,0x460c3528,0x1)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     21: 0x0813a661 
>>>>>ak91run_user_process +0x0125
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c3560] (0x460c39ac,0x460c359a,0x460c359b,0x813a54d)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     22: 0x0813a905 
>>>>>a91mainprogam_with_allocator +0x0041
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c4e30] (0x460c4f14,0x3,0x402406c4,0x813a8d1)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     23: 0x0851feb1 
>>>>>gg941CreateAllocatorAndCallMainprog +0x014d
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c4e60] (0x460c4f14,0x2,0xffffffff,0x26)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     24: 0x0813a8a8 
>>>>>a91mainprogram +0x003c
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c4ee0] (0x460c4f14,0x0,0x0,0x813a87c)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     25: 0x0877bf12 
>>>>>en88_CallKernelTaskMain__FP9TASK_TYPE +0x016e
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c4f80] (0x8a6a034,0x4022ecb0,0x877c3b8,0x877c3b8)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE     26: 0x0877c3e6 
>>>>>en88_CallCoroutineKernelTaskMain +0x002e
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE          /u01/pgm/kernel
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE         Frameinfo 
>>>>>[0x460c4fb0] (0x50016f8c,0x8b13aa0,0x0,0x0)
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   ----> End of 
>Stack Back 
>>>>>Trace <----
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE   analysing 
>>>>>LVCMem_Allocator_1
>>>>>2004-10-08 14:18:23     0 ERR 11599 BTRACE  2004-10-08 
>>>>>        
>>>>>
>>>14:18:23     0 
>>>    
>>>
>>>>>ERR 11599 BTRACE   no problems detected in LVCMem_Allocator_1
>>>>>2004-10-08 14:18:42                          --- Starting GMT 
>>>>>2004-10-08 
>>>>>12:18:42           7.5.0    Build 016-121-077-688
>>>>>
>>>>>***************************************************
>>>>>
>>>>>
>>>>>
>>>>>Procedures et Trigger :
>>>>>
>>>>>***************************************************
>>>>>
>>>>>CREATE TRIGGER TRIG_METRERESULTMAJ FOR TLIGNESMETREAFFAIRE AFTER 
>>>>>UPDATE(FORMULE,RESULTAT)
>>>>>EXECUTE (
>>>>>
>>>>>TRY
>>>>>
>>>>>CALL PROC_METRERESULTMAJ(:NEW.IDTLIGNEMETREAFFAIRE, :OLD.FORMULE, 
>>>>>:NEW.FORMULE, :NEW.VARIABLE,  :NEW.IDTMETREAFFAIRE, :NEW.IDSSCALC);
>>>>>
>>>>>CATCH
>>>>>IF $RC <> 100 THEN STOP ($RC, 'Erreur lors de l''ex�cution du 
>>>>>trigger...');
>>>>>)
>>>>>
>>>>>
>>>>>***************************************************************
>>>>>***************************************** 
>>>>>
>>>>>
>>>>>CREATE DBPROC PROC_METRERESULTMAJ(IN IDTLIGNEMETREAFFAIRE 
>INTEGER,IN 
>>>>>OLDFORMULE VARCHAR(255), IN NEWFORMULE VARCHAR(255),
>>>>>IN NEWVARIABLE VARCHAR(255), IN NEWIDTMETREAFFAIRE INTEGER, IN 
>>>>>NEWIDSSCALC INTEGER) AS
>>>>>VAR BG INTEGER;BD INTEGER;IDTAFF INTEGER;IDTLIGNEMETRE INTEGER;
>>>>>
>>>>>
>>>>>TRY
>>>>>/* just a check */
>>>>>                          IF NEWFORMULE <> OLDFORMULE THEN
>>>>>BEGIN
>>>>>TRY
>>>>>CALL CALCVALUE(FALSE,:IDTLIGNEMETREAFFAIRE);
>>>>>CATCH
>>>>>IF $RC <> 100 THEN STOP ($RC, 'Erreur lors de l''ex�cution du 
>>>>>trigger.a..');
>>>>>END
>>>>>ELSE
>>>>>BEGIN
>>>>>                                    IF  NOT (NEWVARIABLE = '') THEN
>>>>> BEGIN
>>>>>  /* update the result with the stored value  */
>>>>>  CALL TLIGNEMETRERESULTMAJ(:IDTLIGNEMETREAFFAIRE, :NEWVARIABLE);
>>>>>END;
>>>>>
>>>>>END;
>>>>>CATCH
>>>>>IF $RC <> 100 THEN STOP ($RC, 'Erreur lors de l''ex�cution du 
>>>>>trigger...');
>>>>>
>>>>>
>>>>>***************************************************************
>>>>>******************************************* 
>>>>>
>>>>>
>>>>>CREATE DBPROC CALCVALUE(IN ISINSERT BOOLEAN,IN 
>IDTLIGNEMETRE INTEGER)
>>>>>                                            AS VAR NFORM 
>>>>>VARCHAR(255);
>>>>>                                                   RQUERY 
>>>>>VARCHAR(2000);
>>>>>                                                   VARI 
>>>>>        
>>>>>
>>>VARCHAR(255);
>>>    
>>>
>>>>>                                                   
>LIGNE_BG INTEGER;
>>>>>                                                   
>LIGNE_BD INTEGER;
>>>>>                                                   
>>>>>IDTAFFAIRE INTEGER;
>>>>>                                                   VRC INTEGER;
>>>>>
>>>>>
>>>>>TRY
>>>>>SELECT TLI.LIGNE_BG, TLI.LIGNE_BD,TLI.IDAFFAIRE  FROM 
>>>>>DBA.TLIGNESMETREAFFAIRE AS TL INNER JOIN DBA.TMETRESAFFAIRE AS TM
>>>>>ON  TL.IDTMETREAFFAIRE = TM.IDTMETREAFFAIRE INNER JOIN 
>>>>>DBA.TLIGNESAFFAIRE AS TLI
>>>>>ON  TLI.IDTLIGNEAFFAIRE = TM.IDTLIGNEAFFAIRE WHERE 
>>>>>IDTLIGNEMETREAFFAIRE = :IDTLIGNEMETRE;
>>>>>FETCH  INTO :LIGNE_BG,:LIGNE_BD,:IDTAFFAIRE ;
>>>>>
>>>>>DECLARE LSTVAR CURSOR FOR
>>>>>SELECT TL.VARIABLE,TL.RESULTAT FROM DBA.TLIGNESMETREAFFAIRE AS TL 
>>>>>INNER JOIN DBA.TMETRESAFFAIRE AS TM
>>>>>ON  TL.IDTMETREAFFAIRE = TM.IDTMETREAFFAIRE INNER JOIN 
>>>>>DBA.TLIGNESAFFAIRE AS TLI
>>>>>ON  TLI.IDTLIGNEAFFAIRE = TM.IDTLIGNEAFFAIRE
>>>>>WHERE TLI.LIGNE_BG <= :LIGNE_BG AND TLI.LIGNE_BD >= :LIGNE_BD
>>>>>AND TLI.IDAFFAIRE = :IDTAFFAIRE AND TL.VARIABLE <> '' ;
>>>>>CATCH
>>>>>IF $RC <> 100 THEN STOP ($RC, 'Impossible de lister...');
>>>>>                                  TRY
>>>>>SELECT FORMULE FROM DBA.TLIGNESMETREAFFAIRE WHERE  
>>>>>IDTLIGNEMETREAFFAIRE 
>>>>>= :IDTLIGNEMETRE;
>>>>>FETCH INTO :NFORM;
>>>>>CATCH
>>>>>IF $RC <> 100 THEN STOP ($RC, 'Impossible de s�lectionner la 
>>>>>        
>>>>>
>>>formule');
>>>    
>>>
>>>>>TRY
>>>>>SELECT VARIABLE FROM DBA.LSTVAR;
>>>>>WHILE $RC = 0 DO
>>>>>BEGIN
>>>>>FETCH INTO :VARI;
>>>>>
>>>>>SELECT REPLACE(:NFORM,LSTVAR.VARIABLE,LSTVAR.RESULTAT) FROM 
>>>>>DBA.LSTVAR
>>>>>WHERE :VARI IN (SELECT VARIABLE FROM DBA.LSTVAR);
>>>>>
>>>>>FETCH INTO :NFORM;
>>>>>
>>>>>END;
>>>>>CATCH
>>>>>IF $RC <> 100 THEN STOP ($RC, 'Impossible de remplacer la 
>formule');
>>>>>
>>>>>TRY
>>>>>
>>>>>RQUERY = 'UPDATE DBA.TLIGNESMETREAFFAIRE SET RESULTAT = 
>(SELECT ' || 
>>>>>NFORM ||
>>>>>' FROM DBA.TLIGNESMETREAFFAIRE WHERE IDTLIGNEMETREAFFAIRE = ' || 
>>>>>IDTLIGNEMETRE ||
>>>>>')WHERE IDTLIGNEMETREAFFAIRE = ' || IDTLIGNEMETRE ;
>>>>>
>>>>>EXECUTE RQUERY;
>>>>>
>>>>>CATCH
>>>>>IF $RC <> 100 THEN STOP ($RC, 'Impossible de lister...');
>>>>>
>>>>>
>>>>>***************************************************************
>>>>>************************************ 
>>>>>
>>>>>
>>>>>CREATE DBPROC TLIGNEMETRERESULTMAJ(IN IDTLIGNEMETREAFFAIRE 
>>>>>        
>>>>>
>>>INTEGER, IN 
>>>    
>>>
>>>>>VARIABLE VARCHAR(255))
>>>>>AS VAR IDTLIGNEMETRE INTEGER;VRC INTEGER;BG INTEGER;BD 
>>>>>        
>>>>>
>>>INTEGER;IDTAFF 
>>>    
>>>
>>>>>INTEGER;
>>>>>
>>>>>
>>>>>TRY
>>>>>
>>>>>/* update the lignes with the VARIABLE stored value */
>>>>>
>>>>>SELECT TLI.LIGNE_BG, TLI.LIGNE_BD, TLI.IDAFFAIRE FROM 
>>>>>DBA.TLIGNESMETREAFFAIRE AS TL INNER JOIN DBA.TMETRESAFFAIRE AS TM
>>>>>ON  TL.IDTMETREAFFAIRE = TM.IDTMETREAFFAIRE INNER JOIN 
>>>>>DBA.TLIGNESAFFAIRE AS TLI
>>>>>ON  TLI.IDTLIGNEAFFAIRE = TM.IDTLIGNEAFFAIRE WHERE 
>>>>>IDTLIGNEMETREAFFAIRE = :IDTLIGNEMETREAFFAIRE;
>>>>>FETCH INTO :BG,:BD,:IDTAFF;
>>>>>
>>>>>
>>>>>
>>>>>DECLARE MLST CURSOR FOR SELECT IDTLIGNEMETREAFFAIRE FROM 
>>>>>DBA.TLIGNESMETREAFFAIRE
>>>>>                   AS TL INNER JOIN DBA.TMETRESAFFAIRE AS TM
>>>>>ON  TL.IDTMETREAFFAIRE = TM.IDTMETREAFFAIRE INNER JOIN 
>>>>>DBA.TLIGNESAFFAIRE AS TLI
>>>>>ON  TLI.IDTLIGNEAFFAIRE = TM.IDTLIGNEAFFAIRE
>>>>>WHERE TLI.LIGNE_BG >= :BG AND TLI.LIGNE_BD <= :BD
>>>>>AND TLI.IDAFFAIRE = :IDTAFF AND IDTLIGNEMETREAFFAIRE <> 
>>>>>:IDTLIGNEMETREAFFAIRE
>>>>>AND TL.FORMULE LIKE '%'||:VARIABLE||'%';
>>>>>
>>>>>
>>>>>   SET VRC = $RC;
>>>>>                                      WHILE VRC = 0 DO       
>>>>>       
>>>>>   BEGIN
>>>>>      FETCH MLST INTO :IDTLIGNEMETRE;
>>>>>      SET VRC = $RC;                                CALL 
>>>>>CALCVALUE(FALSE,:IDTLIGNEMETRE);
>>>>>   END;
>>>>>                                                     CATCH
>>>>>IF $RC <> 100 THEN STOP ($RC, 'Erreur lors de l''ex�cution de la 
>>>>>proc�dure MAJ r�sultat');
>>>>>
>>>>>-- 
>>>>>MaxDB Discussion Mailing List
>>>>>For list archives: http://lists.mysql.com/maxdb
>>>>>To unsubscribe:    
>>>>>http://lists.mysql.com/maxdb?>[EMAIL PROTECTED]
>>>>>
>>>>>   
>>>>>
>>>>>        
>>>>>
>>>> 
>>>>
>>>>      
>>>>
>>>Good morning,
>>>
>>>Few days ago I sent you a question about the strange behaviour of a 
>>>trigger. You replied to me to send you some more information 
>so I did 
>>>it. Since that mail I have not received any feedback. Did you find 
>>>something I could try ? Do you need something else which could 
>>>help you 
>>>? Is it too "strange" ?
>>>
>>>Thanks for you help.
>>>
>>>Xavier
>>>
>>>    
>>>
>>
>>
>>  
>>
>Hello,
>
>We spent time to reduce the database size. I hope your mailbox will 
>accept it. If you need a password to access to it, try orte7iui.
>
>To reproduce the problem :
>
>- Unzip and restore the database (I know you'd have thought 
>about it :-))
>- Execute the following queries :
>
>1st attempt :
>
>UPDATE DBA.TLIGNESMETREAFFAIRE SET FORMULE = 27 WHERE 
>IDTLIGNEMETREAFFAIRE = 603
>
>if the database does not crash the TLIGNESMETREAFFAIRES lines with 
>IDTLIGNEMETREAFFAIRE=605 or IDTLIGNEMETREAFFAIRE=606 or 
>IDTLIGNEMETREAFFAIRE=607 should be updated.
>
>2nd attempt :
>
>UPDATE DBA.TLIGNESMETREAFFAIRE SET FORMULE = 32 WHERE 
>IDTLIGNEMETREAFFAIRE = 603
>
>The database crashes every time.
>
>Thank you very much for your help.
>Best regards, Xavier.
>

Thank you very much for sending the backup.
I have now been able to reproduce and fix the bug. 
However, I think you will not be very happy even with the bug fix, because
it seems that your trigger does not show the expected behavior.
In the following code

TRY
  SELECT VARIABLE FROM DBA.LSTVAR;
  WHILE $RC = 0 DO
    BEGIN
    FETCH INTO :VARI;

    SELECT REPLACE(:NFORM,LSTVAR.VARIABLE,LSTVAR.RESULTAT) FROM 
    DBA.LSTVAR
    WHERE :VARI IN (SELECT VARIABLE FROM DBA.LSTVAR);
    
    FETCH INTO :NFORM;
    END;
CATCH
  IF $RC <> 100 THEN STOP ($RC, 'Impossible de remplacer la formule');

the execution of the inner select statement closes the cursor of the outer
one, because the same cursor name (none) has been used for both.
This causes an error when FETCH INTO :VARI; is executed again inside the loop.
In the end this has been the reason for the crash.
I think you should change your code as follows :

TRY
  DECLARE C1 CURSOR FOR SELECT VARIABLE FROM DBA.LSTVAR;
  WHILE $RC = 0 DO
    BEGIN
    FETCH C1 INTO :VARI;

    DECLARE C2 CURSOR FOR SELECT REPLACE(:NFORM,LSTVAR.VARIABLE,LSTVAR.RESULTAT) FROM 
    DBA.LSTVAR
    WHERE :VARI IN (SELECT VARIABLE FROM DBA.LSTVAR);
    
    FETCH C2 INTO :NFORM;
    END;
CATCH
  IF $RC <> 100 THEN STOP ($RC, 'Impossible de remplacer la formule');

Since I do not understand exactly how your triggers and procedures are nested, there 
may be
other places that have to be changed this way.  

Best Regards,
Thomas

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to