locked
Hello Friends RRS feed

  • Question

  • User1182241144 posted

    I have created one procedure which takes approx 1 min to complete. 

    My problem is that when one user request to that procedure its working fine. If more than one user request to that procedure, It will starts overwriting user request.

    Please help me.

    Tuesday, January 31, 2017 5:25 AM

All replies

  • User197322208 posted

    If more than one user request to that procedure, It will starts overwriting user request.

    Do you use global temporary tables? 

    Please show some code.

    Tuesday, January 31, 2017 8:47 AM
  • User1182241144 posted

     I am new in mysql. 

    I used both syntax

    DROP TEMPORARY TABLE IF EXISTS TempCoverers;
    CREATE TEMPORARY TABLE TempCoverersAS

    DROP TEMPORARY TABLE IF EXISTS TempCoverUnderwriterPremium;
    CREATE TEMPORARY TABLE TempCoverUnderwriterPremium
    (
    serial_number bigint(20),premium_per decimal(15,4),premium_per_basis varchar(50),is_actual tinyint(1),premium_amt decimal(15,4)
    ,client_cover_amt decimal (15,4),funeral_cover_member_risk_premium_id bigint(20),share_percentage bigint(20),
    funeral_plan_benefit_type_id bigint(20),scheme_underwriter_id bigint(20)
    );

    Friday, February 3, 2017 6:13 AM
  • User364663285 posted

    Hi,

    Try rowlock in this case, like

    UPDATE <tablename> (ROWLOCK) SET <somecolumn> = <somecolumn> WHERE id=1

    Tuesday, February 14, 2017 7:00 AM