diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2022-01-20 20:45:56 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2022-01-20 23:40:14 +0100 |
commit | 33d24b08677ef45ea7525d8f7f762f152988ea8e (patch) | |
tree | bae58669052c2fd062dd84f49156b1f06cca7f51 /connectivity | |
parent | d6f6a07c838d529680ab7b1260b003e19a89cc53 (diff) |
Mysql/MariaDB: allow View renaming
Strange bug the renamed view appears like a table but when closing and reopening the file,
the view is indeed there as a view (and not as a table) and renamed
Change-Id: I0f26fca66ffb0785ece6223df623845c5e015c93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128707
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/mysqlc/mysqlc_table.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/mysqlc/mysqlc_table.hxx | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_table.cxx b/connectivity/source/drivers/mysqlc/mysqlc_table.cxx index 69b566bb3945..a85618aa3605 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_table.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_table.cxx @@ -163,4 +163,6 @@ void SAL_CALL Table::alterColumnByIndex( descriptor); } +OUString Table::getRenameStart() const { return "RENAME TABLE "; } + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/connectivity/source/drivers/mysqlc/mysqlc_table.hxx b/connectivity/source/drivers/mysqlc/mysqlc_table.hxx index 4942ecfe36a6..31cdc055911b 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_table.hxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_table.hxx @@ -44,6 +44,13 @@ public: virtual ::connectivity::sdbcx::OCollection* createIndexes(const ::std::vector<OUString>& rNames) override; + /** Returns always "RENAME TABLE " even for views. + * + * \return The start of the rename statement. + * @see http://dev.mysql.com/doc/refman/5.1/de/rename-table.html + */ + virtual OUString getRenameStart() const override; + // XAlterTable /** * See css::sdbcx::ColumnDescriptor for details of |