Re: [Firebird-devel] New Feature ? Merge records referenced by FK

2014-04-28 Thread Alex
On 04/26/2014 08:16 PM, Leyne, Sean wrote:

 I regularly find myself having to merge two (or more) records referenced by
 numerous foreign keys... resulting in having to update many tables to
 perform this merge.  I would find it really useful if there was (and maybe
 there already is and I just didn't found it) a way to do this in one update
 (performing the cascade).

 If I am not the only one who would consider this useful, I will gladly add a
 ticket for this... I just didn't want to pollute the tracker with 
 something I
 would be the only one finding it useful.

 Example : Table Patient with a sequence ID often has duplicate (after two
 clinics merge or simply data entry error) but has numerous dependant tables
 referencing this ID.
 I don't think that this is a feature that should be considered.

 There are existing ways to resolve this:

 1- Rethink your schema, you could treat the Patient table as an Clinic 
 Patient/Alias table and define a separate Master Patient to which each 
 Clinic Patient/Alias entry would refer to.  In this way you only have 1 
 level of entries to update.

 2- create SPs which perform the required updates, based on coded rules for 
 each column/FK.  Yes, this requires that you create/maintain the SPs but you 
 are in control of the operation/scope.

 3- create an SP which uses system tables to navigate the schema to follow the 
 FK relationships, and performs the necessary updates.  The SP would need the 
 name of the master table to start from, the name of the column to be updated, 
 the original key value and the new key value.

Sean, certainly it's possible to replace almost any of higher than plain 
select/insert/update/delete SQL operators  with some SP (including MERGE 
itself). Certainly as a replacement of missing operators it's a 
solution. But somewhy people like to have things like group by, window 
functions, merge, etc. built-in. A case described here seems to 
realistic and widely used in development. I.e. I would like to say yes, 
it's good suggestion.



--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4406) New built-in functions for working with unix time

2014-04-28 Thread Doychin Bondzhev (JIRA)
New built-in functions for working with unix time
-

 Key: CORE-4406
 URL: http://tracker.firebirdsql.org/browse/CORE-4406
 Project: Firebird Core
  Issue Type: New Feature
  Components: UDF
Reporter: Doychin Bondzhev
Priority: Minor


It will be great if there is a function from_unixtime that will convert unix 
time stamp in milliseconds to firebird timestamp.

This is a similar function for linux that returns string:

--
#include stdio.h
#include time.h
#include stdlib.h

char* from_unixtime(long long int*);

char* from_unixtime(t)
long long int *t;
{
  char* res = (char*)malloc(32);

  long milis = *t % 1000;
  long tt = *t / 1000;

  char tmp[32];
  strftime(tmp, 32, %Y-%m-%d %H:%M:%S, localtime(tt));

  sprintf(res, %s:%d, tmp, milis);

  return res;
}
-
DECLARE EXTERNAL FUNCTION FROM_UNIXTIME
BIGINT
RETURNS CSTRING(100) FREE_IT
ENTRY_POINT 'from_unixtime' MODULE_NAME 'unixTime';
-

There is similar function in MySQL.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Re Planning the post v3 development

2014-04-28 Thread Dimitry Sibiryakov
27.04.2014 23:04, Jesus Garcia wrote:
 I know there is replications applications in firebird, but them are not what 
 is needed.

   What features you are missing in them?

-- 
   WBR, SD.

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Re Planning the post v3 development

2014-04-28 Thread Dmitry Yemanov
28.04.2014 01:04, Jesus Garcia wrote:

 Allways my customers require me features that oracle and sql server has

Well, they should understand that Firebird will never have all those 
features from Oracle and MSSQL. The question is what they really need.

 1. Built-in replication. Our customers want to have databases replicated
 and been able to move connections to another center in case of
 server/center hardware crash. I know there is replications applications
 in firebird, but them are not what is needed. (CORE-2021)

You're talking about a hot standby solution here. Surely, it can be 
built on top of the replication, but other solutions are also possible.

See for example:
http://tracker.firebirdsql.org/browse/CORE-2990

 2. Clustering. Allow access from two or more servers to a database.
 (CORE-2719)

I'd say you may forget about this in the context of the next release. I 
simply don't see how it could appear anytime soon.

 Now other features I would like to have:

 1. Transaction ID datatype. In v3, Transaction ID has changed to
 unsigned, but may be better a greater data type, like  40 bits value.
 Everyday databases grows, require more transactions and more users.
 Current transactionID is limit for the near future.

There's a 64-bit txn id implementation available (although not publicly 
yet), but alternative solutions also look possible. I'd like to have 
their draft implementations at hands before deciding what solution 
Firebird is going to get.

 2. Support for SQL Schemas. CORE-738

Personally, I would second this suggestion. The question, however, is 
who is interested in developing such a big piece of work. I'm afraid 
this not gonna be me, sorry.

 3. Service calls for aliases.conf CORE-1422

It's named databases.conf in v3 and its structure is quite different 
now. IMO, this ticket needs adjustments to the new realities before 
considering it for implementaion.


Dmitry


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4407) Grant and Revoke update (field)

2014-04-28 Thread Tomas Beran (JIRA)
Grant and Revoke update (field)
---

 Key: CORE-4407
 URL: http://tracker.firebirdsql.org/browse/CORE-4407
 Project: Firebird Core
  Issue Type: Bug
  Components: Security
Affects Versions: 2.5.2
 Environment: Linux 3.13.0-24-generic (Ubuntu 14.04)
Reporter: Tomas Beran


