Re: [Firebird-devel] Improve release filenames

2022-08-25 Thread Jiří Činčura
> As the Intel platforms will be the *huge* majority, what about this:
>
> win32 | win64 |win64-arm
>
> or this:
>
> win32-x86 | win64-x86 | win64-arm
>
> or just:
>
> win32 | win64-x86 | win64-arm

That seems pretty inconsistent (in regards to other filenames).

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Improve release filenames

2022-08-25 Thread Jiří Činčura
> In the past win32 and win64 was good but now Windows exists for ARM64.
> x86, x(86-)64, arm64, etc. are more clear. But I am not a core developer 
> just a user. :-)

Same for me.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Improve release filenames

2022-08-24 Thread Jiří Činčura
>> How crazy idea it would be to have even Linux builds with binaries?
>>
>
> May be I've lost context - but we release linux builds with binaries 
> since the first days of the project.

Sorry. I meant debug(info) builds with binaries.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Improve release filenames

2022-08-24 Thread Jiří Činčura
How crazy idea it would be to have even Linux builds with binaries?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Improve release filenames

2022-08-24 Thread Jiří Činčura
I would unify the `pdb`, `debuginfo`, etc. into simple `debug` suffix. 

Probably Alex can clarify, but it really the ARM32/64 for Linux? And if so, do 
we even need ARM32?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Named parameters in client libraries

2022-08-22 Thread Jiří Činčura
> Does it have something like JDBC's ParameterMetaData?

No. Only 
https://docs.microsoft.com/en-us/dotnet/api/system.data.common.dbparameter?view=net-6.0#properties.
 But this is purely in hands of developer, no connection to what's in database. 

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Named parameters in client libraries

2022-08-18 Thread Jiří Činčura
In .NET parameters are named `@param`, aka the delimiter is `@`.

> I suppose you transform this to:
>
> select *
>   from rdb$database
>   where ? = 1 or ? = '2'

Correct.

> Which will map to two Firebird parameters with different types.

Correct.

> But for the user of the library, I suppose it's one parameter, correct?

Correct. Developer defines just `@param` and assigns value.

> And what type (and the deduction rules) this parameter will be described as?

Developer can set the type of parameter, which is later used to know how to 
read it from it's value. For the describe this set of info_sql values is used 
to get the info.
isc_info_sql_select,
isc_info_sql_describe_vars,
isc_info_sql_sqlda_seq,
isc_info_sql_type,
isc_info_sql_sub_type,
isc_info_sql_length,
isc_info_sql_scale,
isc_info_sql_field,
isc_info_sql_relation,
// isc_info_sql_owner,
isc_info_sql_alias,
isc_info_sql_describe_end,

isc_info_sql_bind,
isc_info_sql_describe_vars,
isc_info_sql_sqlda_seq,
isc_info_sql_type,
isc_info_sql_sub_type,
isc_info_sql_length,
isc_info_sql_scale,
isc_info_sql_field,
isc_info_sql_relation,
// isc_info_sql_owner,
isc_info_sql_alias,
isc_info_sql_describe_end,

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Current value for parallel workers

2022-08-16 Thread Jiří Činčura
> I think DBA may want a monitoring table (MON$WORKERS?) that shows how 
> many workers are currently active, what attachment are they bound to, 
> and what task (backup/sweep/etc) are they used for. Maybe some other 
> metrics could be added later.

Sounds good to me as well.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Current value for parallel workers

2022-08-16 Thread Jiří Činčura
>Not yet. How would you like to see it ? Monitoring table, session 
> context variable,
> database_info item ? All above ? ;) 

Session context variable seems to be a good fit. Monitoring table looks like 
overkill. And database_info is inconvenient for end users.

> Should user session be allowed to 
> change it ?

No.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Current value for parallel workers

2022-08-16 Thread Jiří Činčura
Hi *,

Is there a way to get current value of parallel workers (from i.e. monitoring 
tables)?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] New statement: EXECUTE SQL

2022-08-16 Thread Jiří Činčura
>Can we just have named parameters support in Firebird before this feature 
> so 
> client parser will be not needed at all?..

That would be great. :)

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] op_que_events and database shutdown

2022-08-16 Thread Jiří Činčura
> Are aux connections closed when a database is shutdown? In that case you 
> should be able to detect the connection close.

As I wrote in my initially, the socket is not closed.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] op_que_events and database shutdown

2022-08-16 Thread Jiří Činčura
> I just want to know 
> there's nothing on protocol level I can use to help this situation.

No response. So I suppose nothing?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Parallel workers in isc_action_svc_repair + isc_spb_rpr_sweep_db

2022-08-15 Thread Jiří Činčura
>There is isc_spb_rpr_par_workers. I should have been more careful 
> reading the question, sorry.

Thanks. I was grep-ing for `parallel`, expecting something like 
isc_spb_bkp_parallel_workers. :)

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Status of isc_dpb_parallel_workers

2022-08-15 Thread Jiří Činčura
> So, I don't see what should be added to the README.parallel_features
> regarding gbak. Do you have good idea ?

A simple pointer to doc/README.gbak. Just to make sure people reading about the 
parallel features in engine don't miss the gbak too.

Something like "Parallel backups and restores are now supported too." (with 
link).

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] New statement: EXECUTE SQL

2022-08-14 Thread Jiří Činčura
Looks like a good idea to me. 

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Parallel workers in isc_action_svc_repair + isc_spb_rpr_sweep_db

2022-08-12 Thread Jiří Činčura
Hi *,

does the isc_dpb_parallel_workers apply when running sweep via 
isc_action_svc_repair + isc_spb_rpr_sweep_db?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Status of isc_dpb_parallel_workers

2022-08-12 Thread Jiří Činčura
> Is there any prospect for more parallel operations in near future? 
> Especially around i.e. query processing, basically general database 
> operations. The reason I'm asking is whether to implement it in .NET 
> provider on connection string level or only for "gbak" and "gfix".

Disregard this question. I somewhat missed the index creation feature. It looks 
like connection string level looks like a better fit.

BTW the linked document mentions only gfix and index. But doc/README.gbak 
covers also gbak. Maybe good idea to update the doc/README.parallel_features as 
well?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] DPB and collation

2022-08-12 Thread Jiří Činčura
> There isn't one.
>
> CREATE DATABASE immediately executes a ALTER CHARACTER SET  SET 
> DEFAULT COLLATION.

Thanks. I was hoping there's something on protocol level (to save some 
roundtrips). 

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] BLOB_APPEND and NULL

2022-08-12 Thread Jiří Činčura
>The BLOB_APPEND is not CONCATENATION, it is non-standard function 
> with custom semantics.

Yes, it's non-standard function. But even non-standard function can behave in 
similar way other functions behave in SQL world. It's not the first 
non-standard function we have.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] BLOB_APPEND and NULL

2022-08-11 Thread Jiří Činčura
On Thu, Aug 11, 2022, at 17:58, Vlad Khorsun wrote:
>The answer is the same - for user convenience. When I want to append 
> something to the
> already existing blob, I doesn't expect to destroy my blob just because 
> nothing is
> appended to it.

How is that different from `update foo set bar = bar || 'foo'` where `bar` is 
null?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/





Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] BLOB_APPEND and NULL

2022-08-11 Thread Jiří Činčura
On Thu, Aug 11, 2022, at 18:56, Vlad Khorsun wrote:
>I replied to Jiří who definitely read that discussion ;)

But I read it like last week, completely, because I discovered it as part of 
reading RN. I wasn't in the discussion as it was unfolding.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] BLOB_APPEND and NULL

2022-08-11 Thread Jiří Činčura
I was thinking the same when reading the discussion on GH. I believe it's not 
late to make correction (hey, we all make mistakes) and have consistent 
behavior.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Status of isc_dpb_parallel_workers

2022-08-08 Thread Jiří Činčura
Is there any prospect for more parallel operations in near future? Especially 
around i.e. query processing, basically general database operations. The reason 
I'm asking is whether to implement it in .NET provider on connection string 
level or only for "gbak" and "gfix".

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] op_que_events and database shutdown

2022-08-08 Thread Jiří Činčura
>What events might be missing ? Connection is shutdown and can't be 
> resurrected. New connection
> will queue new events and can't miss one. Remember, first "queue 
> events" in connection immediately
> receives most current counters. It could be compared with last known 
> counters before re-connect,
> if necessary.

I mean, the application does not know that the database was shutdown and will 
no not (re)queue events on new connection. Other applications might be already 
reconnected (because these are doing something and hence detect the shutdown) 
and sending events.

The problem is not how to recover operations after new connection. But how to 
detect new connection is needed. 

It's fine for me if this is purely responsibility of developer - for example 
doing some heartbeat/watchdog/... logic. I just want to know there's nothing on 
protocol level I can use to help this situation.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] DPB and collation

2022-08-05 Thread Jiří Činčura
Hi *,

What's the DPB tag for collation when creating database. For charset there's 
isc_dpb_set_db_charset.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Status of isc_dpb_parallel_workers

2022-08-04 Thread Jiří Činčura
Hi *,

What's the status of isc_dpb_parallel_workers? The only reference I can find is 
the slide deck from 2019 from Firebird Conference. But I can't find anything in 
code. Was this implemented? Dropped? Renamed? Postponed?

Thanks.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] op_que_events and database shutdown

2022-08-03 Thread Jiří Činčura
Hi *,

op_que_events and waiting for events, database goes into shutdown. What to do 
next?

The socket is kept open, no luck there. And the "database shutdown" error is 
returned only after some next operation. But as I'm waiting for the events, I 
kind of don't have next operation. Unless the developer does something (which 
might happen way later and events might be missed).

Is this something we have solution for. Or is this developer's responsibility?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Builds for ARM64

