Bad results of metadata changing from several sessions when AUTODDL is OFF
--------------------------------------------------------------------------

                 Key: CORE-3700
                 URL: http://tracker.firebirdsql.org/browse/CORE-3700
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 2.5.1
            Reporter: Pavel Zotov


I think that setting autoddl to `OFF` is very dangerous for database 
consistency, at least in current time.
If two or more developers update metadata and turn OFF autocommit that results 
can be strange or poor.
I think that much better to run any DDL in autonomous transactions (with the 
purpose not allow influence on `main` transaction results).

TEST #1.
-------------

SESSION #1
C:\1INSTALL\FIREBIRD\FB25>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'tt2.fdb'; commit;
SQL> connect tt2.fdb;
Database:  tt2.fdb
SQL> set autoddl off;
SQL> create collation ns_coll for utf8 from unicode case insensitive 
'NUMERIC-SORT=1';
SQL> commit;

SESSION #2
C:\1INSTALL\FIREBIRD\FB25>isql TT2.FDB
Database:  TT2.FDB
SQL> commit;
SQL> set autoddl off;
SQL> drop collation ns_coll;

SESSION #1
SQL> create table tns(s varchar(50) character set utf8 collate ns_coll); 
SQL> commit;
Statement failed, SQLSTATE = 42000
Implementation of text subtype 32260 not located.
SQL> select * from tns;
Statement failed, SQLSTATE = XX000
internal Firebird consistency check (missing pointer page in DPM_data_pages 
(243), file: dpm.cpp line: 703)


TEST #2
------------
SESSION #1
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'tt2.fdb'; commit;
SQL> create domain vcfio as varchar(50);
SQL> commit;
SQL> set autoddl off;

SESSION #2
C:\1INSTALL\FIREBIRD\FB25>isql TT2.FDB
Database: TT2.FDB
SQL> set autoddl off;
SQL> drop domain vcfio;

SESSION #1
SQL> create table tns(s01 vcfio);

SESSION #2
SQL> commit;

SESSION #1
SQL> commit; -- passed! we can save table with column of domain that already 
has been deleted!
SQL> select * from tns;

The last statement leads to pause about 4 seconds and than ISQL detaches from 
database without any messages. Also no messages in FIREBIRD.LOG.

-- 
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

        

------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to