| 
      
      
      From: <di...@us...> - 2012-07-11 12:54:15
      
     | 
| Revision: 54713
          http://firebird.svn.sourceforge.net/firebird/?rev=54713&view=rev
Author:   dimitr
Date:     2012-07-11 12:54:08 +0000 (Wed, 11 Jul 2012)
Log Message:
-----------
Wiped out the legacy compatibility option.
Modified Paths:
--------------
    firebird/trunk/builds/install/misc/firebird.conf.in
    firebird/trunk/src/common/config/config.cpp
    firebird/trunk/src/common/config/config.h
    firebird/trunk/src/dsql/StmtNodes.cpp
Modified: firebird/trunk/builds/install/misc/firebird.conf.in
===================================================================
--- firebird/trunk/builds/install/misc/firebird.conf.in	2012-07-11 05:26:28 UTC (rev 54712)
+++ firebird/trunk/builds/install/misc/firebird.conf.in	2012-07-11 12:54:08 UTC (rev 54713)
@@ -444,28 +444,6 @@
 #BugcheckAbort = 0
 
 
-# Prior to Firebird 2.5 the SET clause of the UPDATE statement assigned
-# columns in the user-defined order with the NEW column values being
-# immediately accessible to the subsequent assignments. This did not
-# conform to the SQL standard. Starting with Firebird 2.5, only OLD column
-# values are accessible to all the assignments of the SET clause.
-#
-# Example of the old vs new behaviour:
-#
-# UPDATE T SET A = B, B = A
-# old result: A gets equal to B, B doesn't change
-# new result: A and B get their values exchanged
-#
-# Change this configuration option to 1 (true) only if your SQL code relies
-# on the legacy semantics of the SET clause. It's provided as a temporary
-# solution for backward compatibility issues and will be deprecated in
-# future Firebird versions.
-#
-# Type: boolean
-#
-#OldSetClauseSemantics = 0
-
-
 # ----------------------------
 # Relaxing relation alias checking rules in SQL
 #
Modified: firebird/trunk/src/common/config/config.cpp
===================================================================
--- firebird/trunk/src/common/config/config.cpp	2012-07-11 05:26:28 UTC (rev 54712)
+++ firebird/trunk/src/common/config/config.cpp	2012-07-11 12:54:08 UTC (rev 54713)
@@ -162,7 +162,6 @@
 	{TYPE_INTEGER,		"DatabaseGrowthIncrement",	(ConfigValue) 128 * 1048576},	// bytes
 	{TYPE_INTEGER,		"FileSystemCacheThreshold",	(ConfigValue) 65536},	// page buffers
 	{TYPE_BOOLEAN,		"RelaxedAliasChecking",		(ConfigValue) false},	// if true relax strict alias checking rules in DSQL a bit
-	{TYPE_BOOLEAN,		"OldSetClauseSemantics",	(ConfigValue) false},	// if true disallow SET A = B, B = A to exchange column values
 	{TYPE_STRING,		"AuditTraceConfigFile",		(ConfigValue) ""},		// location of audit trace configuration file
 	{TYPE_INTEGER,		"MaxUserTraceLogSize",		(ConfigValue) 10},		// maximum size of user session trace log
 	{TYPE_INTEGER,		"FileSystemCacheSize",		(ConfigValue) 0},		// percent
@@ -623,11 +622,6 @@
 	return (bool) getDefaultConfig()->values[KEY_RELAXED_ALIAS_CHECKING];
 }
 
