New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Number of digits in exponent of cast( <double> to varchar ) in dialect 1 depends on protocol that is used for connecting to database [CORE4814] #5112
Comments
Commented by: @dyemanov Please test prior version(s) and specify whether it's a regression or not. |
Commented by: @pavel-zotov On WI-V2.1.7.18553 and WI-V2.5.5.26907 both cases produce exponent with three digits (i.e. with leading zero), regardless to used protocol: C:\1INSTALL\FIREBIRD\fb25sC\bin>.\isql -q CAST1.000000000000000e+019 SQL> quit; C:\1INSTALL\FIREBIRD\fb25sC\bin>.\isql -q CAST1.000000000000000e+019 SQL> show version; |
Commented by: @dyemanov v2.х uses the XNET protocol in this case, not embedded like v3. You may try running fb_inet_server with the -i switch to disable XNET and check again. |
Commented by: @pavel-zotov Result is the same. C:\>sc qc FirebirdServerfb25sC | findstr /i /c:path -- and then restart FB and repeat commands mentioned above. Output is:C:\1INSTALL\FIREBIRD\fb25sC\bin>isql -q CAST1.000000000000000e+019 SQL> quit; C:\1INSTALL\FIREBIRD\fb25sC\bin>isql -q CAST1.000000000000000e+019 |
Commented by: @asfernandes Cannot reproduce in Linux. |
Modified by: @dyemanovFix Version: 3.0.0 [ 10048 ] |
Commented by: @hvlad I confirm that embedded on Windows produced 2 digits in exponent while standalone server produced 3 digits. |
Commented by: @pavel-zotov > - how many digits in exponen is printed on Linux currently ? Currenlty one may see always *two* digits, regardless of protocol. $ /opt/fb30sc/bin/isql -q CAST1.000000000000000e+19 SQL> quit; $ /opt/fb30sc/bin/isql -q CAST1.000000000000000e+19 SQL> show version; |
Modified by: @dyemanovFix Version: 3.0 RC2 [ 10048 ] => |
Submitted by: @pavel-zotov
WI-T3.0.0.31844
C:\MIX\firebird\QA\fbt-repo\tmp>isql -q
SQL> set sql dialect 1;
SQL> create database 'c:\temp\c1712dia1_emb.fdb';
SQL> select cast(1e19 as varchar(30)) from rdb$database;
CAST
1.000000000000000e+19
SQL> exit;
C:\MIX\firebird\QA\fbt-repo\tmp>isql -q
SQL> set sql dialect 1;
SQL> create database 'localhost/3333:c:\temp\c1712dia1_tcp.fdb';
SQL> select cast(1e19 as varchar(30)) from rdb$database;
CAST
1.000000000000000e+019
Note that when TCP is used than exponent is '+019' -- with leading '0' left side from '19'.
The same will be if we use existent database instead of creating it.
The text was updated successfully, but these errors were encountered: