Update of /cvsroot/monetdb/sql/src/test/BugTracker-2009/Tests
In directory 
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23065/src/test/BugTracker-2009/Tests

Added Files:
        unique_constraint_on_char.SF-2873564.sql 
Log Message:
propagated changes of Wednesday Nov 11 2009 - Thursday Nov 12 2009
from the Nov2009 branch to the development trunk

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/11/11 - nielsnes:
          
src/test/BugTracker-2009/Tests/unique_constraint_on_char.SF-2873564.sql,1.1.2.1
  add test for unique_constraint on string
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


--- NEW FILE: unique_constraint_on_char.SF-2873564.sql ---
CREATE TABLE keytest (
date_added int NOT NULL,
hash_key char(32) NOT NULL,
dimension1 int NOT NULL,
dimension2 int NOT NULL,
metric1 int NOT NULL,
metric2 int NOT NULL,
CONSTRAINT key_test UNIQUE (hash_key,date_added)
);

insert into keytest (date_added, hash_key, dimension1, dimension2, metric1, 
metric2) VALUES (1, 'a', 1, 1, 2, 2);
insert into keytest (date_added, hash_key, dimension1, dimension2, metric1, 
metric2) VALUES (1, 'a', 1, 1, 2, 2);

select * from keytest;

CREATE UNIQUE INDEX unique_key_test ON test.keytest (date_added, hash_key);
insert into keytest (date_added, hash_key, dimension1, dimension2, metric1, 
metric2) VALUES (1, 'a', 1, 1, 2, 2);
insert into keytest (date_added, hash_key, dimension1, dimension2, metric1, 
metric2) VALUES (1, 'a', 1, 1, 2, 2);
select * from keytest;

drop table keytest;

CREATE TABLE keytest2 (
 date_added int NOT NULL,
 key int NOT NULL,
 dimension1 int NOT NULL,
 dimension2 int NOT NULL,
 metric1 int NOT NULL,
 metric2 int NOT NULL,
 CONSTRAINT key_test2 UNIQUE (key,date_added)
);

insert into keytest2 (date_added, key, dimension1, dimension2, metric1, 
metric2) VALUES (1, 1, 1, 1, 2, 2);
insert into keytest2 (date_added, key, dimension1, dimension2, metric1, 
metric2) VALUES (1, 1, 1, 1, 2, 2);
select * from keytest2;

drop table keytest2;


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to