https://bugs.documentfoundation.org/show_bug.cgi?id=154037

            Bug ID: 154037
           Summary: MySQL/MariaDB direct connection: Deleted tables won't
                    be deleted in content.xml, when deleted directly in
                    MySQL
           Product: LibreOffice
           Version: 7.5.1.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: [email protected]
          Reporter: [email protected]

Open a database file, which connects directly to a MySQL/MariaDB database.
Create a new table in Base.
Close the connection.
Open another connection to MySQL/MariaDB - tested here with phpMyAdmin.
Delete the table, which you have created new in Base.
Now open the Base file again.

Create a macro like this:
SUB Tables
        oDB = ThisDatabaseDocument.DataSource
        oTables = oDB.getTables()
        DIM stTablenames() AS STRING
        stTablenames = oTables.getElementNames  
END SUB
Start the macro watching stTablenames (step by step)
You will get a list of all tables - including the table, which is deleted and
won't be shown any more in Base GUI.
Macro will only read all tables out of content.xml in Base file. Tables, which
are created directly in MySQL, not by Base GUI, won't be shown there up to the
moment you open this tables and use this tables for input new data or something
else.

For external databases Base should refresh the list of tables when connecting
to the database. The shown tables shouldn't contain tables, which doesn't exist
any more. The shown tables should contain all tables, which exist.

Entries in content.xml might be used for formatting of cells of the table, so
this entries should be deleted by default.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to