2022-07-12 Thread Jiří Činčura
Hi *,

Is there an ongoing effort to have ARM64 (I'm asking primarily for ARM64 on 
Windows, but Linux would be welcome as well) builds available for download?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] WITH CALLER PRIVILEGES propagation

2022-05-04 Thread Jiří Činčura
Thanks Vlad. Now it makes sense.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Unhandled exception in aux_request

2022-04-25 Thread Jiří Činčura
Hi *,

What to look for with this error in the server log?

Unhandled exception in server's aux_request():
Unable to complete network request to host "XXX".
Error while listening for an incoming event connection request.
Cannot create a file when that file already exists.

Firebird 3, Windows Server 2019.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] WITH CALLER PRIVILEGES propagation

2022-04-22 Thread Jiří Činčura
My script uses packages (and I grant to package). That's not going to fly on 
2.5. :(

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

On Fri, Apr 22, 2022, at 17:23, Alex Peshkoff via Firebird-devel wrote:
> On 22.04.2022 18:07, Jiří Činčura wrote:
>> Yes. Fails.
>>
>> Do you want me to create script for testing?
>>
>
> Can you please check your script on some old version? Like 2.5.
>
> May be I miss something.
>
>
>
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] WITH CALLER PRIVILEGES propagation

2022-04-22 Thread Jiří Činčura
Yes. Fails.

Do you want me to create script for testing?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

On Fri, Apr 22, 2022, at 10:19, Alex Peshkoff via Firebird-devel wrote:
> On 22.04.2022 08:20, Jiří Činčura wrote:
>> Without it, it obviously fail. Because the "limited" user does not have 
>> permissions. That's what I'm trying go around thru the permissions of 
>> calling object.
>>
>
> Fails w/o execute statement ? Just using select from procedure instead? 
> Very strange - this always worked with caller privileges.
>
>
>
>
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] WITH CALLER PRIVILEGES propagation

2022-04-21 Thread Jiří Činčura
Without it, it obviously fail. Because the "limited" user does not have 
permissions. That's what I'm trying go around thru the permissions of calling 
object.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

On Thu, Apr 21, 2022, at 14:57, Alex Peshkoff via Firebird-devel wrote:
> On 21.04.2022 13:38, Jiří Činčura wrote:
>
>> I guess the "caller privileges" is propagated only into 
>> `pkg_test_limited.test` when calling, but not further into `t_test`. Can I 
>> somewhat make it work/propagate? Or did I misunderstood the feature?
>>
>
> "with caller privileges" was designed to make privileges, granted to 
> calling object, be used when processing dynamic SQL statement. SO first 
> of all I suggest to perform all this chain of calls w/o execute 
> statement and see does it make any difference.
>
>
>
>
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] WITH CALLER PRIVILEGES propagation

2022-04-21 Thread Jiří Činčura
Hi,

Can propagate the privileges down into the call stack when using WITH CALLER 
PRIVILEGES? For example:
CREATE TABLE T_TEST (ID INTEGER NOT NULL,
CONSTRAINT PK_TEST PRIMARY KEY (ID));

/* Package header: PKG_TEST, Owner: SYSDBA */
CREATE PACKAGE PKG_TEST AS
begin
procedure test returns (i int);
end^

/* Package header: PKG_TEST_LIMITED, Owner: SYSDBA */
CREATE PACKAGE PKG_TEST_LIMITED AS
begin
procedure test returns (i int);
end^

/* Package body: PKG_TEST, Owner: SYSDBA */
CREATE PACKAGE BODY PKG_TEST AS
begin
procedure test returns (i int)
as
begin
for select id from t_test into :i do
begin
suspend;
end
end
end^

/* Package body: PKG_TEST_LIMITED, Owner: SYSDBA */
CREATE PACKAGE BODY PKG_TEST_LIMITED AS
begin
procedure test returns (i int)
as
begin
for execute statement 'select i from pkg_test.test' with caller 
privileges into :i do
begin
suspend;
end
end
end^

/* Grant permissions for this database */
GRANT SELECT ON T_TEST TO PACKAGE PKG_TEST_LIMITED;
GRANT EXECUTE ON PACKAGE PKG_TEST_LIMITED TO USER LIMITED;

Now if I do, under LIMITED user, `select * from pkg_test_limited.test;` is will 
end up with `no permission for SELECT access to TABLE T_TEST`. But if I change 
the execute statement into `for execute statement 'select id t_test' with 
caller privileges into :i do` everything is fine.

I guess the "caller privileges" is propagated only into `pkg_test_limited.test` 
when calling, but not further into `t_test`. Can I somewhat make it 
work/propagate? Or did I misunderstood the feature?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] op_batch_rls without op_batch_create

2022-03-22 Thread Jiří Činčura
Disregard my question. I missed the 335545159 error.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] op_batch_rls without op_batch_create

2022-03-22 Thread Jiří Činčura
Hi *,