-bool Config::getOldSetClauseSemantics()
-{
-	return (bool) getDefaultConfig()->values[KEY_OLD_SET_CLAUSE_SEMANTICS];
-}
-
 int Config::getFileSystemCacheSize()
 {
 	return (int) getDefaultConfig()->values[KEY_FILESYSTEM_CACHE_SIZE];
Modified: firebird/trunk/src/common/config/config.h
===================================================================
--- firebird/trunk/src/common/config/config.h	2012-07-11 05:26:28 UTC (rev 54712)
+++ firebird/trunk/src/common/config/config.h	2012-07-11 12:54:08 UTC (rev 54713)
@@ -127,7 +127,6 @@
 		KEY_DATABASE_GROWTH_INCREMENT,
 		KEY_FILESYSTEM_CACHE_THRESHOLD,
 		KEY_RELAXED_ALIAS_CHECKING,
-		KEY_OLD_SET_CLAUSE_SEMANTICS,
 		KEY_TRACE_CONFIG,
 		KEY_MAX_TRACELOG_SIZE,
 		KEY_FILESYSTEM_CACHE_SIZE,
@@ -326,8 +325,6 @@
 
 	static bool getRelaxedAliasChecking();
 
-	static bool getOldSetClauseSemantics();
-
 	static const char* getAuditTraceConfigFile();
 
 	static int getMaxUserTraceLogSize();
Modified: firebird/trunk/src/dsql/StmtNodes.cpp
===================================================================
--- firebird/trunk/src/dsql/StmtNodes.cpp	2012-07-11 05:26:28 UTC (rev 54712)
+++ firebird/trunk/src/dsql/StmtNodes.cpp	2012-07-11 12:54:08 UTC (rev 54713)
@@ -5278,8 +5278,6 @@
 	thread_db* tdbb = JRD_get_thread_data(); // necessary?
 	MemoryPool& pool = getPool();
 
-	const bool isUpdateSqlCompliant = !Config::getOldSetClauseSemantics();
-
 	// Separate old and new context references.
 
 	Array<NestConst<ValueExprNode> > orgValues, newValues;
@@ -5306,29 +5304,19 @@
 	{
 		node->dsqlContext = dsqlPassCursorContext(dsqlScratch, dsqlCursorName, relation);
 
-		if (isUpdateSqlCompliant)
-		{
-			// Process old context values.
-			dsqlScratch->context->push(node->dsqlContext);
-			++dsqlScratch->scopeLevel;
+		// Process old context values.
+		dsqlScratch->context->push(node->dsqlContext);
+		++dsqlScratch->scopeLevel;
 
-			for (ptr = orgValues.begin(); ptr != orgValues.end(); ++ptr)
-				*ptr = doDsqlPass(dsqlScratch, *ptr, false);
+		for (ptr = orgValues.begin(); ptr != orgValues.end(); ++ptr)
+			*ptr = doDsqlPass(dsqlScratch, *ptr, false);
 
-			--dsqlScratch->scopeLevel;
-			dsqlScratch->context->pop();
-		}
+		--dsqlScratch->scopeLevel;
+		dsqlScratch->context->pop();
 
 		// Process relation.
 		doDsqlPass(dsqlScratch, node->dsqlRelation, relation, false);
 
-		if (!isUpdateSqlCompliant)
-		{
-			// Process old context values.
-			for (ptr = orgValues.begin(); ptr != orgValues.end(); ++ptr)
-				*ptr = doDsqlPass(dsqlScratch, *ptr, false);
-		}
-
 		// Process new context values.
 		for (ptr = newValues.begin(); ptr != newValues.end(); ++ptr)
 			*ptr = doDsqlPass(dsqlScratch, *ptr, false);
@@ -5374,13 +5362,6 @@
 	doDsqlPass(dsqlScratch, node->dsqlRelation, relation, false);
 	dsql_ctx* mod_context = dsqlGetContext(node->dsqlRelation);
 
-	if (!isUpdateSqlCompliant)
-	{
-		// Process old context values.
-		for (ptr = orgValues.begin(); ptr != orgValues.end(); ++ptr)
-			*ptr = doDsqlPass(dsqlScratch, *ptr, false);
-	}
-
 	// Process new context values.
 	for (ptr = newValues.begin(); ptr != newValues.end(); ++ptr)
 		*ptr = doDsqlPass(dsqlScratch, *ptr, false);
@@ -5430,12 +5411,9 @@
 
 	node->dsqlRse = rse;
 
-	if (isUpdateSqlCompliant)
-	{
-		// Process old context values.
-		for (ptr = orgValues.begin(); ptr != orgValues.end(); ++ptr)
-			*ptr = doDsqlPass(dsqlScratch, *ptr, false);
-	}
+	// Process old context values.
+	for (ptr = orgValues.begin(); ptr != orgValues.end(); ++ptr)
+		*ptr = doDsqlPass(dsqlScratch, *ptr, false);
 
 	dsqlScratch->context->pop();
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |