<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>55673</bug_id>
          
          <creation_ts>2025-08-20 19:22:32 +0300</creation_ts>
          <short_desc>Некорректная настройка fbintl по умолчанию в firebird</short_desc>
          <delta_ts>2025-09-15 16:10:05 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>firebird-server</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kostevich Arseniy">kostevichae</reporter>
          <assigned_to name="Anton Farygin">rider</assigned_to>
          <cc>rider</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>271159</commentid>
    <comment_count>0</comment_count>
    <who name="Kostevich Arseniy">kostevichae</who>
    <bug_when>2025-08-20 19:22:32 +0300</bug_when>
    <thetext>Версия пакета:
firebird-server-4.0.5-alt2

Платформа(Обновлена до Sisyphus):
Alt Server 11.0 x86_64

Шаги для воспроизведения:
1) Создать базу данных с кодировкой win1251
# (echo &quot;CREATE DATABASE &apos;/var/lib/firebird/testdb.fdb&apos; page_size 8192&quot;; echo &quot;user &apos;SYSDBA&apos; password &apos;masterkey&apos;&quot;; echo &quot;DEFAULT CHARACTER SET WIN1251;&quot;;) | isql-fb
2) Создать пользователя
# (echo &quot;create user SYSDBA password &apos;masterkey&apos;;&quot;; echo &apos;commit;&apos;) | isql-fb -user sysdba /var/lib/firebird/testdb.fdb
3) Создать таблицу:
 isql-fb -user sysdba /var/lib/firebird/testdb.fdb 
Database: /var/lib/firebird/testdb.fdb, User: SYSDBA
SQL&gt; CREATE TABLE MyTable (
CON&gt;     id INT NOT NULL PRIMARY KEY,
CON&gt;     txt VARCHAR(32),
CON&gt;     ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP
CON&gt; );

Ожидаемый результат:
Таблица успешно создана

Фактический результат:
Ошибка:
Statement failed, SQLSTATE = 2C000
unsuccessful metadata update
-MYTABLE
-CHARACTER SET WIN1251 is not installed

Кодировки настраиваются в /etc/firebird/fbintl.conf, по умолчанию там есть:
intl_module = builtin {
    icu_versions = default
}

intl_module = fbintl {
    filename = $(this)/fbintl
    icu_versions = default
}
...
charset = WIN1251 {
    intl_module = fbintl
    collation = WIN1251
    collation = WIN1251_UNICODE
    collation = PXW_CYRL
    collation = WIN1251_UA
}  

Проблема в строке filename = $(this)/fbintl, данная настройка указывает на /etc/firebird/fbintl.so, но по умолчанию в /etc/firebird лежит libfbintl.so
lrwxrwxrwx  1 root root    39 окт 10  2024 libfbintl.so -&gt; ../../usr/lib64/firebird/intl/fbintl.so

Если изменить на filename = $(this)/libfbintl, то ошибка воспроизводится(Не знаю почему, возможно конфигурация не поддерживает симлинки. Либо макрос $(this) указывает куда-то в другое место, а должен на директорию с конфигами согласно https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rlsnotes30.html).

Если изменить на filename = /usr/lib64/firebird/intl/fbintl, то ошибка не воспроизводится.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272482</commentid>
    <comment_count>1</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2025-09-15 14:30:47 +0300</bug_when>
    <thetext>В дальнейшем, пожалуйста, когда заводите ошибку делайте так что бы примеры можно было легко скопировать.

в данном случае лучше было бы написать вот так:
SQL&gt; CREATE TABLE MyTable ( id INT NOT NULL PRIMARY KEY,txt VARCHAR(32),ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP );</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272492</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2025-09-15 16:10:05 +0300</bug_when>
    <thetext>firebird-4.0.6-alt1 -&gt; sisyphus:

Mon Sep 15 2025 Anton Farygin &lt;rider@altlinux.com&gt; 4.0.6-alt1
- 4.0.5 -&gt; 4.0.6
- added an explicit dependency on libicu to prevent startup errors (closes: #55658)
- fixed the incorrect path to the intl module in the default fbintl config file (closes: #55673)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>