Will the server handle gracefully situation when op_batch_rls is sent without 
previously sending op_batch_create? I.e. if developer makes a mistake.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] IBatch::TAG_BUFFER_BYTES_SIZE and p_batch_data

2022-03-17 Thread Jiří Činčura
Hi *,

Is the IBatch::TAG_BUFFER_BYTES_SIZE directly related to how big p_batch_data 
(in total) can be? Or is it something different.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Knowing whether fbclient supports isc_dpb_utf8_filename

2022-03-02 Thread Jiří Činčura
>isc_get_client_version() returns string with FB_BUILD_SUFFIX as last part.
> It have value "Firebird 2.1" for FB 2.1, "Firebird 4.0" for FB 4 and so on.

Thanks. That and small regex will do just fine.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] isc_arg_string in status vector

2022-03-02 Thread Jiří Činčura
> But before attachment is done that does not happen and strings are
> returned as is (for example, error about non-existent file in Windows
> ANSI encoding).
>
> To convert charsets, database must be opened currently.

That's sad. I'm facing exactly that now with isc_create_database. :(

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Knowing whether fbclient supports isc_dpb_utf8_filename

2022-03-01 Thread Jiří Činčura
> Sorry for disappointing you, but they not gonna be any helpful, as they 
> always return version "6.3" for InterBase compatibility ;-)

Yeah. And looks like no function returns FB_MAJOR_VER.

Hope somebody has a nice trick in sleeves.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Knowing whether fbclient supports isc_dpb_utf8_filename

2022-03-01 Thread Jiří Činčura
> int  ISC_EXPORT isc_get_client_major_version ();
> int  ISC_EXPORT isc_get_client_minor_version ();

My excitement was short lived. fbclient.dll version 4.0.1.2692 returns 6 and 3 
respectively. :(

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] isc_dpb_lc_ctype and isc_dpb_set_db_charset and isc_dpb_utf8_filename

2022-03-01 Thread Jiří Činčura
> If one wants everyting to be utf8 why not have appropriate attachment?

I agree. Especially in .NET. But people sometimes do crazy combinations.

I wish I could drop all charsets and simply use UTF8 only. That would cleanup 
nice chunks of code. Maybe in couple of years.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Knowing whether fbclient supports isc_dpb_utf8_filename

2022-03-01 Thread Jiří Činčura
> void ISC_EXPORT isc_get_client_version ( ISC_SCHAR  *);
> int  ISC_EXPORT isc_get_client_major_version ();
> int  ISC_EXPORT isc_get_client_minor_version ();

Great! 

How could I miss it???

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Knowing whether fbclient supports isc_dpb_utf8_filename

2022-03-01 Thread Jiří Činčura
Hi *,

Can somebody think of a way to detect whether fbclient supports 
isc_dpb_utf8_filename? For example when calling isc_create_database in .NET 
provider with "Embedded" I need to know whether I can use UTF8 in database 
path. 

On Windows I can check version of the DLL and when version >= 2.5 I can assume 
I'm safe (What happens when I connect using 2.5 to older database?). But on 
Linux, etc. the binary has no such version info in header. Bummer.

I can also tell everybody that < 2.5 is not supported and happily use 
isc_dpb_utf8_filename (OK, maybe also I need to care about 
isc_spb_utf8_filename.), but that's lame.

For isc_database_info I don't have handle.

I'm kind of missing op_connect phase to get the selected protocol version. :)

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] isc_dpb_lc_ctype and isc_dpb_set_db_charset and isc_dpb_utf8_filename

2022-02-28 Thread Jiří Činčura
Thanks. I suppose not only TPB, but also buffers for batch, events, etc., right?

Basically only DPB and SPB are "UTF8-ready".

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

On Mon, Feb 28, 2022, at 15:21, Alex Peshkoff via Firebird-devel wrote:
> On 2/28/22 13:38, Jiří Činčura wrote:
>> Does the isc_dpb_utf8_filename imply also UTF8 strings in TPB (i.e. for 
>> table names used with isc_tpb_lock_write, etc.)?
>>
>
> They are expected in attachment charset.
>
>
>
>
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] isc_dpb_lc_ctype and isc_dpb_set_db_charset and isc_dpb_utf8_filename

2022-02-28 Thread Jiří Činčura
> Also, does the isc_dpb_utf8_filename imply UTF8 for database name in 
> i.e. op_attach (not DPB, the name that's before DPB)?

Obviously it has to. I somewhat thought the DPB contains database name as well. 
Silly me.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] isc_dpb_lc_ctype and isc_dpb_set_db_charset and isc_dpb_utf8_filename

2022-02-28 Thread Jiří Činčura
Also, does the isc_dpb_utf8_filename imply UTF8 for database name in i.e. 
op_attach (not DPB, the name that's before DPB)?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] isc_dpb_lc_ctype and isc_dpb_set_db_charset and isc_dpb_utf8_filename

2022-02-28 Thread Jiří Činčura
Does the isc_dpb_utf8_filename imply also UTF8 strings in TPB (i.e. for table 
names used with isc_tpb_lock_write, etc.)?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] isc_dpb_lc_ctype and isc_dpb_set_db_charset and isc_dpb_utf8_filename

2022-02-28 Thread Jiří Činčura
Hi *,

Can somebody explain me how isc_dpb_lc_ctype and isc_dpb_set_db_charset and 
isc_dpb_utf8_filename relate to each other. In .NET provider these are used 
somewhat chaotically and I'd like to fix that.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] isc_arg_string in status vector

2022-02-28 Thread Jiří Činčura
Hi *,

If I get pointer to a string in isc_arg_string in status vector the encoding is 
UTF8 if isc_dpb_utf8_filename was specified and ANSI/system charset when 
isc_dpb_utf8_filename was not specified?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Statement type for INSERT ... RETURNING

2022-02-27 Thread Jiří Činčura
> See discussions:
> - subject "isc_info_sql_stmt_type/isc_info_sql_stmt_flags" on the 19th 
> and 20th of August 2021
> - subject "Firebird 5 and Update...Returning" on the 26th of November 2021

Thanks. 

I actually have a simple real world case. To comply with ADO.NET, 
insert/update/delete statements should return number of rows affected. Other 
statements should return -1. But it's difficult to detect the "insert" with 
"insert ... returning".

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Build for WASM

2022-02-23 Thread Jiří Činčura
> You mean, running in the browser?

Yes. Or any other place where WASM is/will be supported.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Build for WASM

2022-02-22 Thread Jiří Činčura
Hi *,

Was there ever a discussion about providing Firebird build for WASM? I mean, 
having Firebird Embedded in WASM would be sick.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] F_FULLSYNC on macOS

2022-02-17 Thread Jiří Činčura
https://twitter.com/marcan42/status/1494213855387734019?s=21

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Dropping database default SQL SECURITY

2022-02-14 Thread Jiří Činčura
You say it cannot be NULL, yet you say the "initial NULL". Looks very inconsist 
to me. Now for INVOKER there's 2 possible values. Yet one can't ever be set by 
user.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

On Mon, Feb 14, 2022, at 15:22, Roman Simakov wrote:
> It's the default for a database. It cannot be NULL. Initial NULL means 
> INVOKER.
>
> пн, 14 февр. 2022 г. в 16:43, Jiří Činčura :
>>
>> Hi *,
>>
>> How can I drop SQL SECURITY on database, aka setting the RDB$SQL_SECURITY 
>> column back to "null"?
>>
>> --
>> Mgr. Jiří Činčura
>> https://www.tabsoverspaces.com/
>>
>>
>> Firebird-Devel mailing list, web interface at 
>> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
>
>
> -- 
> Роман Симаков
>
>
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] DROP SQL SECURITY for trigger

2022-02-14 Thread Jiří Činčura
Makes sense. Thanks.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

On Mon, Feb 14, 2022, at 15:26, Roman Simakov wrote:
> It's possible to alter a trigger partly, alter an option of a trigger.
> SQL SECURITY is one of such options. For procedures you must specify
> "complete definition" every time.
>
> пн, 14 февр. 2022 г. в 12:35, Jiří Činčura :
>>
>> Hi *,
>>
>> I'm wondering why is there explicit "DROP SQL SECURITY" for triggers, while 
>> i.e. procedures use regular "alter" statement?
>>
>> --
>> Mgr. Jiří Činčura
>> https://www.tabsoverspaces.com/
>>
>>
>> Firebird-Devel mailing list, web interface at 
>> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
>
>
> -- 
> Роман Симаков
>
>
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Dropping database default SQL SECURITY

2022-02-14 Thread Jiří Činčura
Hi *,

How can I drop SQL SECURITY on database, aka setting the RDB$SQL_SECURITY 
column back to "null"?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] DROP SQL SECURITY for trigger

2022-02-14 Thread Jiří Činčura
Hi *,

I'm wondering why is there explicit "DROP SQL SECURITY" for triggers, while 
i.e. procedures use regular "alter" statement?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Statement type for INSERT ... RETURNING

2022-02-11 Thread Jiří Činčura
Hi *,

Is there a way to get as a response to isc_info_sql_stmt_type for "INSERT ... 
RETURNING" isc_info_sql_stmt_insert instead of
isc_info_sql_stmt_exec_procedure? Or something similar that would specify it's 
an "insert"?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Slower database creation on Embedded in 4.0 compared to 2.5

2022-02-08 Thread Jiří Činčura
> dummy packet interval makes no sense for embedded
> do not think that affects result - just strange

Yes, it's same code for wire protocol implementation as well as embedded.

>> 0.042s (on average on my machine) on FB 2.5, but 0.162s on FB4
> Almost 4 times slower is definitely hard to explain with 1.35 times 
> bigger DB size, no idea why does it run so slow for you.

I'm running on PCIe Gen 4 SSD and also on Windows/NTFS. Might affect the 
numbers.

