Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firebird-driver sources mised some of parameters defined in firebird.conf #41

Open
pavel-zotov opened this issue Sep 12, 2024 · 0 comments
Assignees

Comments

@pavel-zotov
Copy link

In core.py we can find this dictionary:

# Firebird configuration parameters (for use in iFirebirdConf.get_key())
config_items = {
    'DatabaseAccess': str,
    'RemoteAccess': bool,
    'ExternalFileAccess': str,
    ...
    'ExtConnPoolSize': int,
    'ExtConnPoolLifeTime': int,
}

AFAIU, these are parameters which firebird-driver 'knows'; they are defined in FB 3.x and some of them - in FB 4.x+.
But several parameters from firebird.conf are missed in this map.

They can be found if we run script "fd-fb-conf.py" (see attach) with single input argument = full path to appropriate client library (e.g.
c:\python3x\python.exe fd-fb-conf.py c:\path_to_fb\fbclient.dll etc).

I've done this for FB 4.x, 5.x and 6.x.
Differences are collected into .xlsx file (see in attached .zip), and this is what we will see for FB 4.x ... 6.x:
image

Parameters marked in gray color can be ignored: they either not used at all or are experimental and may be removed in the future.
But what about rest parameters ?
Can they be added in the config_items so that we will able to used them in custom driver-config instances ?

Particularly, I'm interesting now about InlineSortThreshold.
This:

    srv_cfg = driver_config.register_server(name = f'srv_cfg_2650', config = '')
    db_cfg_name = f'db_cfg_2650'
    db_cfg_object = driver_config.register_database(name = db_cfg_name)
    db_cfg_object.server.value = srv_cfg.name
    db_cfg_object.protocol.value = NetProtocol.INET
    db_cfg_object.database.value = str(act.db.db_path)
    db_cfg_object.config.value = f"""
        InlineSortThreshold = 100
    """
    with connect(db_cfg_name, user = act.db.user, password = act.db.password) as con:
        cur = con.cursor()
        cur.execute("select rdb$config_name, rdb$config_value from rdb$config where rdb$config_name = 'InlineSortThreshold'")
        for r in cur:
            print(r[0],r[1])

-- does not work as expected and returns always default value (1000).
So we have to create special alias in the databases.conf with non-default value of this parameter to be used further in our QA.
IMO, this is inconvenient.
firebird-driver-missed-parameters-from-FB-config_-_xlsx.zip
fd-fb-conf_-_py.zip

@pcisar pcisar self-assigned this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants