summaryrefslogtreecommitdiffstats
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2011-10-30 11:40:22 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2011-10-30 12:39:37 +0100
commit338ea7617f33d975cc35f44030f522ec5d77adfb (patch)
treeec6106268a60c400e5a3bd8e47296733703bfe5f /connectivity
parentIntroduce combined 2&3 test for SQL Token (diff)
downloadcore-338ea7617f33d975cc35f44030f522ec5d77adfb.tar.gz
core-338ea7617f33d975cc35f44030f522ec5d77adfb.zip
Return proper UNKNOWN_RULE instead of 0 for unknown rule
also make unknown rule -1 to better separate it Before, an unknown rule actually went to 0 == OSQLParser::select_statement
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/inc/connectivity/sqlnode.hxx2
-rwxr-xr-xconnectivity/source/parse/sqlbison.y2
2 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx
index 69eeaba66bf0..4fd6714dd2c8 100644
--- a/connectivity/inc/connectivity/sqlnode.hxx
+++ b/connectivity/inc/connectivity/sqlnode.hxx
@@ -239,7 +239,7 @@ namespace connectivity
between_predicate_part_2,
cast_spec,
rule_count, // last value
- UNKNOWN_RULE // ID indicating that a node is no rule with a matching Rule-enum value (see getKnownRuleID)
+ UNKNOWN_RULE = -1 // ID indicating that a node is no rule with a matching Rule-enum value (see getKnownRuleID)
};
// must be ascii encoding for the value
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index d559c292df63..e83a122b75a5 100755
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -4743,7 +4743,7 @@ sal_uInt32 OSQLParser::StrToRuleID(const ::rtl::OString & rValue)
}
// Nicht gefunden
- return 0;
+ return OParseNode::UNKNOWN_RULE;
}
//-----------------------------------------------------------------------------