Skip to content

Commit

Permalink
Indicate in SPB that we are passing UTF-8 path to database
Browse files Browse the repository at this point in the history
  • Loading branch information
artyom-smirnov committed Feb 10, 2023
1 parent 044c6be commit ac90b1d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
46 changes: 29 additions & 17 deletions consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,23 +175,35 @@ const (
isc_tpb_lock_timeout = 21

// Service Parameter Block parameter
isc_spb_version1 = 1
isc_spb_current_version = 2
isc_spb_version = isc_spb_current_version
isc_spb_user_name = 28 // isc_dpb_user_name
isc_spb_sys_user_name = 19 // isc_dpb_sys_user_name
isc_spb_sys_user_name_enc = 31 // isc_dpb_sys_user_name_enc
isc_spb_password = 29 // isc_dpb_password
isc_spb_password_enc = 30 // isc_dpb_password_enc
isc_spb_command_line = 105
isc_spb_dbname = 106
isc_spb_verbose = 107
isc_spb_options = 108
isc_spb_address_path = 109
isc_spb_process_id = 110
isc_spb_trusted_auth = 111
isc_spb_process_name = 112
isc_spb_trusted_role = 113
isc_spb_version1 = 1
isc_spb_current_version = 2
isc_spb_version = isc_spb_current_version
isc_spb_user_name = 28 // isc_dpb_user_name
isc_spb_sys_user_name = 19 // isc_dpb_sys_user_name
isc_spb_sys_user_name_enc = 31 // isc_dpb_sys_user_name_enc
isc_spb_password = 29 // isc_dpb_password
isc_spb_password_enc = 30 // isc_dpb_password_enc
isc_spb_command_line = 105
isc_spb_dbname = 106
isc_spb_verbose = 107
isc_spb_options = 108
isc_spb_address_path = 109
isc_spb_process_id = 110
isc_spb_trusted_auth = 111
isc_spb_process_name = 112
isc_spb_trusted_role = 113
isc_spb_verbint = 114
isc_spb_auth_block = 115
isc_spb_auth_plugin_name = 116
isc_spb_auth_plugin_list = 117
isc_spb_utf8_filename = 118
isc_spb_client_version = 119
isc_spb_remote_protocol = 120
isc_spb_host_name = 121
isc_spb_os_user = 122
isc_spb_config = 123
isc_spb_expected_db = 124

isc_spb_connect_timeout = 57 // isc_dpb_connect_timeout
isc_spb_dummy_packet_interval = 58 // isc_dpb_dummy_packet_interval
isc_spb_sql_role_name = 60 // isc_dpb_sql_role_name
Expand Down
1 change: 1 addition & 0 deletions wireprotocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -1474,6 +1474,7 @@ func (p *wireProtocol) opServiceAttach() error {
spb := bytes.Join([][]byte{
{isc_spb_version, isc_spb_current_version},
{isc_spb_user_name, byte(len(userBytes))}, userBytes,
{isc_spb_utf8_filename, 1, 1},
}, nil)
if p.authData != nil {
specificAuthData := bytes.NewBufferString(hex.EncodeToString(p.authData)).Bytes()
Expand Down

0 comments on commit ac90b1d

Please sign in to comment.