bugGNU Octave - Bugs: bug #62708, [octave forge] (database)...

 
 

bug #62708: [octave forge] (database) pq_exec_params could show better error message on invalid input

Submitter:  None
Submitted:  Tue 05 Jul 2022 01:59:47 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Confirmed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 7.1.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 07 Jul 2022 01:40:28 PM UTC, comment #3: 

I agree. It looks like the input validation of "pq_exec_params" could be improved.

Markus Mützel <mmuetzel>
Group administrator
Thu 07 Jul 2022 01:35:09 PM UTC, comment #2: 

Thanks for pointing that out - we ran the tests again in Octave 7.1 and the original error message within print_usage is gone (yay) but now we've got




>> pq_exec_params({})
error: Invalid call to __pq_exec_params__.  Correct usage is:

undifined internal function, meant to be called by @code{pq_exec_params}
error: called from
    print_usage at line 105 column 5
    pq_exec_params at line 132 column 11


pq_exec_params({},'',{})
error: Invalid call to __pq_exec_params__.  Correct usage is:

undifined internal function, meant to be called by @code{pq_exec_params}
error: called from
    print_usage at line 105 column 5
    pq_exec_params at line 132 column 11


... I guess this is something which should be fixed within pq_exec_params/the database package?

Anonymous
Thu 07 Jul 2022 01:24:06 PM UTC, comment #1: 

This is most likely a duplicate of bug #61363 that was solved before Octave 6.4.0 was released.

Please, try updating to a newer version of Octave.

Closing as duplicate. Please, let us know if you think that this is something different.

Markus Mützel <mmuetzel>
Group administrator
Tue 05 Jul 2022 01:59:47 PM UTC, original submission:  

Hi,

when checking the input arguments, pq_exec_params() internally seems to call print_usage() - however, if the first argument is not a conn-object, it produces the following errors


pq_exec_params({})
error: Invalid call to buffer.  Correct usage is:

 -- Function File: Y = buffer (X, N, P, OPT)
 -- Function File: [Y, Z, OPT] = buffer (...)
error: called from
    print_usage at line 98 column 5
    buffer at line 61 column 5
    print_usage>get_usage_texinfo at line 138 column 20
    print_usage at line 68 column 30
    pq_exec_params at line 132 column 11
>> pq_exec_params({},'')
error: Invalid call to buffer.  Correct usage is:

 -- Function File: Y = buffer (X, N, P, OPT)
 -- Function File: [Y, Z, OPT] = buffer (...)
error: called from
    print_usage at line 98 column 5
    buffer at line 61 column 5
    print_usage>get_usage_texinfo at line 138 column 20
    print_usage at line 68 column 30
    pq_exec_params at line 132 column 11
>> pq_exec_params({},'',{})
error: Invalid call to buffer.  Correct usage is:

 -- Function File: Y = buffer (X, N, P, OPT)
 -- Function File: [Y, Z, OPT] = buffer (...)
error: called from
    print_usage at line 98 column 5
    buffer at line 61 column 5
    print_usage>get_usage_texinfo at line 138 column 20
    print_usage at line 68 column 30
    pq_exec_params at line 132 column 11

... and so on.

The database package I'm currently using is 2.4.4.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-07-07 mmuetzel StatusDuplicate Confirmed
        Open/ClosedClosed Open
        Release6.3.0 7.1.0
        Summary[octave forge] (database) pq_exec_params does not call print_usage() correctly [octave forge] (database) pq_exec_params could show better error message on invalid input
    2022-07-07 mmuetzel StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #61363

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code