2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
2022-01-27 20:08:36 +01:00
|
|
|
|
|
|
|
"""
|
|
|
|
ID: issue-6746
|
|
|
|
ISSUE: 6746
|
2024-05-10 00:19:51 +02:00
|
|
|
TITLE: Regression: CREATE DATABASE fails with 'Token unknown' error when DB name is enclosed in double quotes and 'DEFAULT CHARACTER SET' is specified after DB name
|
2022-01-27 20:08:36 +01:00
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-6517
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_6517
|
2022-01-27 20:08:36 +01:00
|
|
|
"""
|
2024-05-10 00:19:51 +02:00
|
|
|
import locale
|
|
|
|
from pathlib import Path
|
2021-04-26 20:07:00 +02:00
|
|
|
|
|
|
|
import pytest
|
2022-01-27 20:08:36 +01:00
|
|
|
from firebird.qa import *
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
db = db_factory()
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
act = python_act('db')
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2021-12-15 22:02:07 +01:00
|
|
|
test_db = temp_file('tmp_core_6517.fdb')
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2021-12-15 22:02:07 +01:00
|
|
|
@pytest.mark.version('>=3.0.8')
|
2022-01-27 20:08:36 +01:00
|
|
|
def test_1(act: Action, test_db: Path):
|
2024-05-10 00:19:51 +02:00
|
|
|
test_sql = f"""
|
|
|
|
create database "{act.get_dsn(test_db)}" default character set utf8;
|
|
|
|
"""
|
|
|
|
act.isql(switches = ['-q'], input = test_sql, connect_db = False, combine_output = True, io_enc = locale.getpreferredencoding())
|