#15 Hanging with 'invalid string position'

Released in 1.4x
closed
Drzewiecki T.
SQL (23)
7
2006-01-19
2005-03-09
Drzewiecki T.
No

BEGIN
SELECT 1 INTO 1 FROM a WHERE a=a
END;
...
invalid string position

Discussion

  • Drzewiecki T.
    Drzewiecki T.
    2005-03-09

    Logged In: YES
    user_id=747155

    insert into XXX_FOO (
    XXX_FOO_ID, WWW_ID, SUB_ID, XXX_A_ID,
    XXX_FOO_XYZ_CODE, ACCOUNT_ID, CUST_ID,
    HOLD_FLG, AUTO_SEE_FLG, POLICY_ID,
    OPERATION_FLG, AAA_CODE_ID, CREATED_BY,
    CREATED_TS, PRO_STATUS_ID,
    LAST_XXX_TREATMENT_ID, LAST_XXX_ABCDE_ID,
    NEXT_XXX_TREATMENT_ID, NEXT_XXX_ABCDE_ID,
    LMNO_XYZ_CODE, BAR_XYZ_CODE, AVAILABLE_DT,
    XXX_ID, ASSIGNMENT_CODE, FFF_BAR_CODE,
    REQUEST_AAA_CODE, XXX_LMNO_ID, XXX_BAR_ID,
    START_AMT, FINSH_AMT, CURRENCY_XYZ_CODE,
    SSS_TS, SSS_STATUS_CODE, USER_NAME)
    values
    (99999999, 11, 12345, 123456, 130170, 4321, 63, 1, 1,
    100002, 1, 100202, 'aa', SYSDATE, NULL, 100002, 100011,
    100000, 100001, NULL, NULL, SYSDATE, NULL, NULL,
    NULL, NULL, NULL, NULL, 0, 87.77, 5001000, '02/13/05
    05:49:55 am', 130207, 'bb');

    problem resolved when I changed '02/13/05 05:49:55 am'
    to "SYSDATE + 1"

     
  • Drzewiecki T.
    Drzewiecki T.
    2005-03-14

    Logged In: YES
    user_id=747155

    Sometimes OCI_ATTR_PARSE_ERROR_OFFSET returns
    position greater than total length of line. For example this
    returns position 76 (it should return 40):
    "BEGIN
    SELECT 1 INTO 1 FROM dual WHERE 1=1
    END;"
    Is this bug of the OCI or we changed something in last
    versions?

    I added checking length of the string in
    CommandParser.cpp:GetSelectErrorPos().

     
  • Drzewiecki T.
    Drzewiecki T.
    2005-03-14

    • status: open --> closed
     
  • Drzewiecki T.
    Drzewiecki T.
    2005-03-18

    Logged In: YES
    user_id=747155

    Additional comments:
    "When you try to select on an invalid view like this :
    CREATE VIEW toto as SELECT 1 test FROM dual WHERE
    1='a'
    and you try this :
    SELECT * FROM toto
    "

    It is very interesting. OCI returns position not in SELECT *
    FROM ... but(! I discovered it yesterday !) position in wrong
    VIEW (32). If you add some statements in view (for
    example '1=1 AND') position is changing! In OCI
    documentation there is nothing about this behaviour.

     
  • Drzewiecki T.
    Drzewiecki T.
    2006-01-19

    • milestone: 455736 --> Released in 1.4x