summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-02-23 13:53:08 +0000
committerOcke Janssen <oj@openoffice.org>2001-02-23 13:53:08 +0000
commit0e42586ef90e11bcf449836a1b28c0e06f6e669a (patch)
tree92f660de16494af8a6e3dc3f40c2ea80bd21ca88 /connectivity
parente3e4f39a5cd8880956bf264790ad4ab55f3cff3a (diff)
#83706# predicate check corrected
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/parse/sqlbison.y28
1 files changed, 19 insertions, 9 deletions
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 9f939d41865e..4e1db9354163 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -1,7 +1,7 @@
%{
//--------------------------------------------------------------------------
//
-// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlbison.y,v 1.17 2001-02-14 10:29:29 oj Exp $
+// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlbison.y,v 1.18 2001-02-23 14:53:08 oj Exp $
//
// Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
//
@@ -9,7 +9,7 @@
// OJ
//
// Last change:
-// $Author: oj $ $Date: 2001-02-14 10:29:29 $ $Revision: 1.17 $
+// $Author: oj $ $Date: 2001-02-23 14:53:08 $ $Revision: 1.18 $
//
// Description:
//
@@ -1072,7 +1072,7 @@ boolean_term:
$$->append($2);
$$->append($3);
}
- | row_value_constructor_elem '\n' /*[^')' ',']*/
+ | row_value_constructor_elem /*[^')' ',']*/
{
$$ = SQL_NEW_RULE;
sal_Int16 nErg = xxx_pGLOBAL_SQLPARSER->buildComparsionRule($$,$1);
@@ -2963,6 +2963,8 @@ IMPLEMENT_CONSTASCII_STRING(ERROR_STR_INVALID_STRING_COMPARE, "The field can not
IMPLEMENT_CONSTASCII_STRING(ERROR_STR_INVALID_DATE_COMPARE, "The field can not be compared with a date!");
IMPLEMENT_CONSTASCII_STRING(ERROR_STR_INVALID_REAL_COMPARE, "The field can not be compared with a floating point number!");
IMPLEMENT_CONSTASCII_STRING(ERROR_STR_INVALID_INT_COMPARE, "The field can not be compared with a number!");
+IMPLEMENT_CONSTASCII_STRING(ERROR_STR_INVALID_TABLE, "The table \"#\" is unknown in the database!");
+IMPLEMENT_CONSTASCII_STRING(ERROR_STR_INVALID_COLUMN, "The column \"#\" is unknown in the table \"#\"!");
IMPLEMENT_CONSTASCII_STRING(KEY_STR_LIKE, "LIKE");
IMPLEMENT_CONSTASCII_STRING(KEY_STR_NOT, "NOT");
@@ -3015,7 +3017,9 @@ OParseContext::~OParseContext()
case ERROR_INVALID_INT_COMPARE: aMsg = ERROR_STR_INVALID_INT_COMPARE; break;
case ERROR_INVALID_STRING_COMPARE: aMsg = ERROR_STR_INVALID_STRING_COMPARE; break;
case ERROR_INVALID_DATE_COMPARE: aMsg = ERROR_STR_INVALID_DATE_COMPARE; break;
- case ERROR_INVALID_REAL_COMPARE: aMsg = ERROR_STR_INVALID_REAL_COMPARE; break;
+ case ERROR_INVALID_REAL_COMPARE: aMsg = ERROR_STR_INVALID_REAL_COMPARE; break;
+ case ERROR_INVALID_TABLE: aMsg = ERROR_STR_INVALID_TABLE; break;
+ case ERROR_INVALID_COLUMN: aMsg = ERROR_STR_INVALID_COLUMN; break;
}
return aMsg;
}
@@ -3302,7 +3306,9 @@ OSQLParseNode* OSQLParser::predicateTree(::rtl::OUString& rErrorMessage, const :
static ::osl::Mutex aMutex;
// Guard the parsing
- ::osl::MutexGuard aGuard(s_aMutex);
+ ::osl::MutexGuard aGuard(s_aMutex);
+ // must be reset
+ xxx_pGLOBAL_SQLPARSER = this;
// reset the parser
if (!m_pLocale)
@@ -3329,14 +3335,18 @@ OSQLParseNode* OSQLParser::predicateTree(::rtl::OUString& rErrorMessage, const :
m_sFieldName = aString;
- // get the field format key
- m_xField->getPropertyValue(FIELD_STR_FORMATKEY) >>= m_nFormatKey;
+ // get the field format key
+ if (m_xField->getPropertySetInfo()->hasPropertyByName(FIELD_STR_FORMATKEY))
+ m_xField->getPropertyValue(FIELD_STR_FORMATKEY) >>= m_nFormatKey;
+ else
+ m_nFormatKey = 0;
// get the field type
m_xField->getPropertyValue(FIELD_STR_TYPE) >>= nType;
}
- catch ( ... )
- {
+ catch ( Exception& )
+ {
+ OSL_ASSERT(0);
}
if (m_nFormatKey && m_xFormatter.is())