8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 10:43:03 +01:00

Bugfix for CORE-5154: Services API don't work with non-ascii database names (ported from aafemt/firebird). Also add some missing tags that might require transliteration.

This commit is contained in:
Dmitry Yemanov 2016-06-23 23:15:12 +03:00
parent 32c119a16e
commit ced719d44f

View File

@ -233,14 +233,17 @@ IntlParametersBlock::TagType IntlSpb::checkTag(UCHAR tag, const char** tagName)
IntlParametersBlock::TagType IntlSpbStart::checkTag(UCHAR tag, const char** tagName) IntlParametersBlock::TagType IntlSpbStart::checkTag(UCHAR tag, const char** tagName)
{ {
switch (tag)
{
FB_IPB_TAG(isc_spb_dbname);
return TAG_STRING;
}
switch (mode) switch (mode)
{ {
case 0: case 0:
switch (tag) switch (tag)
{ {
FB_IPB_TAG(isc_spb_dbname);
return TAG_STRING;
case isc_action_svc_backup: case isc_action_svc_backup:
case isc_action_svc_restore: case isc_action_svc_restore:
case isc_action_svc_properties: case isc_action_svc_properties:
@ -255,6 +258,8 @@ IntlParametersBlock::TagType IntlSpbStart::checkTag(UCHAR tag, const char** tagN
case isc_action_svc_trace_start: case isc_action_svc_trace_start:
case isc_action_svc_db_stats: case isc_action_svc_db_stats:
case isc_action_svc_validate: case isc_action_svc_validate:
case isc_action_svc_set_mapping:
case isc_action_svc_drop_mapping:
mode = tag; mode = tag;
break; break;
} }
@ -285,6 +290,7 @@ IntlParametersBlock::TagType IntlSpbStart::checkTag(UCHAR tag, const char** tagN
case isc_action_svc_display_user_adm: case isc_action_svc_display_user_adm:
switch (tag) switch (tag)
{ {
FB_IPB_TAG(isc_spb_sql_role_name);
FB_IPB_TAG(isc_spb_sec_username); FB_IPB_TAG(isc_spb_sec_username);
FB_IPB_TAG(isc_spb_sec_password); FB_IPB_TAG(isc_spb_sec_password);
FB_IPB_TAG(isc_spb_sec_groupname); FB_IPB_TAG(isc_spb_sec_groupname);
@ -316,6 +322,8 @@ IntlParametersBlock::TagType IntlSpbStart::checkTag(UCHAR tag, const char** tagN
case isc_action_svc_db_stats: case isc_action_svc_db_stats:
switch (tag) switch (tag)
{ {
FB_IPB_TAG(isc_spb_sts_table);
return TAG_STRING;
FB_IPB_TAG(isc_spb_command_line); FB_IPB_TAG(isc_spb_command_line);
return TAG_COMMAND_LINE; return TAG_COMMAND_LINE;
} }
@ -324,7 +332,6 @@ IntlParametersBlock::TagType IntlSpbStart::checkTag(UCHAR tag, const char** tagN
case isc_action_svc_validate: case isc_action_svc_validate:
switch (tag) switch (tag)
{ {
FB_IPB_TAG(isc_spb_dbname);
FB_IPB_TAG(isc_spb_val_tab_incl); FB_IPB_TAG(isc_spb_val_tab_incl);
FB_IPB_TAG(isc_spb_val_tab_excl); FB_IPB_TAG(isc_spb_val_tab_excl);
FB_IPB_TAG(isc_spb_val_idx_incl); FB_IPB_TAG(isc_spb_val_idx_incl);
@ -332,6 +339,15 @@ IntlParametersBlock::TagType IntlSpbStart::checkTag(UCHAR tag, const char** tagN
return TAG_STRING; return TAG_STRING;
} }
break; break;
case isc_action_svc_set_mapping:
case isc_action_svc_drop_mapping:
switch (tag)
{
FB_IPB_TAG(isc_spb_sql_role_name);
return TAG_STRING;
}
break;
} }
return TAG_SKIP; return TAG_SKIP;