> Do not see it as critical.

Fine with me.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Slower database creation on Embedded in 4.0 compared to 2.5

2022-02-08 Thread Jiří Činčura
> First of all DPB, but conf files are also interesting.

DPB:
isc_dpb_dummy_packet_interval => 120
isc_dpb_sql_dialect => 3
isc_dpb_user_name
isc_dpb_set_db_charset
isc_dpb_force_write => 0
isc_dpb_overwrite => 1
isc_dpb_page_size => 16k

Config file is whatever is default as there's no explicit config file.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Slower database creation on Embedded in 4.0 compared to 2.5

2022-02-08 Thread Jiří Činčura
> Are you using default DB options?

You mean DPB or settings in firebird.conf?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Slower database creation on Embedded in 4.0 compared to 2.5

2022-02-07 Thread Jiří Činčura
Hi *,

For some tests I'm creating and dropping a database for each test. Doing just 
that, it takes around 0.042s (on average on my machine) on FB 2.5, but 0.162s 
on FB4. Is this expected?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Acquire lock for relation (XXX) failed

2022-02-01 Thread Jiří Činčura
> session 1: CREATE INDEX ... ON VERY_BIG_TABLE (...); COMMIT;

Can same be achieved by selects/insert/updates and some TPB settings (like i.e. 
isc_tpb_concurrency)?

> session 2: INSERT INTO VERY_BIG_TABLE VALUES (..) -- in NO WAIT transaction

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Acquire lock for relation (XXX) failed

2022-02-01 Thread Jiří Činčura
Hi *,

What do I have to do to get an error "Acquire lock for relation (XXX) failed"?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] obj_database value in FB3 and FB4

2022-01-26 Thread Jiří Činčura
> They are also reinserted without changes in backup/restore...

Even better, not! 

This looks like a bug to me. Should I create an issue?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] obj_database value in FB3 and FB4

2022-01-26 Thread Jiří Činčura
> Perhaps we should have reserved several items but ...

Exactly. But. 

Given the value is easily accessible for everybody in system tables, it's a WTF 
moment.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] obj_database value in FB3 and FB4

2022-01-26 Thread Jiří Činčura
Hi *,

Is there a reason why the obj_database (and items following) changed values 
between FB3 and FB4? This sucks a lot. Now when reading i.e. from 
RDB$USER_PRIVILEGES.RDB$OBJECT_TYPE one has to distinguish between FB3 and FB4 
when handling what object it is. 

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Pure C methods for IBatch

2022-01-18 Thread Jiří Činčura
>   public delegate* unmanaged[Cdecl]  FIREBIRD_IStatus*> getStatus;

I completely ruled out function pointers because I still support .NET Framework 
and it's not supported there. But on the second thought this might be a nail in 
the coffin of .NET Framework support. Thanks for kicking me.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Jiří Činčura
> I suspect you didn't understand well how easy it is.

I'm all ears. Or actually eyes - I'll be glad to learn some new C#/.NET interop 
tricks.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Jiří Činčura
> Similar thing could be done for C#.

Again, I'm not saying it couldn't be done.

It's just with simple export I can call it right here, right now (i.e. 
https://github.com/FirebirdSQL/NETProvider/blob/master/src/FirebirdSql.Data.FirebirdClient/Client/Native/IFbClient.cs#L83-L85).
 It's there, platform supports it, done. :)

I don't think we need to talk about it more. Pure C export is not there and 
will not be added. Hence I'll have to eventually work around it and implement 
"C++ calling".

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Jiří Činčura
> The "C library" is just another way to call things.
>
> It's binary compatible with the C++ interface. In fact the C++ interface
> is a wrapper around C objects to be multi compiler compatible.

Sure, I'm not saying it isn't. 

It's just way way harder to do this type of interop from C# compared to simply 
calling exported function from fbclient. Something like 11 out of 10 people 
will tell you to get/create a wrapper. Which is fine if you own the code. Not 
the case here.

> I don't know how you call fbclient in the .NET code.
>
> But I remember C# can map C DLL with attributes.
>
> So I believe it's possible to map the current fbclient functions
> directly in C# code.

That expects exports with `extern "C"`.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Jiří Činčura
> Yes - because we can generate pure C OO API in a form I've attached here 
> for illustration.

That would work for me. :)

> No - we never included it into distribution because currently it's not 
> ready for use, some tuning will be needed. Next, you will have to use 
> shared library based on .c generated file and serving as a proxy between 
> tour program and fbclient.

I was hoping to have this in fbclient directly. Now it looks like I need to do 
basically the same to be able to use batching in Embedded in .NET provider.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Pure C methods for IBatch

2022-01-17 Thread Jiří Činčura
Hi *,

I'm looking at 12.batch_isc.cpp and wondering whether there's a way to do 
batching using pure C methods [1]. Something like simply calling 
isc_dsql_prepare instead of IAttachment::prepare. I know I can handle the 
"this" manually, but that's PIA. :)

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Batch completion state's simplified error blocks

2022-01-14 Thread Jiří Činčura
I can replicate it even with native code with 4.0.1.2704 fbclient (and same 
server). I'll create GitHub issue.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Batch completion state's simplified error blocks

2022-01-14 Thread Jiří Činčura
Sending 66 messages with error the response is:
  statement handle: 2
  p_batch_reccount: 66
  p_batch_updates: 66
  p_batch_vectors: 64
  p_batch_errors: 2
And again not a single integer in buffer for p_batch_errors.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Batch completion state's simplified error blocks

2022-01-14 Thread Jiří Činčura
Hi *,

It looks like server is not sending data according to description for 
op_batch_cs. 

I get this:
  statement handle: 2
  p_batch_reccount: 65
  p_batch_updates: 65
  p_batch_vectors: 64
  p_batch_errors: 1
Which makes sense (I've sent 65 messages with error). Then I read 65 integers 
for p_batch_updates, then 64 (int, status vector) pairs for p_batch_vectors. 
Finally I want to read one integer for p_batch_errors, but there's nothing left 
in input network buffer.

Did I miss something?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Timeout on batch

2022-01-13 Thread Jiří Činčura
> Defintely unsupproted.

Great (for me :)).

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Timeout on batch

2022-01-13 Thread Jiří Činčura
It's this (on a protocol level) 
https://github.com/FirebirdSQL/firebird/blob/master/src/remote/protocol.cpp#L665
 for a single statement.

If that field is not supported - and it looks to me it isn't - it's fine for 
me, I'm just checking some options single statement has.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Timeout on batch

2022-01-13 Thread Jiří Činčura
> Is there a way to send timeout value for batch, same way it's now 
> possible for single statements (op_execute/op_execute2)?

Nobody?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] TAG_MULTIERROR

2022-01-13 Thread Jiří Činčura
> Incoming message. I.e. by default batch stops processing on first error 
> and returns that error to the user (in completion state). With 
> TAG_MULTIERROR it proceeds with processing of following records.

Thanks.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Commit (un)certainity

2022-01-05 Thread Jiří Činčura
>Yes. You probably have the same problem in your provider, no?

The problem exists there. Same as with fbclient. But I don't explicitly solve 
it, application developer is responsible for handling such scenario (if ever).

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Commit (un)certainity

2022-01-05 Thread Jiří Činčura
One way to handle this is via manual inserts (and deletes) in a dedicated 
table. Something like:

1. Insert a row into the table at the beginning of each transaction.
2. If the connection fails during the commit, check for the presence of the 
corresponding row in the database.
- If the row is present, continue normally, as the transaction was committed 
successfully
- If the row is absent, use an execution strategy to retry the current 
operation.
3. If the commit is successful, delete the corresponding row to avoid the 
growth of the table.

But this needs support on application level. You're probably thinking about 
something in client library?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Timeout on batch

2022-01-05 Thread Jiří Činčura
Hi *,

Is there a way to send timeout value for batch, same way it's now possible for 
single statements (op_execute/op_execute2)?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Reading from batch

2022-01-03 Thread Jiří Činčura
Hi *,

Is there a way to read from a batch? I.e. executing `insert into foo (x) values 
(?) returning x` with bunch of parameters in a batch a then getting the values 
of `x`.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Different commands in a batch

2022-01-03 Thread Jiří Činčura
Hi *,

Executing different commands in a batch is not supported, right? Aka, it's only 
single command with multiple sets of parameters.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] p_batch_cs on the wire

2022-01-03 Thread Jiří Činčura
>  ULONG   p_batch_errors; // error's recnums
>
> Numbers of records with error. Used when too many errors took place. For 
> each error server sends number of message for which execution of SQL 
> statement failed. And yes - such number is 4-byte integer, data is sent 
> after an array of detailed error info.

What "too many errors" mean in real world?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] varbinary

2022-01-02 Thread Jiří Činčura
> yes, copy/paste from my source
>
>
> class method 
> DBvapausfestit_register_forms.insert_or_update_vapausfestit_register_forms( 
> ID:  not nullable  System.Guid; EVENT_ID:  not nullable  System.Guid; 
> ...

Might be a side effect of introducing new datatypes from Firebird 4, with 
stricter checking (which I think is correct).

You can simply use this 
(https://docs.microsoft.com/en-us/dotnet/api/system.text.encoding.getbytes?view=net-6.0#System_Text_Encoding_GetBytes_System_String_)
 method to get the bytes from string explicitly.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] p_batch_cs on the wire

2021-12-21 Thread Jiří Činčura
Now I realized what's going on. I started with `67 00 00 00 ...`, yet I forgot 
about the leading zeros, it should be `00 00 00 67 00 00 00 ...`. Now it makes 
bit more sense.

But still a simple description of fields in p_batch_cs would speed things up 
for me greatly.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] p_batch_cs on the wire

