Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-83152

It's impossible to prepare sql statements, with the firebird/interbase driver, which contains PSQL variable names, because they are colon prefixed.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.1
    • Fix Version/s: None
    • Component/s: SQL Support
    • Labels:
      None
    • Environment:
      Linux, macOS, Windows
    • Platform/s:
      All

      Description

      Because the interbase driver QIBASE unconditionally replaces colon prefixed names with question marks, to support named parameters.
      This happens in QSqlResultPrivate::namedToPositionalBinding() where the colon is hardcoded as named parameter introducer.
      So this behaviour can neither disabled nor can the prefix configured to use other characters than the colon.

      This affects the create procedure and the execute block statements, which therefore cannot used with in/out parameters or variables.

      e.g.
      execute block (inparam varchar(10) = ?)
      returns (outparam varchar(20))
      as
      declare variable varname varchar(10);
      begin
      select :inparam || :varname
      from rdb$database
      into :outparam;
      suspend;
      end

      this will be converted in QSqlResultPrivate::namedToPositionalBinding() to:

      execute block (inparam varchar(10) = ?)
      returns (outparam varchar(20))
      as
      declare variable varname varchar(10);
      begin
      select ? || ?
      from rdb$database
      into ?;
      suspend;
      end

      which is completely illegal firebird sql code.

      Please allow this feature to be disabled or allow to replace the named parameter prefix character.

        Attachments

        For Gerrit Dashboard: QTBUG-83152
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            andysh Andy Shaw
            Reporter:
            jonjonas681 Johann Anhofer
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There is 1 open Gerrit change