I have a problem with permissions. I test this problem on new database.
I have two users (User1 and User2), one table (TEST_TABLE (PKID, NAME, AGE)). I 
set permission select and update(AGE) to both users. Now everything is all 
right, but when I revoke permission to USER2 (revoke select, update(AGE)), then 
USER1 has not permission to update fields (but he should have).

Example:
create table TEST_TABLE (  PKID  integer,  NAME 
 varchar(10),  AGE   integer,
constraint TEST_PKID primary key (PKID));

commit;

insert into TEST_TABLE values (1, 'TEST', 99);

grant select, update(AGE) on TEST_TABLE to USER1, USER2;

--USER1 or USER2:
update TEST_TABLE set AGE = 1; --both can update

revoke select, update(AGE) on TEST_TABLE from USER2;
--USER1:
update TEST_TABLE set AGE = 1; --no permission to update

  Now USER1 has no permission for update/write access to COLUMN TEST_TABLE.AGE
  but has permission to select. If I grant update on whole TEST_TABLE then 
everything all right, but if I set permission on one field,
  permissions are wrong.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Simonov Denis

My list is as follows.

optimizer
1. Enable use MERGE / HASH JOIN for OUTER JOINs
2. Performing EXISTS / IN SEMI JOIN as including using MERGE / HASH, and  
NESTED LOOP using index
3. HASH aggregation Add to an existing method using sorting
4. Conditional INDEX ONLY SCAN as in Postgresql (dimitr said that it is  
possible to ODS 12)

PSQL and SQL
1. Add the ability to specify offer framing for window functions  
http://tracker.firebirdsql.org/browse/CORE-3647
2. Add JAVA, .NET PROCEDURE and FUNCTION (not just C++)
3. ROW VALUE CONSTRUCTOR http://tracker.firebirdsql.org/browse/CORE-3880
4. PACKAGEs Add to constants and variables  
http://tracker.firebirdsql.org/browse/CORE-670
5. Add the ability to write your own aggregate functions  
http://tracker.firebirdsql.org/browse/CORE-1326

Common Features
1. Bidirectional indices (one index for ASC and DESC)
2. Standby can be based on nbackup  
http://tracker.firebirdsql.org/browse/CORE-2990
3. Built as a plug -row replication . The standard delivery enable  
replication between servers firebird. For other servers, you can write  
your own plugin. Meaning plug-in capability to intercept changes from any  
table and write them in a log ( with options for filtering tables) , and  
then transmits a service already changed in another database.
Create a bunch of triggers to support replication is not the nicest way.  
http://tracker.firebirdsql.org/browse/CORE-2021


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Re Planning the post v3 development

2014-04-28 Thread Alex Peshkoff
On 04/28/14 12:44, Dmitry Yemanov wrote:
 3. Service calls for aliases.conf CORE-1422
 It's named databases.conf in v3 and its structure is quite different
 now. IMO, this ticket needs adjustments to the new realities before
 considering it for implementaion.

This request requires relatively small efforts to implement. But except 
ticket adjustments I need some use cases cause I do no see where such a 
feature can be useful.


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Dimitry Sibiryakov
28.04.2014 14:14, Simonov Denis wrote:
 3. Built as a plug -row replication . The standard delivery enable
 replication between servers firebird. For other servers, you can write
 your own plugin.

   I'm sleeping on it.

 Create a bunch of triggers to support replication is not the nicest way.

   May be it is not nicest, but it also has advantages.

-- 
   WBR, SD.

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] New Feature ? Merge records referenced by FK

2014-04-28 Thread Evelyne Girard
 Sean wrote :
 There are existing ways to resolve this:

Of course ... I was just proposing a feature which would be IMO useful for many 
users, I never said there were no simple way around as SPs using System tables 
(but having to be implemented by every firebird user)...
 
 1- Rethink your schema, you could treat the Patient table as an
 Clinic Patient/Alias table and define a separate Master Patient to
 which each Clinic Patient/Alias entry would refer to.  In this way
 you only have 1 level of entries to update.

I do have a Master Patient table (PIX) but it doesn't resolve merging issues, 
this is a way of keeping a link between different active and valid records.  
Keeping old duplicate records only because they are referenced by foreign keys 
is not the way to go for me.

And patient table was only one example, I do have the same issue with almost 
every single table that needs to be merged when merging databases ... and even 
in day to day operation a lot of tables where users can duplicate records 
granted they have made a typo in the identifier.

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Fwd: ARM64 port

2014-04-28 Thread Damyan Ivanov
(Context: this is a reply to a thread from November 2013 about porting 
Firebird to 64-bit ARM)

-=| Alex Peshkoff, 29.11.2013 15:34:02 +0400 |=-
 I will apply a patch commented in opder to avoid conflicts with 
 class IDs.

Alex, thanks for adding this to the B2_5_Release branch. It seems it 
missed the actual prefix.linux_arm64 file. Please find it attached.

I also tried to add arm64 support to trunk so that the new 
implementation ID is recognised. The result is in the attached patch. 
It also adds implementation IDs for Alpha and HPPA which were missing 
in the public header file.

I hope you find this useful.


-- dam
# The contents of this file are subject to the Interbase Public
# License Version 1.0 (the License); you may not use this file
# except in compliance with the License. You may obtain a copy
# of the License at http://www.Inprise.com/IPL.html
#
# Software distributed under the License is distributed on an
# AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express
# or implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code was created by Inprise Corporation
# and its predecessors. Portions created by Inprise Corporation are
# Copyright (C) Inprise Corporation.
#
# All Rights Reserved.
# Contributor(s): __.
# Start of file prefix.linux:  $(VERSION)  $(PLATFORM)
#  14 Apr 2008 Alan Barclayalan AT escribe.co.uk


#LD=@CXX@

#PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DNDEBUG -DLINUX -pipe -MMD -fPIC
#DEV_FLAGS=-ggdb -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Wall -Wno-switch

PROD_FLAGS=-O3 -DNDEBUG -DLINUX -DARM64 -pipe -MMD -fPIC -fsigned-char 
-fmessage-length=0
DEV_FLAGS=-ggdb -DLINUX -DARM64 -pipe -MMD -fPIC -Wall -fsigned-char 
-fmessage-length=0

OS_ServerFiles=inet_server.cpp

EMBED_UTIL_TARGETS=gstat gds_relay gsec nbackup fb_lock_print fbguard fbsvcmgr 
fbtracemgr
CLIENT_UTIL_TARGETS=gstat gds_relay gsec nbackup fb_lock_print fbguard 
fbmgr_bin fbsvcmgr fbtracemgr

Physical_IO_Module=unix.cpp
From d511e4a849712259925096a266228d4527bbc90a Mon Sep 17 00:00:00 2001
From: Damyan Ivanov d...@debian.org
Date: Mon, 28 Apr 2014 13:33:46 +
Subject: [PATCH] ARM4 support for trunk

---
 builds/posix/prefix.linux_arm64 | 27 +++
 configure.ac| 11 +++
 src/common/classes/DbImplementation.cpp | 28 +++-
 src/common/common.h |  4 
 src/jrd/inf_pub.h   |  3 +++
 5 files changed, 60 insertions(+), 13 deletions(-)
 create mode 100644 builds/posix/prefix.linux_arm64

diff --git a/builds/posix/prefix.linux_arm64 b/builds/posix/prefix.linux_arm64
new file mode 100644
index 000..a5a8755
--- /dev/null
+++ b/builds/posix/prefix.linux_arm64
@@ -0,0 +1,27 @@
+# The contents of this file are subject to the Interbase Public
+# License Version 1.0 (the License); you may not use this file
+# except in compliance with the License. You may obtain a copy
+# of the License at http://www.Inprise.com/IPL.html
+#
+# Software distributed under the License is distributed on an
+# AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express
+# or implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code was created by Inprise Corporation
+# and its predecessors. Portions created by Inprise Corporation are
+# Copyright (C) Inprise Corporation.
+#
+# All Rights Reserved.
+# Contributor(s): __.
+# Start of file prefix.linux:  $(VERSION)  $(PLATFORM)
+#  14 Apr 2008 Alan Barclayalan AT escribe.co.uk
+
+
+#LD=@CXX@
+
+#PROD_FLAGS=-ggdb -O3 -fno-omit-frame-pointer -DLINUX -pipe -MMD -fPIC
+#DEV_FLAGS=-ggdb -DLINUX -DDEBUG_GDS_ALLOC -pipe -MMD -p -fPIC -Wall -Wno-switch
+
+PROD_FLAGS=-O3 -DLINUX -DARM64 -pipe -p -MMD -fPIC -fsigned-char -fmessage-length=0
+DEV_FLAGS=-ggdb -DLINUX -DARM64 -pipe -p -MMD -fPIC -Wall -fsigned-char -fmessage-length=0 -Wno-non-virtual-dtor
diff --git a/configure.ac b/configure.ac
index 931c82f..4c9cd5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,6 +239,17 @@ dnl CPU_TYPE=ppc64
 STD_EDITLINE=true
 ;;
 
+  aarch64*-*-linux*)   // port was not tested
+MAKEFILE_PREFIX=linux_arm64
+INSTALL_PREFIX=linux
+PLATFORM=LINUX
+AC_DEFINE(LINUX, 1, [Define this if OS is Linux])
+EDITLINE_FLG=Y
+SHRLIB_EXT=so
+STD_EDITLINE=true
+STD_ICU=true
+;;
+
   sparc*-*-linux* | sparc*-*-gnu* | sparc*-*-k*bsd*-gnu)
 MAKEFILE_PREFIX=linux_sparc32
 INSTALL_PREFIX=linux
diff --git a/src/common/classes/DbImplementation.cpp b/src/common/classes/DbImplementation.cpp
index d554ab2..6152649 100644
--- a/src/common/classes/DbImplementation.cpp
+++ b/src/common/classes/DbImplementation.cpp
@@ -46,6 +46,7 @@ static const UCHAR CpuSh = 11;
 static const UCHAR CpuSheb = 12;
 

Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Scott Morgan
On 24/04/14 11:19, Dmitry Yemanov wrote:
 This message is the invitation to both project members and users who 
 closely follow the development.

UTC time zone support. Vital for international work and handy even for
general use.

It doesn't look like v3 has it (are we sure v3 can't catch this before
it freezes?).

Tickets CORE-694 and CORE-909 mention it.

Scott


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Dmitry Yemanov
28.04.2014 16:14, Simonov Denis wrote:

 My list is as follows.

Thanks, but I seemed to explicitly state that plain wishlists don't 
count. Choose top five from your list, start separate thread per feature 
and argue why we should prefer these features over other ones.


Dmitry


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Carlos H. Cantu
Here is my list:

1) I still would like to see this implemented (without the need of external
mechanisms), but I'm not sure if it would be possible at all:
http://tracker.firebirdsql.org/browse/CORE-1738

2) I second Jesus Garcia request for native replication, since people at
FDD and in FireBase's list are always claiming about the lack of such
feature.

3) A way to schedule some tasks direct in FB, for example,
running procures, sweeps, statistics recalcs, etc. at specific
scheduled days/times. What would be accepted as a task could be
limited to whatever you guys thinks that would be safe to implement:
http://tracker.firebirdsql.org/browse/CORE-743

4) A way to access data in external files/non-fb-databases . AFAIR,
this was planned as an extension of currently execute statement

5) An embedded Firebird version for Android (even if only basic
server features could be available):
http://tracker.firebirdsql.org/browse/CORE-3885

6) Custom messages for FK exceptions (and check constraints too):
http://tracker.firebirdsql.org/browse/CORE-736

7) It is known that mixing DDL/DML in the same transaction can cause
corruption in DBs. If this cannot be 100% fixed, I suggest to
introduce some mechanism to detect such situation and avoid the
execution of the statement before corruption happens.

8) Enhancement to the numerics calculations. The currently rule of
summing the scale of the types involved in muls/divs is very bad and
can easily cause overflow. Maybe FB could automatically truncate the
result to the maximum precision possible to accommodate the final
value. Even better if the truncation happens only in the final result
(not during the internal calculations).

After your comments, I can create the missing tickets in the tracker,
only for the features that has any chance to be implemented.

I suggest that if some of those features are impossible to be
implemented, their existing tickets should be marked to Wont/Fix and
the details of why be added to the comments.

[]s
Carlos
http://www.firebirdnews.org
FireBase - http://www.FireBase.com.br


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Mark Rotteveel
On 28-4-2014 16:29, Carlos H. Cantu wrote:
 8) Enhancement to the numerics calculations. The currently rule of
 summing the scale of the types involved in muls/divs is very bad and
 can easily cause overflow. Maybe FB could automatically truncate the
 result to the maximum precision possible to accommodate the final
 value. Even better if the truncation happens only in the final result
 (not during the internal calculations).

This behavior is defined in the SQL standard (SQL:2011 Foundation, 
section 6.27) for multiplication (see sub c), with division we can 
choose (see sub d):

1) If the declared type of both operands of a dyadic arithmetic operator 
is exact numeric, then the declared type of the result is an 
implementation-defined exact numeric type, with precision and scale 
determined as
follows:
a) Let S1 and S2 be the scale of the first and second operands respectively.
b) The precision of the result of addition and subtraction is 
implementation-defined, and the scale is the maximum of S1 and S2.
c) **The precision of the result of multiplication is 
implementation-defined, and the scale is S1 + S2**.
d) The precision and scale of the result of division are 
implementation-defined.

I'd suggest that instead the maximum precision of DECIMAL and NUMERIC 
should be increased.

Mark
-- 
Mark Rotteveel

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4408) Merge records referenced by FK

2014-04-28 Thread Evelyne Girard (JIRA)
Merge records referenced by FK
--

 Key: CORE-4408
 URL: http://tracker.firebirdsql.org/browse/CORE-4408
 Project: Firebird Core
  Issue Type: New Feature
Reporter: Evelyne Girard
Priority: Trivial


It would be nice to be able to merge a record referenced by Foreign Keys with 
another and have the server performing a cascade update instead of having to 
update all the tables referencing this record and then delete the referenced 
record.

Example : 
Table Patient (Patient_ID integer not null primary key);
Table Visit (Visit_ID integer not null primary key,
Patient_ID integer not null,
constraint FK_Visit_Patient foreign key (Patient_ID) references 
Patient(Patient_ID) on update cascade on delete no action);

if Patient_ID 2 is effectively the same patient as Patient_ID 1 and I want to 
merge those two records, I have to do:
Update Visit set Patient_ID = 1 where Patient_ID = 1; --And the same on the 
dozen of dependant tables
Delete from Patient where Patient_ID=2;

If this could be done with one action (something like merge patient set 
patient_id=:NewValue where Patient_Id=:OldValue) it would save having to create 
a Stored Procedure to execute each updates on then foreign keys...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] New Feature ? Merge records referenced by FK

2014-04-28 Thread Evelyne Girard
I created an ticket in the tracker so others who would find this feature useful 
can vote for it and discuss this...
http://tracker.firebirdsql.org/browse/CORE-4408

Thank you.

 -Message d'origine-
 De : Alex 
 
 Sean, certainly it's possible to replace almost any of higher than
 plain select/insert/update/delete SQL operators  with some SP
 (including MERGE itself). Certainly as a replacement of missing
 operators it's a solution. But somewhy people like to have things like
 group by, window functions, merge, etc. built-in. A case described here
 seems to realistic and widely used in development. I.e. I would like to
 say yes, it's good suggestion.
 


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] New Feature ? Merge records referenced by FK

2014-04-28 Thread Adriano dos Santos Fernandes
On 28/04/2014 12:57, Evelyne Girard wrote:
 I created an ticket in the tracker so others who would find this feature 
 useful can vote for it and discuss this...
 http://tracker.firebirdsql.org/browse/CORE-4408


If I understood this, why you didn't use cascade foreign keys on the
base tables and update them before the merge?


Adriano


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Carlos H. Cantu
DY Thanks, but I seemed to explicitly state that plain wishlists don't
DY count.

It seems that I also didn't understand that you wanted separated
messages for each feature discussion :(

[]s
Carlos
http://www.firebirdnews.org
FireBase - http://www.FireBase.com.br


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Odp: Planning the post v3 development

2014-04-28 Thread liviusliv...@poczta.onet.pl
Hi,

If i can say my proposition. Then my favourite is transaction id as int64. Many 
times i must spend weeks to to overcome this limit in projects. Ok, then this 
projects are better and faster but cost is also bigger and bigger...

When i think about web develooment i also have problem with this limit

Regards,
Karol Bieniaszewski

- Reply message -
Od: Dalton Calford dalton.calf...@gmail.com
Do: For discussion among Firebird Developers 
firebird-devel@lists.sourceforge.net
Temat: [Firebird-devel] Planning the post v3 development
Data: pon., kwi 28, 2014 17:48
I will begin with the list of items I would like to see implemented.
Object Names of at least 64 bytes -                        Core 749Schemas plus 
associated objects (synonyms etc) - Core 738
Firebird native for Android  -                                   Core 
3885Scheduler for Firebird -                                           Core 
1613Database Links -                                                    Core 776

The first two items are so obvious, I can not think of anyone who would argue 
against them.   I will defend those items, but won't in this particular 
email.Android and iOS native clients if not native servers, are extremely 
important given the market growth in those areas and the lack of a good solid 
database engine to work with.   
A scheduler for firebird would totally eliminate my own use of custom 
applications tied to database events/time events.   I am sure that I am not the 
only person who has had to develop around the lack of a scheduler/event handler 
in firebird that runs in its own transaction/user space.
Database links, which would require the Object names and schema support, would 
allow for developers to implement many features manually that are now in the 
wish list catagory.   For example, you could put each schema into a remote 
server/database, allowing for basic clustering (before you jump on me, I know 
it is more complex than that, I have implemented alot of this via other code).  
 You could easily develop your own replication systems.    One feature change, 
could be used to implement so many other requested features as well as 
providing a tool so that developers/users could come up with new ways of using 
firebird that are not even imagined now. 

best regards
Dalton



On 28 April 2014 10:50, Dmitry Yemanov firebi...@yandex.ru wrote:

28.04.2014 16:14, Simonov Denis wrote:



 My list is as follows.



Thanks, but I seemed to explicitly state that plain wishlists don't

count. Choose top five from your list, start separate thread per feature

and argue why we should prefer these features over other ones.





Dmitry





--

Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE

Instantly run your Selenium tests across 300+ browser/OS combos.  Get

unparalleled scalability from the best Selenium testing platform available.

Simple to use. Nothing to install. Get started now for free.

http://p.sf.net/sfu/SauceLabs

Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabsFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Dmitry Yemanov
28.04.2014 20:30, Carlos H. Cantu wrote:

 It seems that I also didn't understand that you wanted separated
 messages for each feature discussion :(

Well, we may start with the features intermixed inside this thread and 
then separate them for a more detailed discussion, if necessary.

I just ask everybody to provide arguments why you think your suggestions 
worth more attention than something else.


Dmitry


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] New Feature ? Merge records referenced by FK

2014-04-28 Thread Evelyne Girard
There are two situations where I do not find this convenient :
1) I have to copy Master table records to the destination database so I can 
compare values in all fields to decide if they must be merged at first (if I 
want to do this using SQL).
2) For many tables, I wish to let the user decide (after visual inspection) if 
they want to merge some records.  And this is not always after a database 
merge, it is more often simply the result of end-user error (they created 2 
records for the same thing and want to merge them).

What I did in situation #1 was that I transferred all (Master and Details 
records) and merged afterwise using a stored proc updating all FKs for complex 
tables.
In other situations, I made a program with connections to both databases to 
compare and transfer with the updated value ... otherwise the udpate would be 
too long

Stored Procedure updating all FKs do the job, it sure is more efficient than 
coding it for each table (Users ID are referenced by over 240 FKs through the 
de database), but there must be one flavor for each field type.  This is not as 
convenient as a cascade performed by the server would be ... especially if 
http://tracker.firebirdsql.org/browse/CORE-4348 (be able to determine if update 
was triggered by a cascade) is implemented (and I hope it will).

 -Message d'origine-
 
 If I understood this, why you didn't use cascade foreign keys on the
 base tables and update them before the merge?
 
 
 Adriano

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Dmitry Yemanov
28.04.2014 19:48, Dalton Calford wrote:

 Android and iOS native clients if not native servers, are extremely
 important given the market growth in those areas and the lack of a good
 solid database engine to work with.

Isn't sqlite solid enough? ;-) At least for the tasks a tablet can run.

 A scheduler for firebird would totally eliminate my own use of custom
 applications tied to database events/time events.

Architecturally, Firebird database is not active without user 
connections. This slightly changes with the LINGER support, but not so 
much. So the question is who should be waiting for the timer events when 
nobody is connected. And if it should be the server's (not the engine's) 
feature, then what to do with the embedded setup?

 Database links, which would require the Object names and schema support

I fail to see how they would require one or another. Or maybe I just see 
database links completely differently.

 For example, you could put each schema into a remote server/database

Your imagination surely takes a lead over mine. I've never thought of 
the database links this way. And I'm not really sure I want to.


Dmitry


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Dmitry Yemanov
28.04.2014 18:29, Carlos H. Cantu wrote:
 
 Here is my list:

Arrrgh! :-)

I've skipped the items I have nothing to say about (mostly due to lack 
of interest, sorry for fairness).

 2) I second Jesus Garcia request for native replication, since people at
 FDD and in FireBase's list are always claiming about the lack of such
 feature.

Replication is a too common word. What do they really need? Warm 
standby? Hot standby? Sync replication? Async replication? Multi-master? 
Maybe point-in-time recovery? Maybe FB-Oracle or vice versa?

 3) A way to schedule some tasks direct in FB, for example,
 running procures, sweeps, statistics recalcs, etc. at specific
 scheduled days/times. What would be accepted as a task could be
 limited to whatever you guys thinks that would be safe to implement:
 http://tracker.firebirdsql.org/browse/CORE-743

See my other post about this.

 4) A way to access data in external files/non-fb-databases . AFAIR,
 this was planned as an extension of currently execute statement

I don't remember promises for external files, although it might be 
doable. I'd rather settle on non-fb-databases for the time being.

It means we need someone with non-fb-database API knowledge to implement 
a plugin. Volunteers anyone? Or we may create some common (ODBC / JDBC / 
ADO.NET) plugins and don't care about the rest. But again, volunteers 
anyone?

 7) It is known that mixing DDL/DML in the same transaction can cause
 corruption in DBs. If this cannot be 100% fixed, I suggest to
 introduce some mechanism to detect such situation and avoid the
 execution of the statement before corruption happens.

Maybe my memory is failing, but I don't remember corruptions because of 
this reason. v1.0 and v1.5 don't count.

 8) Enhancement to the numerics calculations. The currently rule of
 summing the scale of the types involved in muls/divs is very bad and
 can easily cause overflow. Maybe FB could automatically truncate the
 result to the maximum precision possible to accommodate the final
 value. Even better if the truncation happens only in the final result
 (not during the internal calculations).

Blame me for delaying it again and again. But I don't agree with 
truncations, Mark is right that a longer precision is a better way to 
go. However, longer NUMERIC/DECIMAL data types and longer intermediate 
results during calculations are two different things, even if related.

Please create a ticket so that I can have it assigned.

 I suggest that if some of those features are impossible to be
 implemented, their existing tickets should be marked to Wont/Fix and
 the details of why be added to the comments.

Usually the problem is not implementation possibility but need and 
reasonableness.


Dmitry


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Dmitry Yemanov
28.04.2014 18:37, Scott Morgan wrote:

 This message is the invitation to both project members and users who
 closely follow the development.

 UTC time zone support. Vital for international work and handy even for
 general use.

Nice reminder, although I don't think it's trivial to implement.

 It doesn't look like v3 has it (are we sure v3 can't catch this before
 it freezes?).

I'm afraid it cannot.


Dmitry


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Dmitry Yemanov
28.04.2014 16:14, Simonov Denis wrote:

 optimizer
 1. Enable use MERGE / HASH JOIN for OUTER JOINs
 2. Performing EXISTS / IN SEMI JOIN as including using MERGE / HASH, and
 NESTED LOOP using index
 3. HASH aggregation Add to an existing method using sorting

I don't think the optimizer algorithms should become the planning goals. 
They evolve from version to version anyway. But your point is taken, thanks.

 4. Conditional INDEX ONLY SCAN as in Postgresql (dimitr said that it is
 possible to ODS 12)

Theoretically possible, but only in some rare cases. There are other 
issues preventing it from working (now).

 2. Add JAVA, .NET PROCEDURE and FUNCTION (not just C++)

You can do it in v3 as soon as someone writes the required interfacing 
plugins (external engines). Volunteers anyone?

 2. Standby can be based on nbackup
 http://tracker.firebirdsql.org/browse/CORE-2990

And it can be based on other solutions too. Why do you think this one is 
the best?


Dmitry


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Adriano dos Santos Fernandes
On 28/04/2014 15:30, Dmitry Yemanov wrote:
 2. Add JAVA, .NET PROCEDURE and FUNCTION (not just C++)
 You can do it in v3 as soon as someone writes the required interfacing 
 plugins (external engines). Volunteers anyone?

Java was done, but due to everything (Jaybird and Firebird APIs) being
changed, it's not a easy task to recreate it.

Also I have a big conceptual problem with character sets when running
C++ inside the database. Things are not good yet.


Adriano


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] [FB-Tracker] Created: (CORE-4409) Enhancement in precision of calculations with NUMERIC/DECIMAL

2014-04-28 Thread Carlos H. Cantu (JIRA)
Enhancement in precision of calculations with NUMERIC/DECIMAL
-

 Key: CORE-4409
 URL: http://tracker.firebirdsql.org/browse/CORE-4409
 Project: Firebird Core
  Issue Type: Improvement
  Components: Engine
Affects Versions: 3.0 Alpha 2, 3.0 Alpha 1, 2.5.2 Update 1, 2.1.5 Update 1, 
2.5.2, 2.1.5
 Environment: Dialetic 3 databases
Reporter: Carlos H. Cantu


The way Firebird deals with the precision of the results of calculations 
involving multiple arguments can easily cause overflows, specially in 
maths/divs, when the precision of the result is the sum of the precision of the 
arguments, what can easily extrapolate the actual limits of the currently 
numeric/decimal datatypes. Also, some care is needed in the intermediate 
calculations, to avoid loss of precision and overflows.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Carlos H. Cantu
 2) I second Jesus Garcia request for native replication, since people at
 FDD and in FireBase's list are always claiming about the lack of such
 feature.

DY Replication is a too common word. What do they really need? Warm 
DY standby? Hot standby? Sync replication? Async replication? Multi-master?
DY Maybe point-in-time recovery? Maybe FB-Oracle or vice versa?

I think most of them needs basic asynchronous replication, covering
single and multi-master scenarios. For those who needs more complex
scenarios, there are third party comercial tools. Anyway, I'm not the
right person to answer, since I didn't need replication in my projects
so far, so I'll leave this for Jesus or any others to answer. If you
are interested, I can run a poll at firebirdnews.org and firebase
about what users would expect in native FB replication.


 4) A way to access data in external files/non-fb-databases . AFAIR,
 this was planned as an extension of currently execute statement

DY I don't remember promises for external files, although it might be 
DY doable. I'd rather settle on non-fb-databases for the time being.
DY It means we need someone with non-fb-database API knowledge to implement
DY a plugin. Volunteers anyone? Or we may create some common (ODBC / JDBC /
DY ADO.NET) plugins and don't care about the rest. But again, volunteers 
DY anyone?

Afair, the idea was to use ODBC/JDBC as source. My chat about this was
with Vlad, long time ago. Probably he can give more details about what
he was thinking about.


 7) It is known that mixing DDL/DML in the same transaction can cause
 corruption in DBs. If this cannot be 100% fixed, I suggest to
 introduce some mechanism to detect such situation and avoid the
 execution of the statement before corruption happens.

DY Maybe my memory is failing, but I don't remember corruptions because of
DY this reason. v1.0 and v1.5 don't count.

I asked Alexey and seems that most of the previous problems are
fixed, but dropping tables with active connections still causes
corruption. Maybe he can give more details.


 8) Enhancement to the numerics calculations. The currently rule of
 summing the scale of the types involved in muls/divs is very bad and
 can easily cause overflow. Maybe FB could automatically truncate the
 result to the maximum precision possible to accommodate the final
 value. Even better if the truncation happens only in the final result
 (not during the internal calculations).

DY Blame me for delaying it again and again. But I don't agree with 
DY truncations, Mark is right that a longer precision is a better way to 
DY go. However, longer NUMERIC/DECIMAL data types and longer intermediate
DY results during calculations are two different things, even if related.
DY Please create a ticket so that I can have it assigned.

Done: http://tracker.firebirdsql.org/browse/CORE-4409

 I suggest that if some of those features are impossible to be
 implemented, their existing tickets should be marked to Wont/Fix and
 the details of why be added to the comments.

DY Usually the problem is not implementation possibility but need and 
DY reasonableness.

Whatever the reason is, if it will not be done, it should not be left
open.

[]s
Carlos
http://www.firebirdnews.org
FireBase - http://www.FireBase.com.br


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Carlos H. Cantu
This is another one that I missed in my first list:

Alter domain depedence problem when changing VAR(CHAR) size
http://tracker.firebirdsql.org/browse/CORE-1427

Existing comments speaks for itself.

[]s
Carlos H. Cantu
www.FireBase.com.br - www.firebirdnews.org
www.warmboot.com.br - blog.firebase.com.br


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Dalton Calford
Hi Dmitry,


On 28 April 2014 13:59, Dmitry Yemanov firebi...@yandex.ru wrote:

 Isn't sqlite solid enough? ;-) At least for the tasks a tablet can run.


Today's tablets blow away the server systems I used to run interbase on.
In some cases, they are more powerful than some realtime firebird servers
we have - don't question the power of cell phones and tablets, they will
amaze you.



  A scheduler for firebird would totally eliminate my own use of custom
  applications tied to database events/time events.



 Architecturally, Firebird database is not active without user
 connections. This slightly changes with the LINGER support, but not so
 much. So the question is who should be waiting for the timer events when
 nobody is connected. And if it should be the server's (not the engine's)
 feature, then what to do with the embedded setup?

 You should be able to define a database daemon/virtual user that runs as a
separate transaction space.   If defined and active, the database would
always be running.




  Database links, which would require the Object names and schema support

 I fail to see how they would require one or another. Or maybe I just see
 database links completely differently.


Well, picture schema that can contain schema ie
 database.schema_level1.schema_level2.schema_leveln.database_object.

In this case, you could attach the root of a remote database as a
branch/schema to the current database.




  For example, you could put each schema into a remote server/database

 Your imagination surely takes a lead over mine. I've never thought of
 the database links this way. And I'm not really sure I want to.


The key here is, don't limit the end user/developer, give the tools and let
them shoot themselves in the foot.

Firebird and Interbase before it, was all about the flexibility/power in an
easy to use package.   But, it always assumed that the users where
intelligent and capable, instead of trying to make the simplest system for
the lowest common denominator.

;)
--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabsFirebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Claudio Valderrama C.
 -Original Message-
 From: Carlos H. Cantu [mailto:lis...@warmboot.com.br] 
 Sent: Lunes, 28 de Abril de 2014 12:30
 
 DY Thanks, but I seemed to explicitly state that plain 
 wishlists don't
 DY count.
 
 It seems that I also didn't understand that you wanted separated
 messages for each feature discussion :(

Don't worry. If you go wrong, we will simply ask a volunteer to crucify you.
;-)

C.


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Claudio Valderrama C.
 -Original Message-
 From: Dmitry Yemanov [mailto:firebi...@yandex.ru] 
 Sent: Lunes, 28 de Abril de 2014 14:21
 
  7) It is known that mixing DDL/DML in the same transaction can cause
  corruption in DBs. If this cannot be 100% fixed, I suggest to
  introduce some mechanism to detect such situation and avoid the
  execution of the statement before corruption happens.
 
 Maybe my memory is failing, but I don't remember corruptions 
 because of 
 this reason. v1.0 and v1.5 don't count.

I know people will feel outraged with my opinion, but anyway: make DDL
operations atomic and immediate. Uncommitted DDL and DML working in unison
with stable DB structure is a naive dream, period.


  8) Enhancement to the numerics calculations. The currently rule of
  summing the scale of the types involved in muls/divs is very bad and
  can easily cause overflow. Maybe FB could automatically truncate the
  result to the maximum precision possible to accommodate the final
  value. Even better if the truncation happens only in the 
 final result
  (not during the internal calculations).
 
 Blame me for delaying it again and again. But I don't agree with 
 truncations, Mark is right that a longer precision is a better way to 
 go. However, longer NUMERIC/DECIMAL data types and longer 
 intermediate 
 results during calculations are two different things, even if related.

This is very important limitation, IMHO. SqlServer goes up to numeric(38,0),
for example. I'm not sure why longer data types and longer intermediate
results are very different things; probably my neurones are becoming rusty.
The only difference I see is that intermediate large results can be volatile
things inside the server code but can't be declared as proper data types
neither stored in the DB.

C.


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Claudio Valderrama C.
 -Original Message-
 From: Dalton Calford [mailto:dalton.calf...@gmail.com] 
 Sent: Lunes, 28 de Abril de 2014 11:49

 For example, you could put each schema into a remote 
 server/database, allowing for basic clustering (before you 
 jump on me, I know it is more complex than that, I have 
 implemented alot of this via other code).

Then you'll want to give your feature another name, not schema.
Schemas are logical partitions of a physical db, not physical scattering of
a db file(s) across different servers.

C.


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Dimitry Sibiryakov
28.04.2014 23:21, Claudio Valderrama C. wrote:
 I know people will feel outraged with my opinion, but anyway: make DDL
 operations atomic and immediate. Uncommitted DDL and DML working in unison
 with stable DB structure is a naive dream, period.

I may be wrong as often, but AFAIU this dream may be a reality if:

1) Eliminate DFW
2) Perform DDL (operations with system tables) in user transaction
3) Make garbage collector to handle system tables well

MVCC will do the rest automagically.

-- 
   WBR, SD.

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Thomas Beckmann
We are right now discussing this in our (new) company again. We
implemented replication mechanisms similar to ibreplicator (and probably
others) on our own, as probably did many people. Yes, having this kind
of feature build in would be a big help. Current application design
leads to more and more diverse platforms that still can not handle data
access online all the time - thus leading to what ever replication needs.

Main focus should be in asynchronous multi master scenarios, as Carlos
pointed out. Everything else seems to be as specialization...

Thomas

Am 28.04.2014 21:05, schrieb Carlos H. Cantu:
 2) I second Jesus Garcia request for native replication, since people at
 FDD and in FireBase's list are always claiming about the lack of such
 feature.
 
 DY Replication is a too common word. What do they really need? Warm 
 DY standby? Hot standby? Sync replication? Async replication? Multi-master?
 DY Maybe point-in-time recovery? Maybe FB-Oracle or vice versa?
 
 I think most of them needs basic asynchronous replication, covering
 single and multi-master scenarios. For those who needs more complex
 scenarios, there are third party comercial tools. Anyway, I'm not the
 right person to answer, since I didn't need replication in my projects
 so far, so I'll leave this for Jesus or any others to answer. If you
 are interested, I can run a poll at firebirdnews.org and firebase
 about what users would expect in native FB replication.

-- 
Mit freundlichen Grüßen,

Thomas Beckmann
Diplom-Informatiker


Wielandstraße 14c • 23558 Lübeck
Tel +49 (22 25) 91 34 - 545 • Fax +49 (22 25) 91 34 - 604
Mail thomas.beckm...@assfinet.de mailto:thomas.beckm...@assfinet.de

ASSFINET-Logo

*ASSFINET Dienstleistungs-GmbH*
Max-Planck-Straße 14 • 53501 Grafschaft bei Bonn
i...@assfinet.de mailto:i...@assfinet.de • www.assfinet.de
http://www.assfinet.de/

Geschäftsführer: Dipl. Wirtschaftsinformatiker Marc Rindermann
Registergericht Koblenz HRB 23331

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der
richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist
nicht gestattet.


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Claudio Valderrama C.
 -Original Message-
 From: Dimitry Sibiryakov [mailto:s...@ibphoenix.com] 
 Sent: Lunes, 28 de Abril de 2014 18:03
 
 28.04.2014 23:21, Claudio Valderrama C. wrote:
  I know people will feel outraged with my opinion, but 
 anyway: make DDL
  operations atomic and immediate. Uncommitted DDL and DML 
 working in unison
  with stable DB structure is a naive dream, period.
 
 I may be wrong as often, but AFAIU this dream may be a reality if:
 
 1) Eliminate DFW

I'm not sure eliminate would be the goal. I would say simplify that
egregious piece of code with its enigmatic levels.

 2) Perform DDL (operations with system tables) in user transaction

Are you referring to the server's internal code or isql, for example?

 3) Make garbage collector to handle system tables well

What problems do you see now? Old records not collected and disposed?
 
 MVCC will do the rest automagically.

C.


--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Alexandre Benson Smith
Em 28/4/2014 18:21, Claudio Valderrama C. escreveu:
 -Original Message-
 From: Carlos H. Cantu [mailto:lis...@warmboot.com.br]
 Sent: Lunes, 28 de Abril de 2014 12:30

 DY Thanks, but I seemed to explicitly state that plain
 wishlists don't
 DY count.

 It seems that I also didn't understand that you wanted separated
 messages for each feature discussion :(
 Don't worry. If you go wrong, we will simply ask a volunteer to crucify you.
 ;-)

 C.



I am pretty near and will do it with pleasure ! :)

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Planning the post v3 development

2014-04-28 Thread Adriano dos Santos Fernandes
On 28-04-2014 19:02, Dimitry Sibiryakov wrote:
 28.04.2014 23:21, Claudio Valderrama C. wrote:
 I know people will feel outraged with my opinion, but anyway: make DDL
 operations atomic and immediate. Uncommitted DDL and DML working in unison
 with stable DB structure is a naive dream, period.
 
 I may be wrong as often, but AFAIU this dream may be a reality if:
 
 1) Eliminate DFW
 2) Perform DDL (operations with system tables) in user transaction
 3) Make garbage collector to handle system tables well
 
 MVCC will do the rest automagically.
 

Not so simple.

With the current way that Firebird validate objects, not (or trying)
allowing invalid interdependencies after commit, you'll not be able to
do changes.

Auto-commit DDL requires object invalidation.


Adriano

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel