Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-658

CUBIRD PDO::quote() result is not as documented

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PDO 9.1.0.0002
    • Fix Version/s: PHP 8.4.4.0002
    • Component/s: PDO Driver
    • Labels:
      None
    • Environment:

      Debian Linux, PHP 5.4, CUBRID 9.1.0

      Description

      Result of PDO::quote() should enclose the string in single quotes ''. But it does not.

      See this gist for a code to reproduce the issue: https://gist.github.com/cebe/6461443.

      {code:php}
      <?php

      $pdo = new PDO('cubrid:dbname=demodb;host=localhost;port=33000', 'dba', '');


      $test = 'mystring';
      echo $pdo->quote($test) . "\n";

      $test = "my'string";
      echo $pdo->quote($test) . "\n";{code}

      Expected:

      {code}
      'mystring'
      'my''string'{code}

      Result:

      {code}
      mystring
      my''string{code}

        Activity

        Hide
        cn15800 谢韦华[Bert] added a comment -

        I have finded the cause of the issue, and i will fixed it in next version

        Show
        cn15800 谢韦华[Bert] added a comment - I have finded the cause of the issue, and i will fixed it in next version
        Hide
        cebe Carsten Brandt added a comment -

        Thanks for the quick response. Has this issue been introduced in a specific version or did it exist in all earlier versions?
        Need this information as I am working on the CUBRID implementation in Yii PHP framework and I want to create a documentation comment about this issue.

        Show
        cebe Carsten Brandt added a comment - Thanks for the quick response. Has this issue been introduced in a specific version or did it exist in all earlier versions? Need this information as I am working on the CUBRID implementation in Yii PHP framework and I want to create a documentation comment about this issue.
        Hide
        cn15800 谢韦华[Bert] added a comment -

        The issue exist in all earlier version

        Show
        cn15800 谢韦华[Bert] added a comment - The issue exist in all earlier version
        Hide
        cn15800 谢韦华[Bert] added a comment -

        after modify:

        'mystring'
        'my''string'

        Show
        cn15800 谢韦华[Bert] added a comment - after modify: 'mystring' 'my''string'
        Hide
        ryin005 Ray Yin added a comment -

        add a test case for this issue

        [php@NC-PL-QA-012 _13_2H]$ svn ci --username cn14323 -m "[APIS-658]Add a case to test quote() function of cubrid pdo"
        Adding         _13_2H/apis_658.phpt
        Transmitting file data .
        Committed revision 36559.
        

        Link: http://svn.bds.nhncorp.com/xdbms/cubridqa/branches/RB-8.4.4/interface/PDO/scenario/pdo/_13_issues/_13_2H/apis_658.phpt

        Show
        ryin005 Ray Yin added a comment - add a test case for this issue [php@NC-PL-QA-012 _13_2H]$ svn ci --username cn14323 -m "[APIS-658]Add a case to test quote() function of cubrid pdo" Adding _13_2H/apis_658.phpt Transmitting file data . Committed revision 36559. Link: http://svn.bds.nhncorp.com/xdbms/cubridqa/branches/RB-8.4.4/interface/PDO/scenario/pdo/_13_issues/_13_2H/apis_658.phpt
        Hide
        ryin005 Ray Yin added a comment -
        • Test OS: Linux 64
        • CUBRID: 8.4.4.0227
        • PHP: 5.5.0, 5.4.3, 5.3.6, 5.2.17
        • Driver: cubrid-pdo 8.4.4.0002 (2013-11-22)

        Test Result: pass

        The issue could be closed

        Show
        ryin005 Ray Yin added a comment - Test OS: Linux 64 CUBRID: 8.4.4.0227 PHP: 5.5.0, 5.4.3, 5.3.6, 5.2.17 Driver: cubrid-pdo 8.4.4.0002 (2013-11-22) Test Result: pass The issue could be closed

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            cebe Carsten Brandt
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: