TPC-Council / HammerDB

HammerDB Database Load Testing and Benchmarking Tool
http://www.hammerdb.com
GNU General Public License v3.0
589 stars 119 forks source link

name 'checkschema' is not defined using Python CLI interface #711

Closed sm-shaw closed 3 months ago

sm-shaw commented 3 months ago

Guidance Bug reports are for when HammerDB is not behaving as expected. Bug reports should not be submitted for help in understanding database performance related questions. General questions on database performance or HammerDB usability should be submitted under Discussions.

Describe the bug In HammerDB v4.10 running checkschema in the Python interface gives the following error:

HammerDB CLI v4.10
Copyright (C) 2003-2024 Steve Shaw
Type "help()" for a list of commands

hammerdb>>>checkschema()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'checkschema' is not defined

To Reproduce Steps to reproduce the behavior: Run checkschema() in the Python CLI interface.

Expected behavior Expected to run the checkschema command.

Screenshots

HammerDB Version (please complete the following information):

HammerDB Interface (please complete the following information):

Operating System (please complete the following information):

Database Server (please complete the following information):

Database Client (please complete the following information):

Additional context Add any other context about the problem here.

A workaround is possible by modifying hammerdb.py in tclpy0.4/lib

and adding:

def checkschema(*args):
    eval_hammerdb_command('checkschema',*args)
sm-shaw commented 3 months ago

Issue has been fixed with commit https://github.com/sm-shaw/libtclpy/commit/982a09fa4164c02ef3a2fa6f1940883ba56ab3e4 in the https://github.com/sm-shaw/libtclpy repository.

This change will be picked up when building from source and is present from HammerDB v4.11onwards.