2021-12-21 Thread Jiří Činčura
> Are you sure you've shown me dump correctly? Here must be one more 

That's what I see in WireShark. 

Could you maybe describe in one or two sentences what the fields in p_batch_cs 
mean logically? Especially with regards to options one can send in BPB. It's 
difficult to do the decoding of packet, filling some local values and at the 
same time reason about the outcomes. 

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] p_batch_cs on the wire

2021-12-21 Thread Jiří Činčura
When sending 2 msgs (again, using fbclient.dll), the response is as follows. I 
don't understand that either.
67 00 00 00 (obviously operation )
02 00 00 00 
02 00 00 00
02 00 00 00
00 00 00 00
00 00 00 01 
00 00 00 01 

Client library processes it fine, but I'm not sure what's what. I also don't 
understand what the comment for `p_batch_vectors` is talking about "recnum + 
status vector pairs".

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] p_batch_cs on the wire

2021-12-21 Thread Jiří Činčura
Hi *,

I'm trying to read the response for op_batch_exec (op_batch_cs), the 
p_batch_cs. But what I'm getting over the wire (using fbclient library) is this 
`67 00 00 00 02 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01` 
and I'm confused. Here's what I'm decoding manually:
67 00 00 00 => op_batch_cs
02 00 00 00 => p_batch_statement
01 00 00 00 => p_batch_reccount
01 00 00 00 => p_batch_updates
But what's the remaining part:
00 00 00 00 00 00 00 00 01

It should be p_batch_vectors and p_batch_errors, both defined as ULONG. But 
it's not 2x 4 bytes. There's this extra 01. I'm clearly missing something.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] This piece of code crashes 4.0.0.2496 server

2021-12-20 Thread Jiří Činčura
> Please do.

https://github.com/FirebirdSQL/firebird/issues/7080

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] This piece of code crashes 4.0.0.2496 server

2021-12-20 Thread Jiří Činčura
Do you want me to create GH issue?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

On Mon, Dec 20, 2021, at 12:38, Alex Peshkoff via Firebird-devel wrote:
> On 12/20/21 14:27, Jiří Činčura wrote:
>> 4.0.1.2692 crashes too.
>>
>
> Thank you, reproduced.
>
>
>
>
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] varbinary

2021-12-20 Thread Jiří Činčura
> update of the netprovider 8.5 client.
> Several varchar (x) character set bytes are declared there which 
> crashes on an expected byte [] even though I have been sending it 
> strings for several months :-)

Do you have an example?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] This piece of code crashes 4.0.0.2496 server

2021-12-20 Thread Jiří Činčura
4.0.1.2692 crashes too.

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] This piece of code crashes 4.0.0.2496 server

2021-12-20 Thread Jiří Činčura
I have this piece of code (based on structure from 11.batch.cpp) and doing 
`batch->execute` crashes the remote server, version 4.0.0.2496. I know it will 
end up in error, because I didn't fix the `project1` for my structure, but 
client should not crash server no matter what, I think.

att = prov->attachDatabase(, "192.168.66.48:test.fdb", 
0, NULL);
tra = att->startTransaction(, 0, NULL);

FB_MESSAGE(Msg1, ThrowStatusWrapper,
(FB_VARCHAR(5), id)
(FB_VARCHAR(10), name)
) project1(, master);
project1.clear();
IMessageMetadata* meta = project1.getMetadata();

unsigned mesAlign = meta->getAlignment();
unsigned mesLength = meta->getMessageLength();
unsigned char* streamStart = align(streamBuf, mesAlign);

pb = utl->getXpbBuilder(, IXpbBuilder::BATCH, NULL, 0);
pb->insertInt(, IBatch::TAG_RECORD_COUNTS, 1);

const char* sqlStmt1 = "insert into batch(i) values(?)";
/*auto stmt = att->prepare(, tra, 0, sqlStmt1, 
SAMPLES_DIALECT, 0);
auto batch = stmt->createBatch(, meta, 
pb->getBufferLength(), pb->getBuffer());*/
batch = att->createBatch(, tra, 0, sqlStmt1, 
SAMPLES_DIALECT, meta,
pb->getBufferLength(), pb->getBuffer());

project1->id.set("BAT11");
project1->name.set("SNGL_REC1");
batch->add(, 1, project1.getData());

project1->id.set("BAT12");
project1->name.set("SNGL_REC2");
batch->add(, 1, project1.getData());

cs = batch->execute(, tra);
    print_cs(status, cs, utl);

batch->close();
batch = NULL;


-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-17 Thread Jiří Činčura
Thanks. 

Weird, that's exactly what I'm sending. Looks like there's something else I'm 
missing on protocol level. Guess it's gonna be good old days fiddling with 
bytes until I see what I'm doing wrong. :)

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Content for p_batch_create.p_batch_pb

2021-12-17 Thread Jiří Činčura
> Should be 0, NULL.

And with (TAG_RECORD_COUNTS, 1)?

-- 
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


  1   2   3   4   5   6   7   >