From: <pc...@us...> - 2007-04-25 07:26:47
|
Revision: 161 http://svn.sourceforge.net/firebird/?rev=161&view=rev Author: pcisar Date: 2007-04-25 00:26:47 -0700 (Wed, 25 Apr 2007) Log Message: ----------- Directory for backup files, backup for CORE-1006 test Added Paths: ----------- qa/trunk/testsuite/fbk/ qa/trunk/testsuite/fbk/core1006.fbk Added: qa/trunk/testsuite/fbk/core1006.fbk =================================================================== (Binary files differ) Property changes on: qa/trunk/testsuite/fbk/core1006.fbk ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pc...@us...> - 2007-06-20 16:00:31
|
Revision: 270 http://svn.sourceforge.net/firebird/?rev=270&view=rev Author: pcisar Date: 2007-06-20 09:00:32 -0700 (Wed, 20 Jun 2007) Log Message: ----------- QA-35 - Test for CORE-1063 Added Paths: ----------- qa/trunk/testsuite/bugs.qms/core_1063.qmt qa/trunk/testsuite/fbk/core1063.fbk Property Changed: ---------------- qa/trunk/testsuite/ Property changes on: qa/trunk/testsuite ___________________________________________________________________ Name: svn:ignore + qmedit.bat qmtest.bat *.bak context-win-2-0 Added: qa/trunk/testsuite/bugs.qms/core_1063.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1063.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_1063.qmt 2007-06-20 16:00:32 UTC (rev 270) @@ -0,0 +1,94 @@ +<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Restore From Backup</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>NAME +=============================================================================== +.menu +awards.htm +affiliate_program.htm +user_guide.htm +forms/feedback.htm +faq.htm +products.htm +zonetick_v2.7_plan.htm +fxstreet.htm +confirmed.htm +index.htm +mail/confirm +launch.htm +.menu +forms/why_uninstall.htm +modification_guidelines.htm +forms/feature_request.htm +addition_minneapolis.htm +cities.htm +index.htm + +NAME +=============================================================================== +index.meta +index.htm +database_format_discussion.htm +.menu +profiles.htm +modification_guidelines.htm +update.htm +oem.htm +content_providers.htm +addition_hamburg.htm +forms/confirm.htm +packs.htm +zonetick_v2.7_released.htm +quotes.htm +skins.htm +feedback.htm +addition_phoenix.htm +zonetick_v3.0_plan.htm +wrtimetracker_v0.4_released.htm +zonetick_v2.7_beta.htm + +NAME +=============================================================================== +jobs.htm +contact.htm +wrtimetracker/faq.htm +wrtimetracker/user_manual.htm +addition_salt_lake_city.htm +wrtimetracker/index.htm +wrtimetracker/license.htm +addition_singapore.htm +addition_lipetsk.htm +addition_miami.htm +addition_miami.htm +.menu_zonetick + +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text>core1063.fbk </text></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.0.1</text></argument><argument name="description"><text/></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1063</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>alter table cms_wiki +add u_name varchar(100) character set UTF8, +add u_title varchar(100) character set UTF8, +add u_description blob sub_type 1 character set UTF8, +add u_text blob sub_type 1 character set UTF8; + +commit; + +update cms_wiki set +u_name = name, u_title = title, u_text = text, u_description = description; + +commit; + +drop index uq_cms_wiki; + +alter table cms_wiki drop name, drop description, drop text, drop title; + +commit; + +alter table cms_wiki +alter u_name to name, +alter u_title to title, +alter u_description to description, +alter u_text to text; + +commit; + +CREATE UNIQUE INDEX UQ_CMS_WIKI ON CMS_WIKI (NAME, SITE_ID); + +commit; + +select name from CMS_WIKI; +</text></argument><argument name="test_id"><text>core_1063</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Server hangs eating CPU and performs huge I/O copying different codepage fields</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/fbk/core1063.fbk =================================================================== (Binary files differ) Property changes on: qa/trunk/testsuite/fbk/core1063.fbk ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mak...@us...> - 2007-07-02 14:45:45
|
Revision: 306 http://svn.sourceforge.net/firebird/?rev=306&view=rev Author: makowski Date: 2007-07-02 07:45:44 -0700 (Mon, 02 Jul 2007) Log Message: ----------- testsuite/bugs.qms/core_1009.qmt testsuite/bugs.qms/core_1162.qmt testsuite/bugs.qms/core_1329.qmt testsuite/bugs.qms/core_426.qmt testsuite/bugs.qms/core_86.qmt testsuite/bugs.qms/core_932.qmt testsuite/fbk/core1009.fbk testsuite/fbk/core86.fbk Added Paths: ----------- qa/trunk/testsuite/bugs.qms/core_1009.qmt qa/trunk/testsuite/bugs.qms/core_1162.qmt qa/trunk/testsuite/bugs.qms/core_1329.qmt qa/trunk/testsuite/bugs.qms/core_426.qmt qa/trunk/testsuite/bugs.qms/core_86.qmt qa/trunk/testsuite/bugs.qms/core_932.qmt qa/trunk/testsuite/fbk/core1009.fbk qa/trunk/testsuite/fbk/core86.fbk Added: qa/trunk/testsuite/bugs.qms/core_1009.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1009.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_1009.qmt 2007-07-02 14:45:44 UTC (rev 306) @@ -0,0 +1,10 @@ +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Restore From Backup</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>RDB$FIELD_NAME RDB$BASE_FIELD +=============================================================================== =============================================================================== +ID ID +EXPR <null> + +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>makowski</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text>core1009.fbk</text></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text>RDB$BASE_FIELD for expression have to be NULL</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1009</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>select rdb$field_name, rdb$base_field from rdb$relation_fields where rdb$relation_name = 'TEST_VIEW';</text></argument><argument name="test_id"><text>core-1009</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Restoring RDB$BASE_FIELD for expression</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/bugs.qms/core_1162.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1162.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_1162.qmt 2007-07-02 14:45:44 UTC (rev 306) @@ -0,0 +1,34 @@ +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>A +======= + 99.99 + +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>makowski</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text>Statement failed, SQLCODE = -607 +unsuccessful metadata update +-New scale specified for column A must be at most 2. +</text></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text>create table tab ( a numeric(4,2) ); + +insert into tab values (99.99); + +select * from tab; + +A +======= + 99.99 + +alter table tab alter a type numeric(4,3); + +select * from tab; + +Statement failed, SQLCODE = -802 +arithmetic exception, numeric overflow, or string truncation + +Btw. the database is not "corrupted" too badly - you can revert the change back by alter table tab alter a type numeric(4,2); +and the engine is clever enough to convert data from stored format to requested one directly, not through all intermediate format versions.</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1162</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>create table tab ( a numeric(4,2) ); +insert into tab values (99.99); +alter table tab alter a type numeric(4,3); +select * from tab; +</text></argument><argument name="test_id"><text>core-1162</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Problem altering numeric field type</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/bugs.qms/core_1329.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1329.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_1329.qmt 2007-07-02 14:45:44 UTC (rev 306) @@ -0,0 +1,17 @@ +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text/></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>makowski</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.0.1</text></argument><argument name="description"><text>Bug with size of alias name in a table (but still minor that 31 characters) +</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1329</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>CREATE TABLE BIG_TABLE_1234567890123 (COD INTEGER NOT NULL PRIMARY KEY); +COMMIT; +SELECT +BIG_TABLE_1234567890123.COD +FROM +BIG_TABLE_1234567890123 +JOIN (SELECT + BIG_TABLE_1234567890123.COD + FROM + BIG_TABLE_1234567890123) BIG_TABLE_1234567890123_ ON +BIG_TABLE_1234567890123.COD = BIG_TABLE_1234567890123_.COD; +</text></argument><argument name="test_id"><text>core-1329</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>size of alias name in a table</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/bugs.qms/core_426.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_426.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_426.qmt 2007-07-02 14:45:44 UTC (rev 306) @@ -0,0 +1,119 @@ +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>ae +ao +be +bo +ce +cha +cho +co +de +do +ee +eo +fe +fe +fo +go +he +ho +ie +io +je +jo +ke +ko +le +lle +llo +lo +me +mo +ne +no +oe +oo +pe +po +qe +qo +re +ro +se +so +te +to +ue +uo +ve +vo +xe +xo +ye +yo +ze +zo + +</text></argument><argument name="character_set"><enumeral>ISO8859_1</enumeral></argument><argument name="author"><text>makowski</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text>Check if sort order for collate ES_ES is the one of DRAE , the oficial organization for standarization of spanish +</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text>CORE-426</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text>SET NAMES ISO8859_1; +CREATE TABLE TAB (A CHAR(3) CHARACTER SET ISO8859_1); +COMMIT; +INSERT INTO TAB VALUES ('zo'); +INSERT INTO TAB VALUES ('ze'); +INSERT INTO TAB VALUES ('yo'); +INSERT INTO TAB VALUES ('ye'); +INSERT INTO TAB VALUES ('xo'); +INSERT INTO TAB VALUES ('xe'); +INSERT INTO TAB VALUES ('vo'); +INSERT INTO TAB VALUES ('ve'); +INSERT INTO TAB VALUES ('uo'); +INSERT INTO TAB VALUES ('ue'); +INSERT INTO TAB VALUES ('to'); +INSERT INTO TAB VALUES ('te'); +INSERT INTO TAB VALUES ('so'); +INSERT INTO TAB VALUES ('se'); +INSERT INTO TAB VALUES ('ro'); +INSERT INTO TAB VALUES ('re'); +INSERT INTO TAB VALUES ('qo'); +INSERT INTO TAB VALUES ('qe'); +INSERT INTO TAB VALUES ('po'); +INSERT INTO TAB VALUES ('pe'); +INSERT INTO TAB VALUES ('oo'); +INSERT INTO TAB VALUES ('oe'); +INSERT INTO TAB VALUES ('no'); +INSERT INTO TAB VALUES ('ne'); +INSERT INTO TAB VALUES ('mo'); +INSERT INTO TAB VALUES ('me'); +INSERT INTO TAB VALUES ('llo'); +INSERT INTO TAB VALUES ('lle'); +INSERT INTO TAB VALUES ('lo'); +INSERT INTO TAB VALUES ('le'); +INSERT INTO TAB VALUES ('ko'); +INSERT INTO TAB VALUES ('ke'); +INSERT INTO TAB VALUES ('jo'); +INSERT INTO TAB VALUES ('je'); +INSERT INTO TAB VALUES ('io'); +INSERT INTO TAB VALUES ('ie'); +INSERT INTO TAB VALUES ('ho'); +INSERT INTO TAB VALUES ('he'); +INSERT INTO TAB VALUES ('go'); +INSERT INTO TAB VALUES ('fe'); +INSERT INTO TAB VALUES ('fo'); +INSERT INTO TAB VALUES ('fe'); +INSERT INTO TAB VALUES ('eo'); +INSERT INTO TAB VALUES ('ee'); +INSERT INTO TAB VALUES ('do'); +INSERT INTO TAB VALUES ('de'); +INSERT INTO TAB VALUES ('cho'); +INSERT INTO TAB VALUES ('cha'); +INSERT INTO TAB VALUES ('co'); +INSERT INTO TAB VALUES ('ce'); +INSERT INTO TAB VALUES ('bo'); +INSERT INTO TAB VALUES ('be'); +INSERT INTO TAB VALUES ('ao'); +INSERT INTO TAB VALUES ('ae');</text></argument><argument name="source_code"><text>SET HEADING OFF; +SELECT A FROM TAB ORDER BY A COLLATE ES_ES; +</text></argument><argument name="test_id"><text>core-426</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Wrong sort order when using es_ES collate</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/bugs.qms/core_86.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_86.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_86.qmt 2007-07-02 14:45:44 UTC (rev 306) @@ -0,0 +1,16 @@ +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Restore From Backup</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>ID_YLK PH HPBH CD JLDW JZDW CK HW SH +============ ==================== ============ ==================== ====== ====== ================ ============ ===================== + 110 0021 492 MG JIAN DUN 8K 1.8 1.81000 + +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>makowski</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text>core86.fbk</text></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text>Can not fetch the data when Index is use</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-86</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>Select * from YLK A where PH = '0021' +and HPBH = '492' +and CD = 'MG' +and JLDW = 'JIAN' +and JZDW = 'DUN' +and CK = '8K' +and HW = '1.8' +and SH='1.81'; </text></argument><argument name="test_id"><text>core-86</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Index bug</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/bugs.qms/core_932.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_932.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_932.qmt 2007-07-02 14:45:44 UTC (rev 306) @@ -0,0 +1,19 @@ +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>Owner: SYSDBA +PAGE_SIZE 4096 +Number of DB pages allocated = 164 +Sweep interval = 20000 +Forced Writes are ON +Transaction - oldest = 1 +Transaction - oldest active = 2 +Transaction - oldest snapshot = 2 +Transaction - Next = 5 +ODS = 11.1 +Default Character set: NONE +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>makowski</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text>Accept comment in Create database</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text>CORE-932</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>commit; +create database /* waw */ '$(DATABASE_LOCATION)trucks'; +show database; +drop database;</text></argument><argument name="test_id"><text>core-932</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Comment in create database</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/fbk/core1009.fbk =================================================================== (Binary files differ) Property changes on: qa/trunk/testsuite/fbk/core1009.fbk ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: qa/trunk/testsuite/fbk/core86.fbk =================================================================== (Binary files differ) Property changes on: qa/trunk/testsuite/fbk/core86.fbk ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pc...@us...> - 2007-07-07 19:11:18
|
Revision: 322 http://svn.sourceforge.net/firebird/?rev=322&view=rev Author: pcisar Date: 2007-07-07 12:11:18 -0700 (Sat, 07 Jul 2007) Log Message: ----------- QA-47 - Test for CORE-1153 Added Paths: ----------- qa/trunk/testsuite/bugs.qms/core_1153.qmt qa/trunk/testsuite/fbk/core1153.fbk Added: qa/trunk/testsuite/bugs.qms/core_1153.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1153.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_1153.qmt 2007-07-07 19:11:18 UTC (rev 322) @@ -0,0 +1,44 @@ +<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Restore From Backup</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>PLAN SORT (JOIN (MM NATURAL, DD NATURAL)) + +MID DID +======================================== ======================================== +AAA Aaa AAA +AAA Aaa Aaa Aaa +AAA Aaa aaa +AAA Bbb AAA +AAA Bbb aaa +Bbb Aaa BBB +Bbb Bbb BBB +DDD Ddd <null> + +PLAN SORT (JOIN (MM NATURAL, DD NATURAL)) + +MID DID +======================================== ======================================== +AAA Aaa AAA +AAA Aaa Aaa Aaa +AAA Aaa aaa +AAA Bbb AAA +AAA Bbb aaa +Bbb Aaa BBB +Bbb Bbb BBB +DDD Ddd <null> + +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text>core1153.fbk</text></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text/></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1153</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>bug.fdb</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>SET PLAN ON; + +ALTER INDEX D_IDX1 INACTIVE; + +select distinct mm.ID as MID, dd.ID as DID +from m mm +left outer join d dd + on upper(mm.id) starting upper(dd.id) +order by mm.id ; + +ALTER INDEX D_IDX1 ACTIVE; + +select distinct mm.ID as MID, dd.ID as DID +from m mm +left outer join d dd + on upper(mm.id) starting upper(dd.id) +order by mm.id ; +</text></argument><argument name="test_id"><text>core_1153</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Activating index change "STARTING" working as "LIKE" in join condition</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/fbk/core1153.fbk =================================================================== (Binary files differ) Property changes on: qa/trunk/testsuite/fbk/core1153.fbk ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pc...@us...> - 2007-07-10 11:41:34
|
Revision: 327 http://svn.sourceforge.net/firebird/?rev=327&view=rev Author: pcisar Date: 2007-07-10 04:41:35 -0700 (Tue, 10 Jul 2007) Log Message: ----------- QA-47 - Test for CORE-1153 Changed database initialization from backup restore to initialization from SQL script. Modified Paths: -------------- qa/trunk/testsuite/bugs.qms/core_1153.qmt Removed Paths: ------------- qa/trunk/testsuite/fbk/core1153.fbk Modified: qa/trunk/testsuite/bugs.qms/core_1153.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1153.qmt 2007-07-09 11:39:32 UTC (rev 326) +++ qa/trunk/testsuite/bugs.qms/core_1153.qmt 2007-07-10 11:41:35 UTC (rev 327) @@ -1,4 +1,4 @@ -<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Restore From Backup</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>PLAN SORT (JOIN (MM NATURAL, DD NATURAL)) +<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>PLAN SORT (JOIN (MM NATURAL, DD NATURAL)) MID DID ======================================== ======================================== @@ -24,8 +24,39 @@ Bbb Bbb BBB DDD Ddd <null> -</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text>core1153.fbk</text></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text/></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1153</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>bug.fdb</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>SET PLAN ON; +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text/></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text>CORE-1153</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>bug.fdb</text></argument><argument name="isql_script"><text>CREATE TABLE D ( + ID VARCHAR(40) +); + +CREATE TABLE M ( + ID VARCHAR(40) +); + + +INSERT INTO D (ID) VALUES ('AAA'); +INSERT INTO D (ID) VALUES ('aaa'); +INSERT INTO D (ID) VALUES ('Aaa Aaa'); +INSERT INTO D (ID) VALUES ('BBB'); +INSERT INTO D (ID) VALUES ('BBB'); +INSERT INTO D (ID) VALUES ('CCC'); + +COMMIT WORK; + +INSERT INTO M (ID) VALUES ('AAA Aaa'); +INSERT INTO M (ID) VALUES ('AAA Bbb'); +INSERT INTO M (ID) VALUES ('DDD Ddd'); +INSERT INTO M (ID) VALUES ('Bbb Aaa'); +INSERT INTO M (ID) VALUES ('Bbb Bbb'); + +COMMIT WORK; + +CREATE INDEX D_IDX1 ON D COMPUTED BY (upper(id)); +CREATE INDEX M_IDX1 ON M COMPUTED BY (UPPER(ID)); + +COMMIT WORK; +</text></argument><argument name="source_code"><text>SET PLAN ON; + ALTER INDEX D_IDX1 INACTIVE; select distinct mm.ID as MID, dd.ID as DID Deleted: qa/trunk/testsuite/fbk/core1153.fbk =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pc...@us...> - 2007-07-23 15:36:26
|
Revision: 341 http://svn.sourceforge.net/firebird/?rev=341&view=rev Author: pcisar Date: 2007-07-23 08:36:26 -0700 (Mon, 23 Jul 2007) Log Message: ----------- QA-54 - Test for CORE-870 Modified Paths: -------------- qa/trunk/testsuite/README.context Added Paths: ----------- qa/trunk/testsuite/bugs.qms/core_870.qmt qa/trunk/testsuite/fdb/ qa/trunk/testsuite/fdb/core870.fdb Modified: qa/trunk/testsuite/README.context =================================================================== --- qa/trunk/testsuite/README.context 2007-07-18 21:02:27 UTC (rev 340) +++ qa/trunk/testsuite/README.context 2007-07-23 15:36:26 UTC (rev 341) @@ -3,6 +3,7 @@ * temp_directory : Directory for temporary files * server_location : Hostname where Firebird is located (empty for local protocol access, hotname: for TCP/IP access) * database_location : Directory where test databases are created + * suite_database_location : Path to database files. These files are part of the Test repository (subdirectory 'fdb') * backup_location : Path to database backup files. These files are part of the Test repository (subdirectory 'fbk') * isc4_path : Path to security database, including filename * user_name : Firebird user used by tests to connect/create database @@ -20,6 +21,7 @@ temp_directory=/var/tmp/ server_location=localhost: database_location=/var/tmp/ +suite_database_location=/home/testsuite/fdb/ backup_location=/home/testsuite/fbk/ isc4_path=/opt/firebird/security2.fdb user_name=SYSDBA Added: qa/trunk/testsuite/bugs.qms/core_870.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_870.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_870.qmt 2007-07-23 15:36:26 UTC (rev 341) @@ -0,0 +1,15 @@ +<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3b/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3b/-//qm/2.3b/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Connect To Existing</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>Starting backup... +gbak finished... +Delete backup file... +Backup file deleted. +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text/></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-870</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>core870.fdb</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>import os + +print 'Starting backup...' +fbk = os.path.join(context['temp_directory'],'backup.fbk') +runProgram('gbak',['-b','-user',user_name,'-password',user_password,dsn,fbk]) +print 'gbak finished...' +if os.path.isfile(fbk): + print 'Delete backup file...' + os.remove(fbk) + print 'Backup file deleted.' +</text></argument><argument name="test_id"><text>core_870</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>Python: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Engine crashes while trying to backup a logically corrupt db</text></argument><argument name="drop_db"><enumeral>false</enumeral></argument><argument name="db_path_property"><text>suite_database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/fdb/core870.fdb =================================================================== (Binary files differ) Property changes on: qa/trunk/testsuite/fdb/core870.fdb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pc...@us...> - 2007-07-26 11:30:20
|
Revision: 354 http://firebird.svn.sourceforge.net/firebird/?rev=354&view=rev Author: pcisar Date: 2007-07-26 04:30:21 -0700 (Thu, 26 Jul 2007) Log Message: ----------- QA-142 - Test for CORE-1291 Added Paths: ----------- qa/trunk/testsuite/bugs.qms/core_1291.qmt qa/trunk/testsuite/files/ qa/trunk/testsuite/files/core_1291.sql Added: qa/trunk/testsuite/bugs.qms/core_1291.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1291.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_1291.qmt 2007-07-26 11:30:21 UTC (rev 354) @@ -0,0 +1,229 @@ +<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3b/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3b/-//qm/2.3b/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>None</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>Procedure text: +============================================================================= +DECLARE VARIABLE NDSDiv DOUBLE PRECISION; +DECLARE VARIABLE ID_ExportFieldDoc Integer; +begin + SELECT Val FROM TBL_Const_Float + WHERE Name='NDSDiv' + INTO :NDSDiv; + FOR SELECT id_exportfielddoc, accountcredit, accountdebit FROM tbl_exportentry + WHERE id_exportgroupentry=:id_group + INTO :id_exportfielddoc, :accountcredit, :accountdebit + DO BEGIN + IF ((AccountCredit<>0) or (AccountDebit<>0)) THEN BEGIN + IF (id_exportfielddoc=110) THEN BEGIN + SELECT SUM(A.PriceRub*B.Volume/A.PointMul), SUM(A.PriceDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=111) THEN BEGIN + SELECT SUM(A.PriceCalcRub*B.Volume/A.PointMul), SUM(A.PriceCalcDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=112) THEN BEGIN + SELECT SUM(A.SummDoc), SUM(A.SummDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D + WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and + d.id_indoc=c.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=113) THEN BEGIN + SELECT SUM(A.NDS*A.PriceRub*B.Volume/(A.PointMul*100)), SUM(A.NDS*A.PriceDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=114) THEN BEGIN + SELECT SUM(A.NDS*A.PriceCalcRub*B.Volume/(A.PointMul*100)), SUM(A.NDS*A.PriceCalcDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=115) THEN BEGIN + SELECT SUM(A.SummNDSDoc), SUM(A.SummNDSDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D + WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and + d.id_indoc=c.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=116) THEN BEGIN + SELECT SUM((A.PriceRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM((A.PriceDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=117) THEN BEGIN + SELECT SUM((A.PriceCalcRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM((A.PriceCalcDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=118) THEN BEGIN + SELECT SUM(A.SummWithNDSDoc), SUM(A.SummWithNDSDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D + WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and + d.id_indoc=c.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=119) THEN BEGIN + SELECT SUM((A.PriceCalcRub-A.PriceRub)*B.Volume/A.PointMul), SUM((A.PriceCalcDoc-A.PriceDoc)*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=120) THEN BEGIN + SELECT SUM(B.SummDoc-(A.PriceRub*B.Volume/A.PointMul)), SUM(B.SummDoc-(A.PriceDoc*B.Volume/A.PointMul)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=121) THEN BEGIN + SELECT SUM(A.NDS*(A.PriceCalcRub-A.PriceRub)*B.Volume/(A.PointMul*100)), SUM(A.NDS*(A.PriceCalcDoc-A.PriceDoc)*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=122) THEN BEGIN + SELECT SUM(B.SummNDSDoc-A.NDS*A.PriceRub*B.Volume/(A.PointMul*100)), SUM(B.SummNDSDoc-A.NDS*A.PriceDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=123) THEN BEGIN + SELECT SUM(((A.PriceCalcRub-A.PriceRub)*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM(((A.PriceCalcDoc-A.PriceDoc)*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=124) THEN BEGIN + SELECT SUM(B.SummWithNDSDoc-(A.PriceRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM(B.SummWithNDSDoc-(A.PriceDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + + IF (id_exportfielddoc=125) THEN BEGIN + SELECT SUM(A.PriceRub*B.Volume/A.PointMul), SUM(A.PriceDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds=0 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=126) THEN BEGIN + SELECT SUM(A.PriceCalcRub*B.Volume/A.PointMul), SUM(A.PriceCalcDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds=0 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=127) THEN BEGIN + SELECT SUM(A.SummDoc), SUM(A.SummDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D + WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and + d.id_indoc=c.id_indoc and d.doctype = 6 and a.nds=0 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=128) THEN BEGIN + SELECT SUM((A.PriceCalcRub-A.PriceRub)*B.Volume/A.PointMul), SUM((A.PriceCalcDoc-A.PriceDoc)*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds=0 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=129) THEN BEGIN + SELECT SUM(B.SummDoc-(A.PriceRub*B.Volume/A.PointMul)), SUM(B.SummDoc-(A.PriceDoc*B.Volume/A.PointMul)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds=0 + INTO :summrus, :summdoc; + END + IF ((id_exportfielddoc>129)and(id_exportfielddoc<145)) THEN BEGIN + execute procedure prc_expsumm_8_10 ( id_exportfielddoc, id_outdoc, NDSDiv ) returning_values( summrus, summdoc ); + END + IF ((id_exportfielddoc>144)and(id_exportfielddoc<160)) THEN BEGIN + execute procedure prc_expsumm_8_20 ( id_exportfielddoc, id_outdoc, NDSDiv ) returning_values( summrus, summdoc ); + END + IF ((SummRus>0) or (SummDoc>0)) THEN SUSPEND; + END + END +END +============================================================================= +Parameters: +ID_INDOC INPUT INTEGER +ID_OUTDOC INPUT INTEGER +ID_GROUP INPUT INTEGER +ACCOUNTCREDIT OUTPUT INTEGER +ACCOUNTDEBIT OUTPUT INTEGER +SUMMRUS OUTPUT DOUBLE PRECISION +SUMMDOC OUTPUT DOUBLE PRECISION +</text></argument><argument name="character_set"><enumeral>WIN1251</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>8192</enumeral></argument><argument name="substitutions"><set><tuple><text>Use CONNECT or CREATE DATABASE to specify a database</text><text/></tuple><tuple><text>SQL> </text><text/></tuple><tuple><text>CON> </text><text/></tuple></set></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text/></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1291</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>bug.fdb</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>import os + +script = """SET SQL DIALECT 3; + +SET NAMES WIN1251; + +CREATE DATABASE '%s' +DEFAULT CHARACTER SET WIN1251; +""" % dsn + +scriptfile = open(os.path.join(context['files_location'],'core_1291.sql'),'r') +script = script + ''.join(scriptfile) +scriptfile.close() + +runProgram('isql',['-user',user_name,'-pas',user_password],script) +</text></argument><argument name="test_id"><text>core_1291</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>Python: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Can't transliterate character set when look at procedure text in database just created from script (and thus in ODS 11.1)</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/files/core_1291.sql =================================================================== --- qa/trunk/testsuite/files/core_1291.sql (rev 0) +++ qa/trunk/testsuite/files/core_1291.sql 2007-07-26 11:30:21 UTC (rev 354) @@ -0,0 +1,640 @@ +CREATE DOMAIN DMN_BOOL AS +SMALLINT +DEFAULT 0; + +CREATE DOMAIN DMN_PRICE AS +DOUBLE PRECISION +DEFAULT 0 +CHECK (Value >= 0); + +CREATE DOMAIN DMN_DOCNAME AS +VARCHAR(20) CHARACTER SET WIN1251; + +CREATE TABLE TBL_CONST_FLOAT ( + NAME VARCHAR(20) CHARACTER SET WIN1251 NOT NULL, + VAL DOUBLE PRECISION, + COMMENT VARCHAR(128) CHARACTER SET WIN1251 +); + +CREATE TABLE TBL_EXPORTENTRY ( + ID_EXPORTGROUPENTRY INTEGER NOT NULL, + ID_EXPORTFIELDDOC INTEGER NOT NULL, + ACCOUNTCREDIT INTEGER DEFAULT 0 NOT NULL, + ACCOUNTDEBIT INTEGER DEFAULT 0 NOT NULL +); + +CREATE TABLE TBL_INDOC_TEMP ( + ID_INDOC_TEMP INTEGER NOT NULL, + ID_POINT INTEGER NOT NULL, + ID_ITEM INTEGER NOT NULL, + ID_INDOC INTEGER NOT NULL, + SERNO VARCHAR(20) CHARACTER SET WIN1251, + POINTMUL DOUBLE PRECISION NOT NULL, + VOLUME DMN_PRICE NOT NULL /* DMN_PRICE = DOUBLE PRECISION DEFAULT 0 CHECK (Value >= 0) */, + PRICEDOC DMN_PRICE /* DMN_PRICE = DOUBLE PRECISION DEFAULT 0 CHECK (Value >= 0) */, + PRICERUB DMN_PRICE /* DMN_PRICE = DOUBLE PRECISION DEFAULT 0 CHECK (Value >= 0) */, + PRICECUR DMN_PRICE /* DMN_PRICE = DOUBLE PRECISION DEFAULT 0 CHECK (Value >= 0) */, + PRICECALCDOC DMN_PRICE NOT NULL /* DMN_PRICE = DOUBLE PRECISION DEFAULT 0 CHECK (Value >= 0) */, + PRICECALCRUB DMN_PRICE NOT NULL /* DMN_PRICE = DOUBLE PRECISION DEFAULT 0 CHECK (Value >= 0) */, + PRICECALCCUR DMN_PRICE NOT NULL /* DMN_PRICE = DOUBLE PRECISION DEFAULT 0 CHECK (Value >= 0) */, + NDS DMN_PRICE /* DMN_PRICE = DOUBLE PRECISION DEFAULT 0 CHECK (Value >= 0) */, + F_CANSALE DMN_BOOL NOT NULL /* DMN_BOOL = SMALLINT DEFAULT 0 */, + PASPORT VARCHAR(64) CHARACTER SET WIN1251, + PASPORTCREATEDATE TIMESTAMP, + PASPORTEXPIREDATE TIMESTAMP, + REGISTRATION VARCHAR(64) CHARACTER SET WIN1251, + PROTOCOL VARCHAR(64) CHARACTER SET WIN1251, + SERTIFICAT VARCHAR(128) CHARACTER SET WIN1251, + ID_CERTCENTER INTEGER DEFAULT 0, + ITEMCREATEDATE TIMESTAMP, + ITEMEXPIREDATE TIMESTAMP, + ID_PARENT_OUTDOC_TEMP INTEGER DEFAULT 0, + SUMMDOC COMPUTED BY (Volume*PriceDoc), + SUMMRUB COMPUTED BY (Volume*PriceRub), + SUMMCUR COMPUTED BY (Volume*PriceCur), + SUMMCALCDOC COMPUTED BY (Volume*PriceCalcDoc), + SUMMCALCRUB COMPUTED BY (Volume*PriceCalcRub), + SUMMCALCCUR COMPUTED BY (Volume*PriceCalcCur), + SUMMNDSDOC COMPUTED BY (NDS*SummCalcDoc/100), + SUMMNDSRUB COMPUTED BY (NDS*SummCalcRub/100), + SUMMNDSCUR COMPUTED BY (NDS*SummCalcCur/100), + SUMMWITHNDSDOC COMPUTED BY (SummCalcDoc+SummNDSDoc), + SUMMWITHNDSRUB COMPUTED BY (SummCalcRub+SummNDSRub), + SUMMWITHNDSCUR COMPUTED BY (SummCalcCur+SummNDSCur), + PRICEDOC_IN DOUBLE PRECISION DEFAULT 0, + EXPIREPERCENT COMPUTED BY (Cast(100 * (ItemExpireDate - CURRENT_TIMESTAMP) / (ItemExpireDate - ItemCreateDate) as Integer)) +); + +CREATE TABLE TBL_OUTDOC_TEMP ( + ID_OUTDOC_TEMP INTEGER NOT NULL, + ID_OUTDOC INTEGER NOT NULL, + ID_ITEMSALE INTEGER, + ID_ITEM INTEGER, + ID_POINT INTEGER NOT NULL, + VOLUME DOUBLE PRECISION DEFAULT 0 NOT NULL, + PRICEDOC DOUBLE PRECISION DEFAULT 0 NOT NULL, + NDS DOUBLE PRECISION DEFAULT 0 NOT NULL, + BUILDERPERCENT DOUBLE PRECISION DEFAULT 0 NOT NULL, + SUMMDOC DOUBLE PRECISION DEFAULT 0, + SUMMNDSDOC DOUBLE PRECISION DEFAULT 0, + SUMMWITHNDSDOC DOUBLE PRECISION DEFAULT 0, + BUILDERPRICE COMPUTED BY (PriceDoc*100/(100+BuilderPercent)) +); + +CREATE TABLE TBL_ITEMSALE ( + ID_ITEMSALE INTEGER NOT NULL, + ID_STORE INTEGER NOT NULL, + ID_ITEM INTEGER NOT NULL, + ID_FIRSTINDOC_TEMP INTEGER NOT NULL, + F_ALOWSALE DMN_BOOL /* DMN_BOOL = SMALLINT DEFAULT 0 */, + VOLUME DMN_PRICE NOT NULL /* DMN_PRICE = DOUBLE PRECISION DEFAULT 0 CHECK (Value >= 0) */, + SALEPRICERUB DOUBLE PRECISION DEFAULT 0 NOT NULL, + SALEPRICECUR DOUBLE PRECISION DEFAULT 0 NOT NULL, + F_IMPORTED DMN_BOOL NOT NULL /* DMN_BOOL = SMALLINT DEFAULT 0 */, + V_VOLUME DOUBLE PRECISION DEFAULT 0, + V_MASS DOUBLE PRECISION DEFAULT 0 +); + +CREATE TABLE TBL_INDOC ( + ID_INDOC INTEGER NOT NULL, + ID_STORE INTEGER NOT NULL, + ID_FIRM INTEGER NOT NULL, + ID_SELFFIRM INTEGER NOT NULL, + ID_CUR INTEGER NOT NULL, + DOCTYPE INTEGER NOT NULL, + DOCNAME DMN_DOCNAME /* DMN_DOCNAME = VARCHAR(20) */, + DATECREATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + DATEDOC TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + DATELASTEDIT TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + DATESTORE TIMESTAMP, + ID_USERCREATE INTEGER NOT NULL, + ID_USERLOCK INTEGER, + F_FINISHED DMN_BOOL /* DMN_BOOL = SMALLINT DEFAULT 0 */, + F_STORE DMN_BOOL /* DMN_BOOL = SMALLINT DEFAULT 0 */, + F_SPECIAL DMN_BOOL /* DMN_BOOL = SMALLINT DEFAULT 0 */, + ADDENDUM VARCHAR(128) CHARACTER SET WIN1251, + COMMENT VARCHAR(128) CHARACTER SET WIN1251, + COURSE DOUBLE PRECISION NOT NULL, + ID_PARENT_OUTDOC INTEGER DEFAULT 0 NOT NULL, + PRICEDOC_IN_IMPORTED SMALLINT DEFAULT 0 NOT NULL +); + +SET TERM ^ ; + +CREATE PROCEDURE PRC_EXPSUMM_8_10 ( + ID_EXPORTFIELDDOC INTEGER, + ID_OUTDOC INTEGER, + NDSDIV DOUBLE PRECISION) +RETURNS ( + SUMMRUS DOUBLE PRECISION, + SUMMDOC DOUBLE PRECISION) +AS +begin + IF (id_exportfielddoc=130) THEN BEGIN + SELECT SUM(A.PriceRub*B.Volume/A.PointMul), SUM(A.PriceDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=131) THEN BEGIN + SELECT SUM(A.PriceCalcRub*B.Volume/A.PointMul), SUM(A.PriceCalcDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=132) THEN BEGIN + SELECT SUM(A.SummDoc), SUM(A.SummDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D + WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and + d.id_indoc=c.id_indoc and d.doctype = 6 and a.nds>0 and a.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=133) THEN BEGIN + SELECT SUM(A.NDS*A.PriceRub*B.Volume/(A.PointMul*100)), SUM(A.NDS*A.PriceDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=134) THEN BEGIN + SELECT SUM(A.NDS*A.PriceCalcRub*B.Volume/(A.PointMul*100)), SUM(A.NDS*A.PriceCalcDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=135) THEN BEGIN + SELECT SUM(A.SummNDSDoc), SUM(A.SummNDSDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D + WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and + d.id_indoc=c.id_indoc and d.doctype = 6 and a.nds>0 and a.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=136) THEN BEGIN + SELECT SUM((A.PriceRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM((A.PriceDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=137) THEN BEGIN + SELECT SUM((A.PriceCalcRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM((A.PriceCalcDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=138) THEN BEGIN + SELECT SUM(A.SummWithNDSDoc), SUM(A.SummWithNDSDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D + WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and + d.id_indoc=c.id_indoc and d.doctype = 6 and a.nds>0 and a.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=139) THEN BEGIN + SELECT SUM((A.PriceCalcRub-A.PriceRub)*B.Volume/A.PointMul), SUM((A.PriceCalcDoc-A.PriceDoc)*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=140) THEN BEGIN + SELECT SUM(B.SummDoc-(A.PriceRub*B.Volume/A.PointMul)), SUM(B.SummDoc-(A.PriceDoc*B.Volume/A.PointMul)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=141) THEN BEGIN + SELECT SUM(A.NDS*(A.PriceCalcRub-A.PriceRub)*B.Volume/(A.PointMul*100)), SUM(A.NDS*(A.PriceCalcDoc-A.PriceDoc)*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=142) THEN BEGIN + SELECT SUM(B.SummNDSDoc-A.NDS*A.PriceRub*B.Volume/(A.PointMul*100)), SUM(B.SummNDSDoc-A.NDS*A.PriceDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=143) THEN BEGIN + SELECT SUM(((A.PriceCalcRub-A.PriceRub)*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM(((A.PriceCalcDoc-A.PriceDoc)*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=144) THEN BEGIN + SELECT SUM(B.SummWithNDSDoc-(A.PriceRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM(B.SummWithNDSDoc-(A.PriceDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds<:NDSDiv + INTO :summrus, :summdoc; + END + SUSPEND; +END +^ + +CREATE PROCEDURE PRC_EXPSUMM_8_20 ( + ID_EXPORTFIELDDOC INTEGER, + ID_OUTDOC INTEGER, + NDSDIV DOUBLE PRECISION) +RETURNS ( + SUMMRUS DOUBLE PRECISION, + SUMMDOC DOUBLE PRECISION) +AS +begin + IF (id_exportfielddoc=145) THEN BEGIN + SELECT SUM(A.PriceRub*B.Volume/A.PointMul), SUM(A.PriceDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=146) THEN BEGIN + SELECT SUM(A.PriceCalcRub*B.Volume/A.PointMul), SUM(A.PriceCalcDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=147) THEN BEGIN + SELECT SUM(A.SummDoc), SUM(A.SummDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D + WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and + d.id_indoc=c.id_indoc and d.doctype = 6 and a.nds>0 and a.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=148) THEN BEGIN + SELECT SUM(A.NDS*A.PriceRub*B.Volume/(A.PointMul*100)), SUM(A.NDS*A.PriceDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=149) THEN BEGIN + SELECT SUM(A.NDS*A.PriceCalcRub*B.Volume/(A.PointMul*100)), SUM(A.NDS*A.PriceCalcDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=150) THEN BEGIN + SELECT SUM(A.SummNDSDoc), SUM(A.SummNDSDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D + WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and + d.id_indoc=c.id_indoc and d.doctype = 6 and a.nds>0 and a.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=151) THEN BEGIN + SELECT SUM((A.PriceRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM((A.PriceDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=152) THEN BEGIN + SELECT SUM((A.PriceCalcRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM((A.PriceCalcDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=153) THEN BEGIN + SELECT SUM(A.SummWithNDSDoc), SUM(A.SummWithNDSDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D + WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and + d.id_indoc=c.id_indoc and d.doctype = 6 and a.nds>0 and a.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=154) THEN BEGIN + SELECT SUM((A.PriceCalcRub-A.PriceRub)*B.Volume/A.PointMul), SUM((A.PriceCalcDoc-A.PriceDoc)*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=155) THEN BEGIN + SELECT SUM(B.SummDoc-(A.PriceRub*B.Volume/A.PointMul)), SUM(B.SummDoc-(A.PriceDoc*B.Volume/A.PointMul)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=156) THEN BEGIN + SELECT SUM(A.NDS*(A.PriceCalcRub-A.PriceRub)*B.Volume/(A.PointMul*100)), SUM(A.NDS*(A.PriceCalcDoc-A.PriceDoc)*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=157) THEN BEGIN + SELECT SUM(B.SummNDSDoc-A.NDS*A.PriceRub*B.Volume/(A.PointMul*100)), SUM(B.SummNDSDoc-A.NDS*A.PriceDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=158) THEN BEGIN + SELECT SUM(((A.PriceCalcRub-A.PriceRub)*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM(((A.PriceCalcDoc-A.PriceDoc)*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=159) THEN BEGIN + SELECT SUM(B.SummWithNDSDoc-(A.PriceRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM(B.SummWithNDSDoc-(A.PriceDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds>0 and b.nds>=:NDSDiv + INTO :summrus, :summdoc; + END + SUSPEND; +END +^ + +CREATE PROCEDURE PRC_EXPSUMM_8( + ID_INDOC INTEGER, + ID_OUTDOC INTEGER, + ID_GROUP INTEGER) +RETURNS ( + ACCOUNTCREDIT INTEGER, + ACCOUNTDEBIT INTEGER, + SUMMRUS DOUBLE PRECISION, + SUMMDOC DOUBLE PRECISION) +AS +DECLARE VARIABLE NDSDiv DOUBLE PRECISION; +DECLARE VARIABLE ID_ExportFieldDoc Integer; +begin + SELECT Val FROM TBL_Const_Float + WHERE Name='NDSDiv' + INTO :NDSDiv; + FOR SELECT id_exportfielddoc, accountcredit, accountdebit FROM tbl_exportentry + WHERE id_exportgroupentry=:id_group + INTO :id_exportfielddoc, :accountcredit, :accountdebit + DO BEGIN + IF ((AccountCredit<>0) or (AccountDebit<>0)) THEN BEGIN + IF (id_exportfielddoc=110) THEN BEGIN + SELECT SUM(A.PriceRub*B.Volume/A.PointMul), SUM(A.PriceDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=111) THEN BEGIN + SELECT SUM(A.PriceCalcRub*B.Volume/A.PointMul), SUM(A.PriceCalcDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A, + TBL_OUTDOC_TEMP B, + TBL_ITEMSALE C, + TBL_INDOC D + WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and + d.id_indoc=a.id_indoc and d.doctype = 6 + INTO :summrus, :summdoc; + END + IF (id_exportfielddoc=112) THEN BEGIN + SELECT SUM(A.SummDoc), SUM(A.SummDoc) FROM TBL_OUTDOC_TEMP A, + TBL_ITEMSALE B, + TBL_INDOC_TEMP C, + TBL_INDOC D +... [truncated message content] |
From: <mak...@us...> - 2007-12-12 21:33:56
|
Revision: 448 http://firebird.svn.sourceforge.net/firebird/?rev=448&view=rev Author: makowski Date: 2007-12-12 13:34:00 -0800 (Wed, 12 Dec 2007) Log Message: ----------- Clean up for Firebird 2.1 Modified Paths: -------------- qa/trunk/testsuite/bugs.qms/core_1076.qmt qa/trunk/testsuite/bugs.qms/core_1112.qmt qa/trunk/testsuite/bugs.qms/core_847.qmt qa/trunk/testsuite/bugs.qms/core_878.qmt qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/starting_with_01.qmt qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/starting_with_02.qmt qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/timestamps_01.qmt qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/upper_lower_bounds_02.qmt qa/trunk/testsuite/functional.qms/arno.qms/optimizer.qms/opt_left_join_08.qmt qa/trunk/testsuite/functional.qms/arno.qms/optimizer.qms/opt_sort_by_index_12.qmt qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_60.qmt qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_61.qmt qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_62.qmt qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_63.qmt qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_64.qmt qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_66.qmt qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_68.qmt qa/trunk/testsuite/functional.qms/basic.qms/isql.qms/isql_12.qmt qa/trunk/testsuite/functional.qms/basic.qms/isql.qms/isql_13.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_38.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_40.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_41.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_42.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_43.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_44.qmt qa/trunk/testsuite/functional.qms/domain.qms/alter.qms/alter_domain_10.qmt qa/trunk/testsuite/functional.qms/domain.qms/alter.qms/alter_domain_11.qmt qa/trunk/testsuite/functional.qms/shadow.qms/create.qms/create_shadow_09.qmt qa/trunk/testsuite/functional.qms/shadow.qms/create.qms/create_shadow_10.qmt Added Paths: ----------- qa/trunk/testsuite/bugs.qms/core_1076-20.qmt qa/trunk/testsuite/bugs.qms/core_959-21.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_45.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_46.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_47.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_48.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_49.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_50.qmt qa/trunk/testsuite/functional.qms/database.qms/create.qms/create_database_51.qmt qa/trunk/testsuite/functional.qms/shadow.qms/create.qms/create_shadow_11.qmt qa/trunk/testsuite/functional.qms/shadow.qms/create.qms/create_shadow_12.qmt qa/trunk/testsuite/functional.qms/table.qms/create.qms/create_table_12.qmt qa/trunk/testsuite/functional.qms/table.qms/create.qms/create_table_13.qmt Removed Paths: ------------- qa/trunk/testsuite/bugs.qms/core_932.qmt Added: qa/trunk/testsuite/bugs.qms/core_1076-20.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1076-20.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_1076-20.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -0,0 +1,16 @@ +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>None</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>GSEC> GSEC> user name uid gid full name +------------------------------------------------------------------------------------------ +SYSDBA 0 0 Sql Server Administrator +TEST1076 0 0 123456789012345678901234567890az 123456789012345678901234567890az 123456789012345678901234567890az +GSEC> GSEC> </text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>makowski</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.0</text></argument><argument name="description"><text>FB2.0 correctly saves First, Middle & Last Name fields in the security database to the available length of 32 characters. +FB1.5.3 and still now FB1.5.4RC1 truncates these field lengths to 17 chars. +</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1076</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>commands = """add TEST1076 -pw PWD -fname 123456789012345678901234567890az -mname 123456789012345678901234567890az -lname 123456789012345678901234567890az +display +delete TEST1076 +quit +""" +runProgram('gsec',['-user',user_name,'-pas',user_password],commands)</text></argument><argument name="test_id"><text>core_1076</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>Python: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>gsec truncate First.Middle.Last Name fields to 17 chars instead of 32 chars available in field definition</text></argument><argument name="drop_db"><enumeral>false</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Modified: qa/trunk/testsuite/bugs.qms/core_1076.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1076.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/bugs.qms/core_1076.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -2,13 +2,15 @@ <!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> -<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>None</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text/></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>makowski</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text> user name uid gid full name +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>None</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text/></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>makowski</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text>GSEC> GSEC> user name uid gid full name ------------------------------------------------------------------------------------------ SYSDBA 0 0 -TEST 0 0 123456789012345678901234567890az 123456789012345678901234567890az 123456789012345678901234567890az -</text></argument><argument name="target_version"><text>1.5.5</text></argument><argument name="description"><text>FB2.0 correctly saves First, Middle & Last Name fields in the security database to the available length of 32 characters. +TEST1076 0 0 123456789012345678901234567890az 123456789012345678901234567890az 123456789012345678901234567890az +GSEC> GSEC> </text></argument><argument name="target_version"><text>1.5.5</text></argument><argument name="description"><text>FB2.0 correctly saves First, Middle & Last Name fields in the security database to the available length of 32 characters. FB1.5.3 and still now FB1.5.4RC1 truncates these field lengths to 17 chars. -</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1076</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>runProgram('gsec',['-user',user_name,'-password',user_password,'-add','TEST','-pw','test','-fname','123456789012345678901234567890az','-mname','123456789012345678901234567890az','-lname','123456789012345678901234567890az']) -runProgram('gsec',['-user',user_name,'-password',user_password,'-display']) -runProgram('gsec',['-user',user_name,'-password',user_password,'-delete','TEST']) -</text></argument><argument name="test_id"><text>core_1076</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>Python: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>gsec truncate First.Middle.Last Name fields to 17 chars instead of 32 chars available in field definition</text></argument><argument name="drop_db"><enumeral>false</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file +</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1076</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>commands = """add TEST1076 -pw PWD -fname 123456789012345678901234567890az -mname 123456789012345678901234567890az -lname 123456789012345678901234567890az +display +delete TEST1076 +quit +""" +runProgram('gsec',['-user',user_name,'-pas',user_password],commands)</text></argument><argument name="test_id"><text>core_1076</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>Python: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>gsec truncate First.Middle.Last Name fields to 17 chars instead of 32 chars available in field definition</text></argument><argument name="drop_db"><enumeral>false</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Modified: qa/trunk/testsuite/bugs.qms/core_1112.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1112.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/bugs.qms/core_1112.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -1,4 +1,9 @@ -<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text/></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text>This test may crash the server</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1112</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>bug.fdb</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>c = db_conn.cursor() +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>[('a',)] +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text>This test may crash the server</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1112</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>core1112.fdb</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>c = db_conn.cursor() longstr = 'abc' * 10930 try: c.execute("select * from rdb$database where '%s' = 'a'" % longstr) @@ -9,4 +14,5 @@ c.execute("select * from rdb$database where '%s' containing 'a'" % longstr) except: pass -</text></argument><argument name="test_id"><text>core_1112</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>Python: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Crash when dealing with a string literal longer than 32K</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file +c.execute("select 'a' from rdb$database") +print c.fetchall()</text></argument><argument name="test_id"><text>core_1112</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>Python: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Crash when dealing with a string literal longer than 32K</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Modified: qa/trunk/testsuite/bugs.qms/core_847.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_847.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/bugs.qms/core_847.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -1,10 +1,14 @@ -<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>F1 F2 CF +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>F1 F2 CF ========== ========== ======================= 0123456789 abcdefghij 0123456789 - abcdefghij RDB$FIELD_NAME RDB$QUERY_NAME RDB$VALIDATION_BLR RDB$VALIDATION_SOURCE RDB$COMPUTED_BLR RDB$COMPUTED_SOURCE RDB$DEFAULT_VALUE RDB$DEFAULT_SOURCE RDB$FIELD_LENGTH RDB$FIELD_SCALE RDB$FIELD_TYPE RDB$FIELD_SUB_TYPE RDB$MISSING_VALUE RDB$MISSING_SOURCE RDB$DESCRIPTION RDB$SYSTEM_FLAG RDB$QUERY_HEADER RDB$SEGMENT_LENGTH RDB$EDIT_STRING RDB$EXTERNAL_LENGTH RDB$EXTERNAL_SCALE RDB$EXTERNAL_TYPE RDB$DIMENSIONS RDB$NULL_FLAG RDB$CHARACTER_LENGTH RDB$COLLATION_ID RDB$CHARACTER_SET_ID RDB$FIELD_PRECISION =============================================================================== =============================================================================== ================== ===================== ================= =================== ================= ================== ================ =============== ============== ================== ================= ================== ================= =============== ================= ================== =============================================================================== =================== ================== ================= ============== ============= ==================== ================ ==================== =================== -RDB$3 <null> <null> <null> 2:1f1 2:1f0 <null> <null> 23 0 37 0 <null> <null> <null> 0 <null> <null> <null> <null> <null> <null> <null> <null> 0 <null> 0 <null> +RDB$3 <null> <null> <null> 2:1f4 2:1f3 <null> <null> 23 0 37 0 <null> <null> <null> 0 <null> <null> <null> <null> <null> <null> <null> <null> 0 <null> 0 <null> F1 F2 CF ========== ========== ============================== Modified: qa/trunk/testsuite/bugs.qms/core_878.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_878.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/bugs.qms/core_878.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -1,7 +1,11 @@ -<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>I1 INTEGER Not Null +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>I1 INTEGER Not Null I2 INTEGER Nullable CONSTRAINT INTEG_2: - Primary key (I1) + Primary key (I1) uses explicit ascending index RDB$PRIMARY1 I1 INTEGER Not Null I2 INTEGER Nullable CONSTRAINT PK2_PK: @@ -9,7 +13,7 @@ I1 INTEGER Not Null I2 INTEGER Nullable CONSTRAINT INTEG_5: - Primary key (I1) + Primary key (I1) uses explicit ascending index RDB$PRIMARY2 I2 INTEGER Nullable I2 INTEGER Nullable I2 INTEGER Nullable Deleted: qa/trunk/testsuite/bugs.qms/core_932.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_932.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/bugs.qms/core_932.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -1,19 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE extension - PUBLIC '-//QM/2.3/Extension//EN' - 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> -<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>Owner: SYSDBA -PAGE_SIZE 4096 -Number of DB pages allocated = 164 -Sweep interval = 20000 -Forced Writes are ON -Transaction - oldest = 1 -Transaction - oldest active = 2 -Transaction - oldest snapshot = 2 -Transaction - Next = 5 -ODS = 11.1 -Default Character set: NONE -</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>makowski</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text>Accept comment in Create database</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text>CORE-932</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>commit; -create database /* waw */ '$(DATABASE_LOCATION)trucks'; -show database; -drop database;</text></argument><argument name="test_id"><text>core-932</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Comment in create database</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/bugs.qms/core_959-21.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_959-21.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_959-21.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -0,0 +1,36 @@ +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text> +Database "c:\db\qa\bug.fdb" +Database header page information: + Flags 0 + Checksum 12345 + Generation 6 + Page size 4096 + ODS version 11.0 + Oldest transaction 1 + Oldest active 0 + Oldest snapshot 0 + Next transaction 1 + Bumped transaction 1 + Sequence number 0 + Next attachment ID 0 + Implementation ID 16 + Shadow count 0 + Page buffers 0 + Next header page 0 + Database dialect 3 + Creation date Jul 5, 2007 16:54:18 + Attributes force write + + Variable header data: + *END* + + +Database file sequence: +File c:\db\qa\bug.fdb is the only file + +Analyzing database pages ... +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set><tuple><text>^Database ".*</text><text/></tuple><tuple><text>Page size.*</text><text/></tuple><tuple><text>ODS version.*</text><text/></tuple><tuple><text>Oldest.*</text><text/></tuple><tuple><text>Next.*</text><text/></tuple><tuple><text>Bumped.*</text><text/></tuple><tuple><text>Creation date.*</text><text/></tuple><tuple><text>Attributes.*</text><text/></tuple><tuple><text>File .*</text><text/></tuple><tuple><text>Implementation.*</text><text/></tuple></set></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text/></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-959</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>bug.fdb</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>runProgram('gstat',['-a','-user',user_name,'-pa',user_password,dsn])</text></argument><argument name="test_id"><text>core_959</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>Python: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>GSTAT does not work using the localhost connection string</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Modified: qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/starting_with_01.qmt =================================================================== --- qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/starting_with_01.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/starting_with_01.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -1,60 +1,60 @@ -<?xml version="1.0" ?> -<!DOCTYPE extension - PUBLIC '-//QM/2.2/Extension//EN' - 'http://www.codesourcery.com/qm/dtds/2.2/-//qm/2.2/extension//en.dtd'> -<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>O_FIELD O_COUNT -================================ ============ - -F1 - INDEXED ASC 3 -F2 - INDEXED DESC 3 -F3 - NOT INDEXED 3 </text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="title"><text>STARTING WITH charset NONE</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>1.5</text></argument><argument name="description"><text>STARTING WITH - Select from table with 2 entries - -Dependencies: -CREATE DATABASE -CREATE TABLE -Basic SELECT</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text/></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>starting_with.fdb</text></argument><argument name="isql_script"><text>CREATE TABLE A_TEST (F1 VARCHAR(5), F2 VARCHAR(5), F3 VARCHAR(5)); -CREATE INDEX IDX_A_TEST_F1 ON A_TEST(F1); -CREATE DESC INDEX IDX_A_TEST_F2 ON A_TEST(F2); -COMMIT; -INSERT INTO A_TEST (F1, F2, F3) VALUES('', '', ''); -INSERT INTO A_TEST (F1, F2, F3) VALUES(NULL, NULL, NULL); -INSERT INTO A_TEST (F1, F2, F3) VALUES('a', 'a', 'a'); -INSERT INTO A_TEST (F1, F2, F3) VALUES('b', 'b', 'b'); -COMMIT; - -SET TERM ^; - -CREATE PROCEDURE PR_A_TEST_STARTING_WITH(I_START_VALUE VARCHAR(5)) -RETURNS(O_FIELD VARCHAR(32), O_COUNT integer) -AS -BEGIN - /* First retrieve results for indexed ASC field */ - O_FIELD = 'F1 - INDEXED ASC'; - SELECT COUNT(*) FROM A_TEST - WHERE F1 STARTING WITH :I_START_VALUE - INTO :O_COUNT; - - SUSPEND; - - /* Second retrieve results for indexed DESC field */ - O_FIELD = 'F2 - INDEXED DESC'; - SELECT COUNT(*) FROM A_TEST - WHERE F2 STARTING WITH :I_START_VALUE - INTO :O_COUNT; - - SUSPEND; - - /* Thirth for unindexed field */ - O_FIELD = 'F3 - NOT INDEXED'; - SELECT COUNT(*) FROM A_TEST - WHERE F3 STARTING WITH :I_START_VALUE - INTO :O_COUNT; - - SUSPEND; -END^ - -SET TERM ;^ - -</text></argument><argument name="source_code"><text>SET PLAN OFF; -SELECT O_FIELD, O_COUNT FROM PR_A_TEST_STARTING_WITH(''); -</text></argument><argument name="test_id"><text>starting_with_01</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="author"><text>arno.brinkman</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>O_FIELD O_COUNT +================================ ============ + +F1 - INDEXED ASC 3 +F2 - INDEXED DESC 3 +F3 - NOT INDEXED 3 </text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>arno.brinkman</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.0</text></argument><argument name="description"><text>STARTING WITH - Select from table with 2 entries + +Dependencies: +CREATE DATABASE +CREATE TABLE +Basic SELECT</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text/></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>starting_with.fdb</text></argument><argument name="isql_script"><text>CREATE TABLE A_TEST (F1 VARCHAR(5), F2 VARCHAR(5), F3 VARCHAR(5)); +CREATE INDEX IDX_A_TEST_F1 ON A_TEST(F1); +CREATE DESC INDEX IDX_A_TEST_F2 ON A_TEST(F2); +COMMIT; +INSERT INTO A_TEST (F1, F2, F3) VALUES('', '', ''); +INSERT INTO A_TEST (F1, F2, F3) VALUES(NULL, NULL, NULL); +INSERT INTO A_TEST (F1, F2, F3) VALUES('a', 'a', 'a'); +INSERT INTO A_TEST (F1, F2, F3) VALUES('b', 'b', 'b'); +COMMIT; + +SET TERM ^; + +CREATE PROCEDURE PR_A_TEST_STARTING_WITH(I_START_VALUE VARCHAR(5)) +RETURNS(O_FIELD VARCHAR(32), O_COUNT integer) +AS +BEGIN + /* First retrieve results for indexed ASC field */ + O_FIELD = 'F1 - INDEXED ASC'; + SELECT COUNT(*) FROM A_TEST + WHERE F1 STARTING WITH :I_START_VALUE + INTO :O_COUNT; + + SUSPEND; + + /* Second retrieve results for indexed DESC field */ + O_FIELD = 'F2 - INDEXED DESC'; + SELECT COUNT(*) FROM A_TEST + WHERE F2 STARTING WITH :I_START_VALUE + INTO :O_COUNT; + + SUSPEND; + + /* Thirth for unindexed field */ + O_FIELD = 'F3 - NOT INDEXED'; + SELECT COUNT(*) FROM A_TEST + WHERE F3 STARTING WITH :I_START_VALUE + INTO :O_COUNT; + + SUSPEND; +END^ + +SET TERM ;^ + +</text></argument><argument name="source_code"><text>SET PLAN OFF; +SELECT O_FIELD, O_COUNT FROM PR_A_TEST_STARTING_WITH(''); +</text></argument><argument name="test_id"><text>starting_with_01</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>STARTING WITH charset NONE</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Modified: qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/starting_with_02.qmt =================================================================== --- qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/starting_with_02.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/starting_with_02.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -1,60 +1,60 @@ -<?xml version="1.0" ?> -<!DOCTYPE extension - PUBLIC '-//QM/2.2/Extension//EN' - 'http://www.codesourcery.com/qm/dtds/2.2/-//qm/2.2/extension//en.dtd'> -<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>O_FIELD O_COUNT -================================ ============ - -F1 - INDEXED ASC 3 -F2 - INDEXED DESC 3 -F3 - NOT INDEXED 3 </text></argument><argument name="character_set"><enumeral>ISO8859_1</enumeral></argument><argument name="title"><text>STARTING WITH charset ISO8859_1</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>1.5</text></argument><argument name="description"><text>STARTING WITH - Select from table with 2 entries - -Dependencies: -CREATE DATABASE -CREATE TABLE -Basic SELECT</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text/></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>starting_with.fdb</text></argument><argument name="isql_script"><text>CREATE TABLE A_TEST (F1 VARCHAR(5), F2 VARCHAR(5), F3 VARCHAR(5)); -CREATE INDEX IDX_A_TEST_F1 ON A_TEST(F1); -CREATE DESC INDEX IDX_A_TEST_F2 ON A_TEST(F2); -COMMIT; -INSERT INTO A_TEST (F1, F2, F3) VALUES('', '', ''); -INSERT INTO A_TEST (F1, F2, F3) VALUES(NULL, NULL, NULL); -INSERT INTO A_TEST (F1, F2, F3) VALUES('a', 'a', 'a'); -INSERT INTO A_TEST (F1, F2, F3) VALUES('b', 'b', 'b'); -COMMIT; - -SET TERM ^; - -CREATE PROCEDURE PR_A_TEST_STARTING_WITH(I_START_VALUE VARCHAR(5)) -RETURNS(O_FIELD VARCHAR(32), O_COUNT integer) -AS -BEGIN - /* First retrieve results for indexed ASC field */ - O_FIELD = 'F1 - INDEXED ASC'; - SELECT COUNT(*) FROM A_TEST - WHERE F1 STARTING WITH :I_START_VALUE - INTO :O_COUNT; - - SUSPEND; - - /* Second retrieve results for indexed DESC field */ - O_FIELD = 'F2 - INDEXED DESC'; - SELECT COUNT(*) FROM A_TEST - WHERE F2 STARTING WITH :I_START_VALUE - INTO :O_COUNT; - - SUSPEND; - - /* Thirth for unindexed field */ - O_FIELD = 'F3 - NOT INDEXED'; - SELECT COUNT(*) FROM A_TEST - WHERE F3 STARTING WITH :I_START_VALUE - INTO :O_COUNT; - - SUSPEND; -END^ - -SET TERM ;^ - -</text></argument><argument name="source_code"><text>SET PLAN OFF; -SELECT O_FIELD, O_COUNT FROM PR_A_TEST_STARTING_WITH(''); -</text></argument><argument name="test_id"><text>starting_with_02</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="author"><text>arno.brinkman</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>O_FIELD O_COUNT +================================ ============ + +F1 - INDEXED ASC 3 +F2 - INDEXED DESC 3 +F3 - NOT INDEXED 3 </text></argument><argument name="character_set"><enumeral>ISO8859_1</enumeral></argument><argument name="author"><text>arno.brinkman</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.0</text></argument><argument name="description"><text>STARTING WITH - Select from table with 2 entries + +Dependencies: +CREATE DATABASE +CREATE TABLE +Basic SELECT</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text/></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>starting_with.fdb</text></argument><argument name="isql_script"><text>CREATE TABLE A_TEST (F1 VARCHAR(5), F2 VARCHAR(5), F3 VARCHAR(5)); +CREATE INDEX IDX_A_TEST_F1 ON A_TEST(F1); +CREATE DESC INDEX IDX_A_TEST_F2 ON A_TEST(F2); +COMMIT; +INSERT INTO A_TEST (F1, F2, F3) VALUES('', '', ''); +INSERT INTO A_TEST (F1, F2, F3) VALUES(NULL, NULL, NULL); +INSERT INTO A_TEST (F1, F2, F3) VALUES('a', 'a', 'a'); +INSERT INTO A_TEST (F1, F2, F3) VALUES('b', 'b', 'b'); +COMMIT; + +SET TERM ^; + +CREATE PROCEDURE PR_A_TEST_STARTING_WITH(I_START_VALUE VARCHAR(5)) +RETURNS(O_FIELD VARCHAR(32), O_COUNT integer) +AS +BEGIN + /* First retrieve results for indexed ASC field */ + O_FIELD = 'F1 - INDEXED ASC'; + SELECT COUNT(*) FROM A_TEST + WHERE F1 STARTING WITH :I_START_VALUE + INTO :O_COUNT; + + SUSPEND; + + /* Second retrieve results for indexed DESC field */ + O_FIELD = 'F2 - INDEXED DESC'; + SELECT COUNT(*) FROM A_TEST + WHERE F2 STARTING WITH :I_START_VALUE + INTO :O_COUNT; + + SUSPEND; + + /* Thirth for unindexed field */ + O_FIELD = 'F3 - NOT INDEXED'; + SELECT COUNT(*) FROM A_TEST + WHERE F3 STARTING WITH :I_START_VALUE + INTO :O_COUNT; + + SUSPEND; +END^ + +SET TERM ;^ + +</text></argument><argument name="source_code"><text>SET PLAN OFF; +SELECT O_FIELD, O_COUNT FROM PR_A_TEST_STARTING_WITH(''); +</text></argument><argument name="test_id"><text>starting_with_02</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>STARTING WITH charset ISO8859_1</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Modified: qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/timestamps_01.qmt =================================================================== --- qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/timestamps_01.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/timestamps_01.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -12,7 +12,7 @@ 1858-11-17 00:00:00.0000 1858-11-17 00:00:00.0000 1858-11-18 16:00:00.0000 1858-11-18 17:00:00.0000 2004-04-08 02:00:00.0000 2004-04-08 02:09:00.0000 -</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>arno.brinkman</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>1.5</text></argument><argument name="description"><text>Datetime values below the julian date (firebird base date '1858-11-17') should be stored in correct order.</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text/></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>timestamps.fdb</text></argument><argument name="isql_script"><text>CREATE TABLE Era ( +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>arno.brinkman</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.0</text></argument><argument name="description"><text>Datetime values below the julian date (firebird base date '1858-11-17') should be stored in correct order.</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text/></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>timestamps.fdb</text></argument><argument name="isql_script"><text>CREATE TABLE Era ( BeginDateTime TIMESTAMP NOT NULL, EndDateTime TIMESTAMP NOT NULL ); Modified: qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/upper_lower_bounds_02.qmt =================================================================== --- qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/upper_lower_bounds_02.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/functional.qms/arno.qms/indexes.qms/upper_lower_bounds_02.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -1,9 +1,13 @@ -<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3b/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3b/-//qm/2.3b/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>COUNT +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>COUNT ----------- 201 sequential : {} indexed : {128: 201} -</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>arno.brinkman</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>1.5</text></argument><argument name="description"><text>"Less or equal than" should be prefered above "less than" and "greater or equal than" above "greater than". +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>arno.brinkman</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.0</text></argument><argument name="description"><text>"Less or equal than" should be prefered above "less than" and "greater or equal than" above "greater than". </text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text/></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>indexed.fdb</text></argument><argument name="isql_script"><text>CREATE TABLE Table_1000 ( ID INTEGER NOT NULL ); Modified: qa/trunk/testsuite/functional.qms/arno.qms/optimizer.qms/opt_left_join_08.qmt =================================================================== --- qa/trunk/testsuite/functional.qms/arno.qms/optimizer.qms/opt_left_join_08.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/functional.qms/arno.qms/optimizer.qms/opt_left_join_08.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -50,4 +50,4 @@ (c.ColorID > 0) WHERE f.ColorID >= 0; -</text></argument><argument name="test_id"><text>opt_left_join_08</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>LEFT OUTER JOIN with full match, but limited in ON and WHERE clause</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file +</text></argument><argument name="test_id"><text>opt_left_join_08</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>LEFT OUTER JOIN with full match, but limited in ON and WHERE clause</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> Modified: qa/trunk/testsuite/functional.qms/arno.qms/optimizer.qms/opt_sort_by_index_12.qmt =================================================================== --- qa/trunk/testsuite/functional.qms/arno.qms/optimizer.qms/opt_sort_by_index_12.qmt 2007-12-12 09:55:59 UTC (rev 447) +++ qa/trunk/testsuite/functional.qms/arno.qms/optimizer.qms/opt_sort_by_index_12.qmt 2007-12-12 21:34:00 UTC (rev 448) @@ -1,76 +1,77 @@ -<?xml version="1.0" ?> -<!DOCTYPE extension - PUBLIC '-//QM/2.2/Extension//EN' - 'http://www.codesourcery.com/qm/dtds/2.2/-//qm/2.2/extension//en.dtd'> -<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>PLAN SORT ((T53 INDEX (I_TABLE_53_ID1_ASC, I_TABLE_53_ID2_ASC))) - - ID1 ID2 -============ ============ - - 10 5 - 10 4 - 10 3 - 10 2 - 10 1 - 10 0 - 20 5 - 20 4 - 20 3 - 20 2 - 20 1 - 20 0 -</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="title"><text>ORDER BY ASC, DESC using index (multi)</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.0</text></argument><argument name="description"><text>ORDER BY X ASC, Y DESC -When more fields are given in ORDER BY clause try to use a compound index, but look out for mixed directions.</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text/></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>sort_by_index.fdb</text></argument><argument name="isql_script"><text>CREATE TABLE Table_53 ( - ID1 INTEGER, - ID2 INTEGER -); - -SET TERM ^^ ; -CREATE PROCEDURE PR_FillTable_53 -AS -DECLARE VARIABLE FillID INTEGER; -DECLARE VARIABLE FillID1 INTEGER; -BEGIN - FillID = 1; - WHILE (FillID <= 50) DO - BEGIN - FillID1 = (FillID / 10) * 10; - INSERT INTO Table_53 - (ID1, ID2) - VALUES - (:FillID1, :FillID - :FillID1); - FillID = FillID + 1; - END - INSERT INTO Table_53 (ID1, ID2) VALUES (0, NULL); - INSERT INTO Table_53 (ID1, ID2) VALUES (NULL, 0); - INSERT INTO Table_53 (ID1, ID2) VALUES (NULL, NULL); -END -^^ -SET TERM ; ^^ - -COMMIT; - -EXECUTE PROCEDURE PR_FillTable_53; - -COMMIT; - -CREATE ASC INDEX I_Table_53_ID1_ASC ON Table_53 (ID1); -CREATE DESC INDEX I_Table_53_ID1_DESC ON Table_53 (ID1); -CREATE ASC INDEX I_Table_53_ID2_ASC ON Table_53 (ID2); -CREATE DESC INDEX I_Table_53_ID2_DESC ON Table_53 (ID2); -CREATE ASC INDEX I_Table_53_ID1_ID2_ASC ON Table_53 (ID1, ID2); -CREATE DESC INDEX I_Table_53_ID1_ID2_DESC ON Table_53 (ID1, ID2); -CREATE ASC INDEX I_Table_53_ID2_ID1_ASC ON Table_53 (ID2, ID1); -CREATE DESC INDEX I_Table_53_ID2_ID1_DESC ON Table_53 (ID2, ID1); - -COMMIT; -</text></argument><argument name="source_code"><text>SET PLAN ON; -SELECT - t53.ID1, t53.ID2 -FROM - Table_53 t53 -WHERE - t53.ID1 BETWEEN 10 and 20 and - t53.ID2 <= 5 -ORDER BY - t53.ID1 ASC, t53.ID2 DESC;</text></argument><argument name="test_id"><text>opt_sort_by_index_12</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="author"><text>arno.brinkman</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text> +PLAN SORT ((T53 INDEX (I_TABLE_53_ID2_ASC, I_TABLE_53_ID1_ASC))) + + ID1 ID2 +============ ============ + 10 5 + 10 4 + 10 3 + 10 2 + 10 1 + 10 0 + 20 5 + 20 4 + 20 3 + 20 2 + 20 1 + 20 0 + +</text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>arno.brinkman</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.0</text></argument><argument name="description"><text>ORDER BY X ASC, Y DESC +When more fields are given in ORDER BY clause try to use a compound index, but look out for mixed directions.</text></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>Using SQL Commands</enumeral></argument><argument name="bug_id"><text/></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>sort_by_index.fdb</text></argument><argument name="isql_script"><text>CREATE TABLE Table_53 ( + ID1 INTEGER, + ID2 INTEGER +); + +SET TERM ^^ ; +CREATE PROCEDURE PR_FillTable_53 +AS +DECLARE VARIABLE FillID INTEGER; +DECLARE VARIABLE FillID1 INTEGER; +BEGIN + FillID = 1; + WHILE (FillID <= 50) DO + BEGIN + FillID1 = (FillID / 10) * 10; + INSERT INTO Table_53 + (ID1, ID2) + VALUES + (:FillID1, :FillID - :FillID1); + FillID = FillID + 1; + END + INSERT INTO Table_53 (ID1, ID2) VALUES (0, NULL); + INSERT INTO Table_53 (ID1, ID2) VALUES (NULL, 0); + INSERT INTO Table_53 (ID1, ID2) VALUES (NULL, NULL); +END +^^ +SET TERM ; ^^ + +COMMIT; + +EXECUTE PROCEDURE PR_FillTable_53; + +COMMIT; + +CREATE ASC INDEX I_Table_53_ID1_ASC ON Table_53 (ID1); +CREATE DESC INDEX I_Table_53_ID1_DESC ON Table_53 (ID1); +CREATE ASC INDEX I_Table_53_ID2_ASC ON Table_53 (ID2); +CREATE DESC INDEX I_Table_53_ID2_DESC ON Table_53 (ID2); +CREATE ASC INDEX I_Table_53_ID1_ID2_ASC ON Table_53 (ID1, ID2); +CREATE DESC INDEX I_Table_53_ID1_ID2_DESC ON Table_53 (ID1, ID2); +CREATE ASC INDEX I_Table_53_ID2_ID1_ASC ON Table_53 (ID2, ID1); +CREATE DESC INDEX I_Table_53_ID2_ID1_DESC ON Table_53 (ID2, ID1); + +COMMIT; +</text></argument><argument name="source_code"><text>SET PLAN ON; +SELECT + t53.ID1, t53.ID2 +FROM + T... [truncated message content] |
From: <pc...@us...> - 2007-12-29 18:12:22
|
Revision: 465 http://firebird.svn.sourceforge.net/firebird/?rev=465&view=rev Author: pcisar Date: 2007-12-29 10:12:26 -0800 (Sat, 29 Dec 2007) Log Message: ----------- - New implementation of FirebirdUserResource - test_user.qma updated to new implementation - Removed obsolete extension classes and related files Modified Paths: -------------- qa/trunk/testsuite/QMTest/classes.qmc qa/trunk/testsuite/QMTest/fbqa.py qa/trunk/testsuite/resources.qms/test_user.qma Removed Paths: ------------- qa/trunk/testsuite/QMTest/firebird.py Modified: qa/trunk/testsuite/QMTest/classes.qmc =================================================================== --- qa/trunk/testsuite/QMTest/classes.qmc 2007-12-29 18:09:02 UTC (rev 464) +++ qa/trunk/testsuite/QMTest/classes.qmc 2007-12-29 18:12:26 UTC (rev 465) @@ -3,24 +3,11 @@ <class-directory> -<!-- Test classes - -<class kind="test">firebird.FirebirdExecTest</class> -<class kind="test">firebird.FirebirdShellCommandTest</class> -<class kind="test">firebird.FirebirdShellScriptTest</class> - - ---> - <class kind="test">fbqa.FirebirdTest</class> -<class kind="test">firebird.FirebirdTestBase</class> -<class kind="test">firebird.FirebirdISQLTest</class> <!-- Resource classes --> -<class kind="resource">firebird.FirebirdDatabaseResource</class> -<class kind="resource">firebird.FirebirdInitScriptResource</class> -<class kind="resource">firebird.FirebirdUserResource</class> +<class kind="resource">fbqa.FirebirdUserResource</class> </class-directory> Modified: qa/trunk/testsuite/QMTest/fbqa.py =================================================================== --- qa/trunk/testsuite/QMTest/fbqa.py 2007-12-29 18:09:02 UTC (rev 464) +++ qa/trunk/testsuite/QMTest/fbqa.py 2007-12-29 18:12:26 UTC (rev 465) @@ -697,7 +697,7 @@ # if __RunProgram couldn't run the program, it will return nothing # (raising an exception when we try to assign the return value) # whatever went wrong will be stored in "self.__cause" - self.__result.Fail(cause= self.__cause) + self.__result.NoteException(cause=self.__cause) else: if stderr: self.__AnnotateStream(stderr, "STDERR", "ISQL") @@ -855,7 +855,7 @@ # if __RunProgram couldn't run the program, it will return nothing # (raising an exception when we try to assign the return value) # whatever went wrong will be stored in "self.__cause" - self.__result.Fail(cause= self.__cause) + self.__result.NoteException(cause=self.__cause) return else: if stdout or stderr: @@ -1267,6 +1267,115 @@ retval= self.__DropDatabase() self.__CleanUp(drop=False) +class FirebirdUserResource(Resource): + """Resource class to manage a Firebird User. + + An instance of this resource creates a Firebird user during + setup, and deletes it during cleanup. + + This class needs some context properties set to work properly. + These properties are server_location, gsec_path and isc4_path. + Please refer to the Firebird QA documentation for details about these properties.""" + + arguments = [ + qm.fields.TextField( + name="newuser_name", + title="User Name", + description="The name of the user.", + default_value="USER1" + ), + qm.fields.TextField( + name="newuser_password", + title="User Password", + description="The password of the user.", + default_value="firebirdqa" + ), + ] + + def __SubstituteMacros(self,text): + # Substitute macros for context values + f_text = text + c = {} + for pair in self.__context.items(): + c[pair[0]] = pair[1] + for substitution in c.keys(): + pattern = "$("+substitution.upper()+")" + replacement = self.__context[substitution] + f_text = f_text.replace(pattern, replacement) + return f_text + + def __MakeEnvironment(self): + """Construct the environment for executing the target program.""" + environment= os.environ.copy() + for key, value in self.__context.items(): + if type(value) is str: + name = "QMV_" + key.replace(".", "__") + environment[name]= value + return environment + + def __RunProgram(self, stdin, args): + self.__cause = "Unknown cause" + environ = self.__MakeEnvironment() + # PC: fix values so they are strings. Needed for Windows. + for key in environ.iterkeys(): + environ[key] = str(environ[key]) + basename = os.path.split(args[0])[-1] + qm_exec = qm.executable.Filter(self.__SubstituteMacros(stdin+"\n"), -2) + exit_status= qm_exec.Run(args, environ) + if sys.platform == "win32" or os.WIFEXITED(exit_status): + return qm_exec.stdout, qm_exec.stderr + elif os.WIFSIGNALED(exit_status): + self.__cause= "Process %s terminated by signal %d." % (basename, os.WTERMSIG(exit_status)) + elif os.WIFSTOPPED(exit_status): + self.__cause= "Process %s stopped by signal %d." % (basename, os.WSTOPSIG(exit_status)) + else: + self.__cause= "Process %s terminated abnormally." % basename + + def __AnnotateStreams(self, stdout, stderr, pname): + unexp=[] + if stdout: + self.__result["FirebirdTest.%s_STDOUT" % pname]= stdout.encode('UTF8') + if stderr: # gbak prints nothing to stderr if everything went ok + unexp.append("stderr") + self.__result["FirebirdTest.%s_STDERR" % pname]= stderr.encode('UTF8') + if unexp: # if we got something in stdout, stderr or both + cause= "Unexpected " + " and ".join(unexp) + " stream%s " % "s"[len(unexp)==1:] + "received from %s." % pname + self.__result.Fail(cause= cause) + + def SetUp(self, context, result): + self.__context = context + self.__result = result + try: + stdout, stderr= self.__RunProgram("",[self.__context["gsec_path"], + "-user", self.__context["user_name"], + "-password", self.__context["user_password"], + "-add", self.newuser_name, + "-pw", self.newuser_password]) + except: + # if __RunProgram couldn't run the program, it will return nothing + # (raising an exception when we try to assign the return value) + # whatever went wrong will be stored in "self.__cause" + self.__result.NoteException(cause=self.__cause) + else: + if stdout or stderr: + self.__AnnotateStreams(stdout, stderr, "GSEC") + + def CleanUp(self, result): + try: + stdout, stderr= self.__RunProgram("",[self.__context["gsec_path"], + "-user", self.__context["user_name"], + "-password", self.__context["user_password"], + "-delete", self.newuser_name]) + except: + # if __RunProgram couldn't run the program, it will return nothing + # (raising an exception when we try to assign the return value) + # whatever went wrong will be stored in "self.__cause" + self.__result.NoteException(cause=self.__cause) + else: + if stdout or stderr: + self.__AnnotateStreams(stdout, stderr, "GSEC") + + def _colorizePython(s): # If the colorizing module is not available, just skip colorizing. if hermann_colorize is None: Deleted: qa/trunk/testsuite/QMTest/firebird.py =================================================================== --- qa/trunk/testsuite/QMTest/firebird.py 2007-12-29 18:09:02 UTC (rev 464) +++ qa/trunk/testsuite/QMTest/firebird.py 2007-12-29 18:12:26 UTC (rev 465) @@ -1,935 +0,0 @@ -######################################################################## -# -# File: firebird.py -# Author: Pavel Cisar -# Date: 2001-10-12 -# -# Contents: -# Common, Test and Resource classes and function for Firebird QA -# -# Copyright (c) 2002 by Pavel Cisar. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation files -# (the "Software"), to deal in the Software without restriction, -# including without limitation the rights to use, copy, modify, merge, -# publish, distribute, sublicense, and/or sell copies of the Software, -# and to permit persons to whom the Software is furnished to do so, -# subject to the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# -######################################################################## - -######################################################################## -# imports -######################################################################## - -import os, errno, string, sys, time, re, difflib, kinterbasdb - -import qm.common -import qm.fields -import qm.test.base -from qm.test.result import * -from qm.test.test import * -from qm.test.resource import * -import qm.executable -import qm.web -from threading import * - -######################################################################## -# classes -######################################################################## - -class SubstitutionField(qm.fields.TextField): - """A rule for performing a text substitution. - - A 'SubstitutionField' consists of a regular expression pattern and a - corresponding replacement string. When the substitution is applied - to a body of text, all substrings that match the pattern are - replaced with the substitution string. - - The syntax for the regular expression and the substitution string is - that of the standard Python 're' (regular expression) module.""" - - class_name = "qm.test.classes.file.SubstitutionField" - - # The pattern and replacement string are encoded together into a - # single string, separated by a semicolon. Semicolons that occur - # within the pattern and replacement string are escaped with a - # backslash. - # - # Use 'SplitValue' to extract the pattern and replacement string - # from a value of this field. - - - def __init__(self, name, **properties): - """Create a new 'SubstitutionField'. - - By default, the pattern and replacement string are empty.""" - - # Initialize the base class. - apply(qm.fields.TextField.__init__, (self, name, ";"), properties) - - - def SplitValue(self, value): - """Split a value of this field into the pattern and replacement string. - - 'value' -- A value for this field. - - returns -- A pair '(pattern, replacement_string)'.""" - - # Be lenient about an empty string. - if value == "": - return ("", "") - # Break it in half. - elements = string.split(value, ";", 1) - # Unescape semicolons in both halves. - elements = map(lambda e: string.replace(e, r"\;", ";"), elements) - return elements - - - def FormatValueAsHtml(self, server, value, style, name=None): - pattern, replacement = self.SplitValue(value) - # Since we're generating HTML, escape special characters. - pattern = qm.web.escape(pattern) - replacement = qm.web.escape(replacement) - - if style in ["new", "edit"]: - result = ''' - <input type="hidden" - name="%(name)s" - value="%(value)s"/> - <table border="0" cellpadding="0" cellspacing="4"> - <tr> - <td>Pattern:</td> - <td> </td> - <td><input type="text" - size="40" - name="pattern" - onchange="update_substitution();" - value="%(pattern)s"/></td> - </tr> - <tr> - <td>Replacement:</td> - <td> </td> - <td><input type="text" - size="40" - name="substitution" - onchange="update_substitution();" - value="%(replacement)s"/></td> - </tr> - </table> - <script language="JavaScript"> - function update_substitution() - { - var pattern = document.form.pattern.value; - pattern = pattern.replace(/;/g, "\\;"); - var substitution = document.form.substitution.value; - substitution = substitution.replace(/;/g, "\\;"); - document.form.%(name)s.value = pattern + ";" + substitution; - } - </script> - ''' % locals() - return result - - elif style == "full": - return ''' - <table border="0" cellpadding="2" cellspacing="0"> - <tr valign="top"> - <td>Pattern:</td> - <td><tt>%s</tt></td> - </tr> - <tr valign="top"> - <td>Replacement:</td> - <td><tt>%s</tt></td> - </tr> - </table> - ''' % (pattern, replacement) - - else: - # For all other styles, use the base class implementation. - return qm.fields.TextField.FormatValueAsHtml( - self, value, style, name) - - - def FormatValueAsText(self, value, columns=72): - # Don't line-wrap or otherwise futz with the value. - return value - - - def GetHelp(self): - return """ - A substitution consists of a regular expression pattern and a - substitution string. When the substitution is applied, all - subtrings matching the pattern are replaced with the - substitution string. The substitution string may reference - matched groups in the pattern. - - The regular expression and substitution syntax are those of - Python's standard "'re' regular expression module" - -.. "'re' regular expression module" http://www.python.org/doc/1.5.2p2/lib/module-re.html .""" - - - -class RunServicesBase: - """A base class for Firebird QA services. - - An 'RunServicesBase' runs a program and checks its standard error output, - and exit code with expected values. The program may be provided with - command-line arguments and/or standard input. - - The run passes if the standard error is empty, and exit code is zero.""" - - - def MakeEnvironment(self, context): - """Construct the environment for executing the target program.""" - - # Start with any environment variables that are already present - # in the environment. - environment = os.environ.copy() - # Copy context variables into the environment. - for key, value in context.items(): - name = "QMV_" + key - environment[name] = value - return environment - - - def RunProgram(self, program, arguments, stdin, context, result): - """Run the 'program'. - - 'program' -- The path to the program to run. - - 'arguments' -- A list of the arguments to the program. This - list must contain a first argument corresponding to 'argv[0]'. - - 'stdin' -- Content of standard input for the program. - - 'context' -- A 'Context' giving run-time parameters to the - test. - - 'result' -- A 'Result' object. The outcome will be - 'Result.PASS' when this method is called. The 'result' may be - modified by this method to indicate outcomes other than - 'Result.PASS' or to add annotations.""" - - # Construct the environment. - environment = self.MakeEnvironment(context) - e_stdin = stdin - c = {} - for pair in context.items(): - c[pair[0]] = pair[1] - for substitution in c.keys(): - pattern = "$("+substitution.upper()+")" - replacement = context[substitution] - e_stdin = e_stdin.replace(pattern, replacement) - basename = os.path.split(arguments[0])[-1] - qm_exec = qm.executable.Filter(e_stdin, -2) - - try: - exit_status= qm_exec.Run(arguments, environment) - stdout = qm_exec.stdout - stderr = qm_exec.stderr - causes = [] - - # Check to see that the standard error matches. - if stderr: - causes.append("standard error") - result["RunProgram.stderr"] = "'''" + stderr + "'''" - # If anything went wrong, the test failed. - if causes: - result.Fail("Unexpected %s." % string.join(causes, ", ")) - except: - result.NoteException() - - - -class FirebirdService(RunServicesBase): - """Class for Firebird QA services. - - This class is used by Resource and Test classes to perform various tasks - on Firebird server or database.""" - - def __init__(self, context): - """Initialization parameters - - 'context' -- A 'Context' giving run-time parameters to the - test.""" - -# RunServiceBase.__init__() - self.__context = context - - def RestoreDatabase(self, database, backupfile, arguments, result): - """Restore a database from a backup file. - - 'database' -- A database specification. - - 'backupfile' -- A backup file name. - - 'arguments' -- A list of the arguments to the GBAK without backup file name - and database location. - - 'result' -- A 'Result' object. The outcome will be - 'Result.PASS' when this method is called. The 'result' may be - modified by this method to indicate outcomes other than - 'Result.PASS' or to add annotations.""" - - self.RunProgram("\""+self.__context["gbak_path"]+"\"", - [ self.__context["gbak_path"] ] + [ "-C ", backupfile ] - + arguments + [ database ], - "", self.__context, result) - - def RunScript(self, database, script, arguments, result): - """Run an ISQL script. - - 'database' -- A database specification. - - 'script' -- An ISQL script. - - 'arguments' -- A list of the arguments to the ISQL without database location. - - 'result' -- A 'Result' object. The outcome will be - 'Result.PASS' when this method is called. The 'result' may be - modified by this method to indicate outcomes other than - 'Result.PASS' or to add annotations.""" - - self.RunProgram("\""+self.__context["isql_path"]+"\"", - [ self.__context["isql_path"] ] + [ database ] + arguments, - script, self.__context, result) - - def RunGsec(self, script, arguments, result): - """Run an ISQL script. - - 'script' -- An (optional) GSEC script. - - 'arguments' -- A list of the arguments to the GSEC without ISC4 database location and - sysdba username and password. - - 'result' -- A 'Result' object. The outcome will be - 'Result.PASS' when this method is called. The 'result' may be - modified by this method to indicate outcomes other than - 'Result.PASS' or to add annotations.""" - try: - self.RunProgram("\""+self.__context["gsec_path"]+"\"", - [ self.__context["gsec_path"], "-database", self.__context["server_location"]+ self.__context["isc4_path"], "-user", "SYSDBA", "-password", "masterkey" ]+arguments, - script, self.__context, result) - except: - result.NoteException() - - - -class FirebirdDatabaseResource(Resource): - """Resource class to manage a Firebird Database. - - An instance of this resource creates a Firebird database during - setup, and deletes it during cleanup. The full path to the - database is available to tests via a context property. - - This class needs some context properties set to work properly. - These properties are server_location, database_location, - gbak_path and isql_path. Please refer to the Firebird QA documentation - for details about these properties.""" - - arguments = [ - qm.fields.TextField( - name="database_path_property", - title="Database Path Property Name", - description="The name of the context property which is " - "set to the path to the database.", - default_value="database_path" - ), - qm.fields.TextField( - name="database_name", - title="Database Name", - description="""The Database name. - - This value is concatenated with server and database location from - context.""", - default_value="database_name" - ), - qm.fields.TextField( - name="user_name", - title="User Name", - description="The name of the user / owner for created database.", - default_value="SYSDBA" - ), - qm.fields.TextField( - name="user_password", - title="User Password", - description="The password of the user / owner for created database.", - default_value="masterkey" - ), - qm.fields.EnumerationField( - name="character_set", - title="Character set", - description="Default character set for database", - enumerals = ["NONE","ASCII","BIG_5","CYRL","DOS437","DOS850","DOS852", - "DOS857","DOS860","DOS861","DOS863","DOS865","EUCJ_0208","GB_2312", - "ISO8859_1","KSC_5601","NEXT","OCTETS","SJIS_0208","UNICODE_FSS", - "WIN1250","WIN1251","WIN1252","WIN1253","WIN1254","LATIN2"], - default_value="NONE", - ), - qm.fields.EnumerationField( - name="page_size", - title="Page size", - description="Page size for new database (defaults to 4096).", - enumerals = ["1024","2048","4096","8192","16384"], - default_value="4096", - ), - qm.fields.EnumerationField( - name="sql_dialect", - title="SQL dialect", - description="The SQL dialect under which to execute the statement " - "(defaults to 3).", - enumerals = ["1","2","3"], - default_value="3", - ), - qm.fields.TextField( - name="backup_file", - title="Backup File", - description="""The full path to a backup file. - - If specified, new database is restored from this backup file.""", - ), - qm.fields.TextField( - name="init_script", - title="Database Initialization Script", - description="""The contents of the database initialization SQL script. - - This script is executed by isql to initialize new database resource. - Leave it empty if you don't need to create objects in new database or - when you use backup file to create it.""", - verbatim="true", - multiline="true" - ), - ] - - def SetUp(self, context, result): - # Generate a database. - self.__FirebirdServices = FirebirdService(context) - self.__database_path = "".join((context["server_location"], \ - context["database_location"],self.database_name)) - context["user_name"] = self.user_name - context["user_password"] = self.user_password - if self.backup_file: - try: - self.__FirebirdServices.RestoreDatabase(context["database_location"]+self.database_name, - self.backup_file, - ["-P",self.page_size,"-user",self.user_name,"-password",self.user_password], - result) - except: - result.NoteException() - - else: - # Setup succeeded. Store the path to the database where - # tests can get at it. - context[self.database_path_property] = self.__database_path - - else: - self.__sql_statement = "CREATE DATABASE '"+self.__database_path + \ - "' USER '"+self.user_name+"' PASSWORD '"+self.user_password + \ - "' PAGE_SIZE "+self.page_size+" DEFAULT CHARACTER SET " + \ - self.character_set -# print self.__sql_statement - try: - # Create the database. - self.__con = kinterbasdb.create_database(self.__sql_statement,int(self.sql_dialect)) - self.__con.close() -# print "Database created !" - if self.init_script: - try: - self.__FirebirdServices.RunScript(context["database_location"]+self.database_name, - self.init_script, - ["-user",self.user_name,"-password",self.user_password], - result) - except: - result.NoteException() - except Exception, error: - # Setup failed. - cause = "Database creation failed. %s" % str(error) - result.Fail(cause) - else: - # Setup succeeded. Store the path to the database where - # tests can get at it. - context[self.database_path_property] = self.__database_path - - def CleanUp(self, result): - # Drop a database. - try: - self.__con = kinterbasdb.connect(dsn=str(self.__database_path), \ - user=str(self.user_name), password=str(self.user_password)) - self.__con.drop_database() - except Exception, error: - # Cleanup failed. - cause = "Database deletion failed. %s" % str(error) - result.Fail(cause) -# else: -# pass - - -class FirebirdInitScriptResource(Resource): - """Resource class to initialize a Firebird Database by given ISQL script. - - An instance of this resource must have a Firebird database resource - as prerequisite resource. An ISQL script is run on this database to - provide additional, test-specific initialization for database resource. - Any changes made to the database will persist, and it's not deleted - during cleanup. - - This class needs some context properties set to work properly. - These properties are server_location, database_path (provided by Database resource) - and isql_path. Please refer to the Firebird QA documentation for - details about these properties.""" - - arguments = [ - qm.fields.TextField( - name="database_path_property", - title="Database Path Property Name", - description="The name of the context property which is " - "set to the path to the database by Database Resource.", - default_value="database_path" - ), - qm.fields.EnumerationField( - name="sql_dialect", - title="SQL dialect", - description="The SQL dialect under which to execute the statement " - "(defaults to 3).", - enumerals = ["1","2","3"], - default_value="3", - ), - qm.fields.TextField( - name="init_script", - title="Database Initialization Script", - description="""The contents of the database initialization SQL script. - - This script is executed by isql to initialize new database resource. - Leave it empty if you don't need to create objects in new database or - when you use backup file to create it.""", - verbatim="true", - multiline="true" - ), - ] - - def SetUp(self, context, result): - # Run a script. - self.__FirebirdServices = FirebirdService(context) - try: - self.__FirebirdServices.RunScript(context[self.database_path_property], - self.init_script, - ["-user",self.user_name,"-password",self.user_password], - result) - except: - result.NoteException() - - def CleanUp(self, result): - # Drop a script ? - pass - - -class FirebirdUserResource(Resource): - """Resource class to manage a Firebird User. - - An instance of this resource creates a Firebird user during - setup, and deletes it during cleanup. - - This class needs some context properties set to work properly. - These properties are server_location, gsec_path and isc4_path. - Please refer to the Firebird QA documentation for details about these properties.""" - - arguments = [ - qm.fields.TextField( - name="user_name", - title="User Name", - description="The name of the user.", - default_value="USER1" - ), - qm.fields.TextField( - name="user_password", - title="User Password", - description="The password of the user.", - default_value="firebirdqa" - ), - qm.fields.IntegerField( - name="uid", - title="User ID", - description="", - ), - qm.fields.IntegerField( - name="gid", - title="Group ID", - description="", - ), - ] - - def SetUp(self, context, result): - # Create a user. - self.__FirebirdServices = FirebirdService(context) - try: - self.__FirebirdServices.RunGsec("", [ "-add",str(self.user_name),"-pw",str(self.user_password), - "-uid",str(self.uid),"-gid",str(self.gid) ], - result) - - except: - result.NoteException() - - def CleanUp(self, result): - # Drop a user. - try: - self.__FirebirdServices.RunGsec("", [ "-delete",self.user_name], result) -# print "Delete %s" % self.user_name - except: - result.NoteException() - - - -class FirebirdTestBase(Test): - """A base class for Firebird tests. - - An 'FirebirdTestBase' introduce common attributes and functionality for Firebird tests. - """ - - arguments = [ - qm.fields.TextField( - name="test_id", - title="Test ID", - not_empty_text=1, - description="""An unique ID assigned to test. - - The ID is usualy constructed as author's name and sequence number. - For example: skopalik_0001""" - ), - qm.fields.TextField( - name="author", - title="Author", - not_empty_text=1, - description="""Author's nickname. - - Use the nickname listed in AUTHORS.TXT. For new test authors, don't forget - to add appropriate record (nickname and e-mail) in this file!""" - ), - qm.fields.TextField( - name="bug_id", - title="Bug identifier", - description="""Bug Identifier - - If this test covers a bug, it should have a bug tracker entry. - Enter the ID from bug tracker here (usualy a number).""" - ), - qm.fields.EnumerationField( - name="test_type", - title="Type of test", - description="""Test could be positive or negative (defaults to POSITIVE). - - Positive test checks if something pass without error, - while negative test checks if something fail.""", - enumerals = ["Positive","Negative"], - default_value="Positive", - ), - qm.fields.TextField( - name="title", - title="Title", - not_empty_text=1, - description="""Short descriptive title. - - This is a short, descriptive name for test. Should describe what's tested. - For example: ALTER DATABASE ADD FILE""" - ), - qm.fields.TextField( - name="description", - title="Description", - verbatim="true", - multiline="true", - description="""Full test description. - - Please describe how the test is supposed to work, what's tested and how, - possible points of failure etc.""" - ) - ] - - -class FirebirdISQLTestBase(FirebirdTestBase): - """Check a program's output and exit code. - - An 'FirebirdExecTestBase' runs a program and compares its standard output, - standard error, and exit code with expected values. The program - may be provided with command-line arguments and/or standard - input. - - The test passes if the standard output, standard error, and - exit code are identical to the expected values.""" - - arguments = [ - qm.fields.TextField( - name="stdin", - title="Standard Input", - verbatim="true", - multiline="true", - description="""The contents of the standard input stream. - - If this field is left blank, the standard input stream will - contain no data.""" - ), - - qm.fields.SetField(qm.fields.TextField( - name="environment", - title="Environment", - description="""Additional environment variables. - - By default, QMTest runs tests with the same environment that - QMTest is running in. If you run tests in parallel, or - using a remote machine, the environment variables available - will be dependent on the context in which the remote test - is executing. - - You may add variables to the environment. Each entry must - be of the form 'VAR=VAL'. The program will be run in an - environment where the environment variable 'VAR' has the - value 'VAL'. If 'VAR' already had a value in the - environment, it will be replaced with 'VAL'. - - In addition, QMTest automatically adds an environment - variable corresponding to each context property. The name - of the environment variable is the name of the context - property, prefixed with 'QMV_'. For example, if the value - of the context property named 'target' is available in the - environment variable 'QMV_target'.""" )), - - qm.fields.IntegerField( - name="exit_code", - title="Exit Code", - description="""The expected exit code. - - Most programs use a zero exit code to indicate success and a - non-zero exit code to indicate failure. Under Windows, - QMTest does not accurately report the exit code of the - program; all programs are treated as if they exited with - code zero.""" - ), - - qm.fields.TextField( - name="stdout", - title="Standard Output", - verbatim="true", - multiline="true", - description="""The expected contents of the standard output stream. - - If the output written by the program does not match this - value, the test will fail.""" - ), - - qm.fields.TextField( - name="stderr", - title="Standard Error", - verbatim="true", - multiline="true", - description="""The expected contents of the standard error stream. - - If the output written by the program does not match this - value, the test will fail.""" - ), - qm.fields.SetField(SubstitutionField( - name="substitutions", - title="Substitutions", - description="""Regular expression substitutions. - - Each substitution will be applied to both the expected and - actual stdout of the ISQl. The comparison will be - performed after the substitutions have been performed. - - You can use substitutions to ignore insignificant - differences between the expected and autual ISQL output.""")) - ] - - - def MakeEnvironment(self, context): - """Construct the environment for executing the target program.""" - - # Start with any environment variables that are already present - # in the environment. - environment = os.environ.copy() - # Copy context variables into the environment. - for key, value in context.items(): - name = "QMV_" + key - environment[name] = value - # Extract additional environment variable assignments from the - # 'Environment' field. - for assignment in self.environment: - if "=" in assignment: - # Break the assignment at the first equals sign. - variable, value = string.split(assignment, "=", 1) - environment[variable] = value - else: - raise ValueError, \ - qm.error("invalid environment assignment", - assignment=assignment) - return environment - - - def RunProgram(self, program, arguments, context, result): - """Run the 'program'. - - 'program' -- The path to the program to run. - - 'arguments' -- A list of the arguments to the program. This - list must contain a first argument corresponding to 'argv[0]'. - - 'context' -- A 'Context' giving run-time parameters to the - test. - - 'result' -- A 'Result' object. The outcome will be - 'Result.PASS' when this method is called. The 'result' may be - modified by this method to indicate outcomes other than - 'Result.PASS' or to add annotations.""" - - # Construct the environment. - environment = self.MakeEnvironment(context) - e_stdin = self.stdin - c = {} - for pair in context.items(): - c[pair[0]] = pair[1] - for substitution in c.keys(): - pattern = "$("+substitution.upper()+")" - replacement = context[substitution] - e_stdin = e_stdin.replace(pattern, replacement) - - basename = os.path.split(arguments[0])[-1] - qm_exec = qm.executable.Filter(e_stdin, -2) - - try: - exit_status= qm_exec.Run(arguments, environment) - stdout = qm_exec.stdout - stderr = qm_exec.stderr - causes = [] - - if sys.platform != "win32": - if os.WIFEXITED(exit_status): - if exit_status != self.exit_code: - causes.append("exit_code") - result["RunProgram.exit_code"] = str(exit_status) - elif os.WIFSIGNALED(exit_status): - self.__cause= "Process %s terminated by signal %d." % (basename, os.WTERMSIG(exit_status)) - - elif os.WIFSTOPPED(exit_status): - self.__cause= "Process %s stopped by signal %d." % (basename, os.WSTOPSIG(exit_status)) - - else: - self.__cause= "Process %s terminated abnormally." % basename - - # Check to see if the standard output matches. - # First strip out ISQL junk - stdout_stripped = re.sub("Database:.*\n","",stdout) - stdout_stripped = re.sub("SQL>\s*","",stdout_stripped) - stdout_stripped = re.sub("CON>\s*","",stdout_stripped) - stdout_stripped = re.sub("-->\s*","",stdout_stripped) - stdout_stripped = self.__PerformSubstitutions(stdout_stripped) - stdout_stripped = re.compile("^\s+",re.I+re.M).sub("",stdout_stripped) - stdout_stripped = re.compile("\s+$",re.I+re.M).sub("",stdout_stripped) - - self.stdout_stripped = re.sub("Database:.*\n","",self.stdout) - self.stdout_stripped = re.sub("SQL>\s*","",self.stdout_stripped) - self.stdout_stripped = re.sub("CON>\s*","",self.stdout_stripped) - self.stdout_stripped = re.sub("-->\s*","",self.stdout_stripped) - self.stdout_stripped = self.__PerformSubstitutions(self.stdout_stripped) - self.stdout_stripped = re.compile("^\s+",re.I+re.M).sub("",self.stdout_stripped) - self.stdout_stripped = re.compile("\s+$",re.I+re.M).sub("",self.stdout_stripped) - - if stdout_stripped != self.stdout_stripped: - causes.append("standard output") - result["ExecTest.stdin"] = "<pre>" + e_stdin + "</pre>" - result["ExecTest.stdout_expected"] = "<pre>" + self.stdout + "</pre>" - result["ExecTest.stdout"] = "<pre>" + stdout + "</pre>" - result["ExecTest.stdout_stripped"] = "<pre>" + stdout_stripped + "</pre>" - result["ExecTest.stdout_stripped_expected"] = "<pre>" + self.stdout_stripped + "</pre>" - result["ExecTest.stripped_diff"] = "<pre>"+'\n'.join(difflib.ndiff(stdout_stripped.splitlines(0),self.stdout_stripped.splitlines(0)))+"</pre>" - # Check to see that the standard error matches. - stderr_stripped = re.sub("Use CONNECT or CREATE DATABASE to specify a database.*\n","",stderr) - if stderr_stripped != self.stderr: - causes.append("standard error") - result["ExecTest.stdin"] = "<pre>" + e_stdin + "</pre>" - result["ExecTest.stderr"] = "<pre>" + stderr + "</pre>" - result["ExecTest.expected_stderr"] = "<pre>" + self.stderr + "</pre>" - # If anything went wrong, the test failed. - if causes: - result.Fail("Unexpected %s." % string.join(causes, ", ")) - except: - result.NoteException() - - - def SplitValue(self, value): - """Split a value of this field into the pattern and replacement string. - - 'value' -- A value for this field. - - returns -- A pair '(pattern, replacement_string)'.""" - - # Be lenient about an empty string. - if value == "": - return ("", "") - # Break it in half. - elements = string.split(value, ";", 1) - # Unescape semicolons in both halves. - elements = map(lambda e: string.replace(e, r"\;", ";"), elements) - return elements - - def __PerformSubstitutions(self, text): - """Perform substitutions on a body of text. - - returns -- The string 'text', processed with the substitutions - configured for this test instance.""" - - for substitution in self.substitutions: - pattern, replacement = self.SplitValue(substitution) - text = re.compile(pattern,re.M).sub(replacement, text) - return text - - -class FirebirdISQLTest(FirebirdISQLTestBase): - """Check a program's output and exit code. - - An 'FirebirdISQLTest' runs ISQL by using the 'exec' system call.""" - - def Run(self, context, result): - """Run the test. - - 'context' -- A 'Context' giving run-time parameters to the - test. - - 'result' -- A 'Result' object. The outcome will be - 'Result.PASS' when this method is called. The 'result' may be - modified by this method to indicate outcomes other than - 'Result.PASS' or to add annotations.""" - - # Was the program not specified? - - self.program = context["isql_path"] - - if context.has_key("database_path"): - database = context["database_path"] - else: - database = "" - self.RunProgram(self.program, - [ self.program , database , - "-user", context["user_name"], "-password", context["user_password"] ], - context, result) - - - - - -######################################################################## -# Local Variables: -# mode: python -# indent-tabs-mode: nil -# fill-column: 72 -# End: Modified: qa/trunk/testsuite/resources.qms/test_user.qma =================================================================== --- qa/trunk/testsuite/resources.qms/test_user.qma 2007-12-29 18:09:02 UTC (rev 464) +++ qa/trunk/testsuite/resources.qms/test_user.qma 2007-12-29 18:12:26 UTC (rev 465) @@ -1,2 +1,2 @@ <?xml version="1.0" ?> -<extension class="firebird.FirebirdUserResource" kind="resource"><argument name="user_password"><text>test</text></argument><argument name="gid"><integer>0</integer></argument><argument name="user_name"><text>TEST</text></argument><argument name="uid"><integer>0</integer></argument></extension> \ No newline at end of file +<extension class="fbqa.FirebirdUserResource" kind="resource"><argument name="newuser_password"><text>test</text></argument><argument name="newuser_name"><text>TEST</text></argument></extension> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pc...@us...> - 2007-12-29 18:42:51
|
Revision: 467 http://firebird.svn.sourceforge.net/firebird/?rev=467&view=rev Author: pcisar Date: 2007-12-29 10:42:55 -0800 (Sat, 29 Dec 2007) Log Message: ----------- QA-141 - Test for CORE-1292 Added Paths: ----------- qa/trunk/testsuite/bugs.qms/core_1292.qmt qa/trunk/testsuite/resources.qms/longname.qma Added: qa/trunk/testsuite/bugs.qms/core_1292.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1292.qmt (rev 0) +++ qa/trunk/testsuite/bugs.qms/core_1292.qmt 2007-12-29 18:42:55 UTC (rev 467) @@ -0,0 +1,5 @@ +<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.4/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.4/-//qm/2.4/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>firebirdqa</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>N INTEGER Nullable +</text></argument><argument name="character_set"><enumeral>UTF8</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>testtesttest</text></argument><argument name="resources"><set><text>resources.longname</text></set></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.0.2</text></argument><argument name="description"><text/></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1292</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>database_name</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>create table t (n integer); + +show table t; +</text></argument><argument name="test_id"><text>core_1292</text></argument><argument name="target_platform"><text>All</text></argument><argument name="insert_statement"><text/></argument><argument name="test_expr"><text/></argument><argument name="statement_type_and_result"><enumeral>SQL: String</enumeral></argument><argument name="prerequisites"><set/></argument><argument name="title"><text>Can't create table using long username and UTF8 as attachment charset</text></argument><argument name="drop_db"><enumeral>true</enumeral></argument><argument name="db_path_property"><text>database_location</text></argument></extension> \ No newline at end of file Added: qa/trunk/testsuite/resources.qms/longname.qma =================================================================== --- qa/trunk/testsuite/resources.qms/longname.qma (rev 0) +++ qa/trunk/testsuite/resources.qms/longname.qma 2007-12-29 18:42:55 UTC (rev 467) @@ -0,0 +1 @@ +<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.4/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.4/-//qm/2.4/extension//en.dtd'><extension class="fbqa.FirebirdUserResource" kind="resource"><argument name="newuser_password"><text>firebirdqa</text></argument><argument name="resources"><set/></argument><argument name="newuser_name"><text>testtesttest</text></argument></extension> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mak...@us...> - 2008-02-26 11:13:01
|
Revision: 501 http://firebird.svn.sourceforge.net/firebird/?rev=501&view=rev Author: makowski Date: 2008-02-26 03:13:00 -0800 (Tue, 26 Feb 2008) Log Message: ----------- 2.1RC1 cleanup Modified Paths: -------------- qa/trunk/testsuite/bugs.qms/core_1263.qmt qa/trunk/testsuite/bugs.qms/core_878.qmt qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_62.qmt qa/trunk/testsuite/functional.qms/table.qms/create.qms/create_table_12.qmt qa/trunk/testsuite/functional.qms/table.qms/create.qms/create_table_13.qmt Modified: qa/trunk/testsuite/bugs.qms/core_1263.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_1263.qmt 2008-02-24 17:09:00 UTC (rev 500) +++ qa/trunk/testsuite/bugs.qms/core_1263.qmt 2008-02-26 11:13:00 UTC (rev 501) @@ -1,9 +1,13 @@ -<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.4/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.4/-//qm/2.4/extension//en.dtd'><extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>GSEC> invalid switch specified in interactive mode -GSEC> invalid switch specified in interactive mode -GSEC> invalid switch specified in interactive mode -GSEC> invalid switch specified in interactive mode -GSEC> invalid switch specified in interactive mode -GSEC> invalid switch specified in interactive mode +<?xml version="1.0" ?> +<!DOCTYPE extension + PUBLIC '-//QM/2.3/Extension//EN' + 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>GSEC> Invalid switch specified in interactive mode +GSEC> Invalid switch specified in interactive mode +GSEC> Invalid switch specified in interactive mode +GSEC> Invalid switch specified in interactive mode +GSEC> Invalid switch specified in interactive mode +GSEC> Invalid switch specified in interactive mode GSEC> </text></argument><argument name="character_set"><enumeral>NONE</enumeral></argument><argument name="author"><text>pcisar</text></argument><argument name="page_size"><enumeral>Default</enumeral></argument><argument name="substitutions"><set/></argument><argument name="backup_file_path"><text/></argument><argument name="user_name"><text>SYSDBA</text></argument><argument name="resources"><set/></argument><argument name="expected_stderr"><text/></argument><argument name="target_version"><text>2.1</text></argument><argument name="description"><text/></argument><argument name="target_group"><text>.*</text></argument><argument name="populate_method"><enumeral>None (manual)</enumeral></argument><argument name="bug_id"><text>CORE-1263</text></argument><argument name="data_tuple"><text/></argument><argument name="db_name"><text>bug.fdb</text></argument><argument name="isql_script"><text/></argument><argument name="source_code"><text>commands = """add BADPARAM -pa PWD add BADPARAM -pas PWD add BADPARAM -password PWD Modified: qa/trunk/testsuite/bugs.qms/core_878.qmt =================================================================== --- qa/trunk/testsuite/bugs.qms/core_878.qmt 2008-02-24 17:09:00 UTC (rev 500) +++ qa/trunk/testsuite/bugs.qms/core_878.qmt 2008-02-26 11:13:00 UTC (rev 501) @@ -5,7 +5,7 @@ <extension class="fbqa.FirebirdTest" kind="test"><argument name="create_db_method"><enumeral>Create New</enumeral></argument><argument name="user_password"><text>masterkey</text></argument><argument name="sql_dialect"><enumeral>3</enumeral></argument><argument name="result_string"><text>I1 INTEGER Not Null I2 INTEGER Nullable CONSTRAINT INTEG_2: - Primary key (I1) uses explicit ascending index RDB$PRIMARY1 + Primary key (I1) I1 INTEGER Not Null I2 INTEGER Nullable CONSTRAINT PK2_PK: @@ -13,7 +13,7 @@ I1 INTEGER Not Null I2 INTEGER Nullable CONSTRAINT INTEG_5: - Primary key (I1) uses explicit ascending index RDB$PRIMARY2 + Primary key (I1) I2 INTEGER Nullable I2 INTEGER Nullable I2 INTEGER Nullable Modified: qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_62.qmt =================================================================== --- qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_62.qmt 2008-02-24 17:09:00 UTC (rev 500) +++ qa/trunk/testsuite/functional.qms/basic.qms/db.qms/db_62.qmt 2008-02-26 11:13:00 UTC (rev 501) @@ -46,11 +46,16 @@ RDB$TRIGGER_TYPE 4 POST_MODIFY <null> 1 RDB$TRIGGER_TYPE 5 PRE_ERASE <null> 1 RDB$TRIGGER_TYPE 6 POST_ERASE <null> 1 -RDB$OBJECT_TYPE 0 RELATION <null> 1 -RDB$OBJECT_TYPE 1 VIEW <null> 1 +RDB$TRIGGER_TYPE 8192 CONNECT <null> 1 +RDB$TRIGGER_TYPE 8193 DISCONNECT <null> 1 RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG =============================================================================== ======== =============================================================================== ================= =============== +RDB$TRIGGER_TYPE 8194 TRANSACTION_START <null> 1 +RDB$TRIGGER_TYPE 8195 TRANSACTION_COMMIT <null> 1 +RDB$TRIGGER_TYPE 8196 TRANSACTION_ROLLBACK <null> 1 +RDB$OBJECT_TYPE 0 RELATION <null> 1 +RDB$OBJECT_TYPE 1 VIEW <null> 1 RDB$OBJECT_TYPE 2 TRIGGER <null> 1 RDB$OBJECT_TYPE 3 COMPUTED_FIELD <null> 1 RDB$OBJECT_TYPE 4 VALIDATION <null> 1 @@ -66,14 +71,14 @@ RDB$OBJECT_TYPE 15 UDF <null> 1 RDB$OBJECT_TYPE 16 BLOB_FILTER <null> 1 RDB$OBJECT_TYPE 17 COLLATION <null> 1 + +RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG +=============================================================================== ======== =============================================================================== ================= =============== RDB$TRANSACTION_STATE 1 LIMBO <null> 1 RDB$TRANSACTION_STATE 2 COMMITTED <null> 1 RDB$TRANSACTION_STATE 3 ROLLED_BACK <null> 1 RDB$SYSTEM_FLAG 0 USER <null> 1 RDB$SYSTEM_FLAG 1 SYSTEM <null> 1 - -RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG -=============================================================================== ======== =============================================================================== ================= =============== RDB$SYSTEM_FLAG 2 QLI <null> 1 RDB$SYSTEM_FLAG 3 CHECK_CONSTRAINT <null> 1 RDB$SYSTEM_FLAG 4 REFERENTIAL_CONSTRAINT <null> 1 @@ -89,14 +94,14 @@ RDB$PROCEDURE_TYPE 2 EXECUTABLE <null> 1 RDB$PARAMETER_MECHANISM 0 NORMAL <null> 1 RDB$PARAMETER_MECHANISM 1 TYPE OF <null> 1 + +RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG +=============================================================================== ======== =============================================================================== ================= =============== MON$STATE 0 IDLE <null> 1 MON$STATE 1 ACTIVE <null> 1 MON$SHUTDOWN_MODE 0 ONLINE <null> 1 MON$SHUTDOWN_MODE 1 MULTI_USER_SHUTDOWN <null> 1 MON$SHUTDOWN_MODE 2 SINGLE_USER_SHUTDOWN <null> 1 - -RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG -=============================================================================== ======== =============================================================================== ================= =============== MON$SHUTDOWN_MODE 3 FULL_SHUTDOWN <null> 1 MON$ISOLATION_MODE 0 CONSISTENCY <null> 1 MON$ISOLATION_MODE 1 CONCURRENCY <null> 1 @@ -112,14 +117,14 @@ MON$STAT_GROUP 4 CALL <null> 1 RDB$CHARACTER_SET_NAME 0 NONE <null> 1 RDB$CHARACTER_SET_NAME 1 OCTETS <null> 1 + +RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG +=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 1 BINARY <null> 1 RDB$CHARACTER_SET_NAME 2 ASCII <null> 1 RDB$CHARACTER_SET_NAME 2 USASCII <null> 1 RDB$CHARACTER_SET_NAME 2 ASCII7 <null> 1 RDB$CHARACTER_SET_NAME 3 UNICODE_FSS <null> 1 - -RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG -=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 3 UTF_FSS <null> 1 RDB$CHARACTER_SET_NAME 3 SQL_TEXT <null> 1 RDB$CHARACTER_SET_NAME 4 UTF8 <null> 1 @@ -135,14 +140,14 @@ RDB$CHARACTER_SET_NAME 12 DOS865 <null> 1 RDB$CHARACTER_SET_NAME 12 DOS_865 <null> 1 RDB$CHARACTER_SET_NAME 21 ISO8859_1 <null> 1 + +RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG +=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 21 ISO8859_1 <null> 1 RDB$CHARACTER_SET_NAME 21 ISO88591 <null> 1 RDB$CHARACTER_SET_NAME 21 LATIN1 <null> 1 RDB$CHARACTER_SET_NAME 21 ANSI <null> 1 RDB$CHARACTER_SET_NAME 22 ISO8859_2 <null> 1 - -RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG -=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 22 ISO8859_2 <null> 1 RDB$CHARACTER_SET_NAME 22 ISO88592 <null> 1 RDB$CHARACTER_SET_NAME 22 LATIN2 <null> 1 @@ -158,14 +163,14 @@ RDB$CHARACTER_SET_NAME 34 LATIN4 <null> 1 RDB$CHARACTER_SET_NAME 34 ISO-8859-4 <null> 1 RDB$CHARACTER_SET_NAME 35 ISO8859_5 <null> 1 + +RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG +=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 35 ISO8859_5 <null> 1 RDB$CHARACTER_SET_NAME 35 ISO88595 <null> 1 RDB$CHARACTER_SET_NAME 35 ISO-8859-5 <null> 1 RDB$CHARACTER_SET_NAME 36 ISO8859_6 <null> 1 RDB$CHARACTER_SET_NAME 36 ISO8859_6 <null> 1 - -RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG -=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 36 ISO88596 <null> 1 RDB$CHARACTER_SET_NAME 36 ISO-8859-6 <null> 1 RDB$CHARACTER_SET_NAME 37 ISO8859_7 <null> 1 @@ -181,14 +186,14 @@ RDB$CHARACTER_SET_NAME 39 ISO88599 <null> 1 RDB$CHARACTER_SET_NAME 39 LATIN5 <null> 1 RDB$CHARACTER_SET_NAME 39 ISO-8859-9 <null> 1 + +RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG +=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 40 ISO8859_13 <null> 1 RDB$CHARACTER_SET_NAME 40 ISO8859_13 <null> 1 RDB$CHARACTER_SET_NAME 40 ISO885913 <null> 1 RDB$CHARACTER_SET_NAME 40 LATIN7 <null> 1 RDB$CHARACTER_SET_NAME 40 ISO-8859-13 <null> 1 - -RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG -=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 45 DOS852 <null> 1 RDB$CHARACTER_SET_NAME 45 DOS_852 <null> 1 RDB$CHARACTER_SET_NAME 46 DOS857 <null> 1 @@ -204,14 +209,14 @@ RDB$CHARACTER_SET_NAME 9 DOS_737 <null> 1 RDB$CHARACTER_SET_NAME 15 DOS775 <null> 1 RDB$CHARACTER_SET_NAME 15 DOS_775 <null> 1 + +RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG +=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 16 DOS858 <null> 1 RDB$CHARACTER_SET_NAME 16 DOS_858 <null> 1 RDB$CHARACTER_SET_NAME 17 DOS862 <null> 1 RDB$CHARACTER_SET_NAME 17 DOS_862 <null> 1 RDB$CHARACTER_SET_NAME 18 DOS864 <null> 1 - -RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG -=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 18 DOS_864 <null> 1 RDB$CHARACTER_SET_NAME 48 DOS866 <null> 1 RDB$CHARACTER_SET_NAME 48 DOS_866 <null> 1 @@ -227,14 +232,14 @@ RDB$CHARACTER_SET_NAME 54 WIN_1253 <null> 1 RDB$CHARACTER_SET_NAME 55 WIN1254 <null> 1 RDB$CHARACTER_SET_NAME 55 WIN_1254 <null> 1 + +RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG +=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 19 NEXT <null> 1 RDB$CHARACTER_SET_NAME 58 WIN1255 <null> 1 RDB$CHARACTER_SET_NAME 58 WIN_1255 <null> 1 RDB$CHARACTER_SET_NAME 59 WIN1256 <null> 1 RDB$CHARACTER_SET_NAME 59 WIN_1256 <null> 1 - -RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG -=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 60 WIN1257 <null> 1 RDB$CHARACTER_SET_NAME 60 WIN_1257 <null> 1 RDB$CHARACTER_SET_NAME 44 KSC_5601 <null> 1 @@ -250,6 +255,9 @@ RDB$CHARACTER_SET_NAME 57 DOS_936 <null> 1 RDB$CHARACTER_SET_NAME 57 WIN_936 <null> 1 RDB$CHARACTER_SET_NAME 63 KOI8R <null> 1 + +RDB$FIELD_NAME RDB$TYPE RDB$TYPE_NAME RDB$DESCRIPTION RDB$SYSTEM_FLAG +=============================================================================== ======== =============================================================================== ================= =============== RDB$CHARACTER_SET_NAME 64 KOI8U <null> 1 RDB$CHARACTER_SET_NAME 65 WIN1258 <null> 1 RDB$CHARACTER_SET_NAME 66 TIS620 <null> 1 Modified: qa/trunk/testsuite/functional.qms/table.qms/create.qms/create_table_12.qmt =================================================================== --- qa/trunk/testsuite/functional.qms/table.qms/create.qms/create_table_12.qmt 2008-02-24 17:09:00 UTC (rev 500) +++ qa/trunk/testsuite/functional.qms/table.qms/create.qms/create_table_12.qmt 2008-02-26 11:13:00 UTC (rev 501) @@ -10,7 +10,7 @@ CONSTRAINT TEST2: Foreign key (C3) References FK (ID) On Delete Set Null CONSTRAINT INTEG_6: - Primary key (C1) uses explicit ascending index RDB$PRIMARY2 + Primary key (C1) CONSTRAINT INTEG_7: Unique key (C2) CONSTRAINT TEST: Modified: qa/trunk/testsuite/functional.qms/table.qms/create.qms/create_table_13.qmt =================================================================== --- qa/trunk/testsuite/functional.qms/table.qms/create.qms/create_table_13.qmt 2008-02-24 17:09:00 UTC (rev 500) +++ qa/trunk/testsuite/functional.qms/table.qms/create.qms/create_table_13.qmt 2008-02-26 11:13:00 UTC (rev 501) @@ -14,7 +14,7 @@ CONSTRAINT INTEG_8: Foreign key (C5) References FK (ID) CONSTRAINT INTEG_7: - Primary key (C4) uses explicit ascending index RDB$PRIMARY3 + Primary key (C4) CONSTRAINT INTEG_5: Unique key (C3) CONSTRAINT INTEG_9: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |