Bugzilla – Attachment 141513 Details for
Bug 117092
Migration to Firebird fails for a simple table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
patch
patch.txt (text/plain), 1.72 KB, created by
Julien Nabet
on 2018-04-21 07:23:50 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Julien Nabet
Created:
2018-04-21 07:23:50 UTC
Size:
1.72 KB
patch
obsolete
>diff --git a/dbaccess/source/filter/hsqldb/createparser.cxx b/dbaccess/source/filter/hsqldb/createparser.cxx >index 8392964463d0..8856579cc86f 100644 >--- a/dbaccess/source/filter/hsqldb/createparser.cxx >+++ b/dbaccess/source/filter/hsqldb/createparser.cxx >@@ -83,9 +83,13 @@ bool lcl_isNullable(const OUString& sColumnDef) > return true; > } > >-bool lcl_isPrimaryKey(const OUString& sColumnDef) >+bool lcl_isPrimaryKey(const OUString& sColumnDef, const OUString& sColumnPart) > { >- if (sColumnDef.indexOf("PRIMARY KEY") >= 0) >+ bool bPrimaryKeyExists = (sColumnPart.indexOf("PRIMARY KEY") != -1); >+ if (!bPrimaryKeyExists) >+ return false; >+ OUString testString = sColumnPart.copy(sColumnPart.indexOf("PRIMARY KEY")); >+ if (testString.indexOf(sColumnDef) >= 0) > { > return true; > } >@@ -157,6 +161,11 @@ void CreateStmtParser::parseColumnPart(const OUString& sColumnPart) > { > std::vector<OUString> words = string::split(sColumn, sal_Unicode(u' ')); > >+ if (words[0] == "PRIMARY") >+ { >+ // we're on the primary define part >+ continue; >+ } > if (words[0] == "CONSTRAINT") > { > // TODO parse foreign key part instead of just saving the string >@@ -188,7 +197,7 @@ void CreateStmtParser::parseColumnPart(const OUString& sColumnPart) > } > > ColumnDefinition aColDef(words[0], lcl_getDataTypeFromHsql(sTypeName), aParams, >- lcl_isPrimaryKey(sColumn), lcl_getAutoIncrementDefault(sColumn), >+ lcl_isPrimaryKey(words[0], sColumnPart), lcl_getAutoIncrementDefault(sColumn), > lcl_isNullable(sColumn)); > > m_aColumns.push_back(aColDef);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 117092
:
141472
|
141473
|
141474
|
141512
| 141513 |
141551