Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4287

importing database with routines erratic

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.5.30
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      W7 Pro 64-bit w MariaDB 5.5.30 64-bit.

      Description

      Importing a database to MariaDB which contains database, w triggers and procedures yields error. This works fine between mysql 5.5.27 and 5.5.30, and it does not matter whether the dump is created on either mysql version. The error given is: "ERROR 1548 (HY000) at line 819: Cannot load from mysql.proc. The table is probably corrupted". Import command "prompt> mysql --user=root --password=MyPassword < weatherdata_dump.sql". Similar error if using mysqlworkbench. The database origins as "latin1". Testing stored procedure "call dailystats(2700);" (parameter is number of ago, 2005-10-04 - 2005-12-31). There seems to be no problems with the two tables, INSERTS et c work!. mysqldump batch is included - HOWEVER the minimized dump is 20MB - instructions required!

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            bagtjesen Ingemar Skarpås added a comment - - edited

            Hi again,

            The original problem was that the first original dump (147 MB) went ok into MySQL 5.5.30, but not to MariaDB 5.5.30 - the file was left on the computer while I deinstalled MySQL in favor of MariaDB... To add to any already existing confusion; A smaller 20 MB dump worked ok on MySQL but NOT in the next reinstallation of MariaDB.

            I don't have time tomorrow, but maybe right after that, I could test a reinstallation of MariaDB 5.5.30 and read the whole dump (3.3 GB) without the wait_timeout and connect_timeout set in the .ini. (I don't know what the internal defaults are). If that still brings up a bad attempt to drop the weatherdata schema we'll know!

            Cheers,

            Ingemar

            Show
            bagtjesen Ingemar Skarpås added a comment - - edited Hi again, The original problem was that the first original dump (147 MB) went ok into MySQL 5.5.30, but not to MariaDB 5.5.30 - the file was left on the computer while I deinstalled MySQL in favor of MariaDB... To add to any already existing confusion; A smaller 20 MB dump worked ok on MySQL but NOT in the next reinstallation of MariaDB. I don't have time tomorrow, but maybe right after that, I could test a reinstallation of MariaDB 5.5.30 and read the whole dump (3.3 GB) without the wait_timeout and connect_timeout set in the .ini. (I don't know what the internal defaults are). If that still brings up a bad attempt to drop the weatherdata schema we'll know! Cheers, Ingemar
            Hide
            elenst Elena Stepanova added a comment -

            Please make check a few things when you're on it:

            1) you do certainly clean up the datadir after uninstallation of MySQL (normally it shouldn't be needed at all on upgrade from MySQL to MariaDB; but since we now want a clean test, it's better this way);
            2) after you have installed MariaDB, check the value of @@datadir variable (select @@datadir) and make sure that's indeed the location you previously cleaned up;
            3) check if you have any errors in mysql error log about mysql.proc (or any other table, for that matter) being crashed.

            Thanks!

            Show
            elenst Elena Stepanova added a comment - Please make check a few things when you're on it: 1) you do certainly clean up the datadir after uninstallation of MySQL (normally it shouldn't be needed at all on upgrade from MySQL to MariaDB; but since we now want a clean test, it's better this way); 2) after you have installed MariaDB, check the value of @@datadir variable (select @@datadir) and make sure that's indeed the location you previously cleaned up; 3) check if you have any errors in mysql error log about mysql.proc (or any other table, for that matter) being crashed. Thanks!
            Hide
            bagtjesen Ingemar Skarpås added a comment -

            Hi Elena,

            Thanks for your suggestions. I did a test after midnight, I couldn't sleep, and This time even the 3.3 GB import went smooth, even without setting the variables to 28800. (Yes one of them was set by default to that value).

            So, right now I cannot reproduce any of the errors. I think you can close this case.

            I have downloaded 10.0.2 and will test that, and also 5.5.31 when it is release on 12 days...

            Cheers,

            Ingemar

            Show
            bagtjesen Ingemar Skarpås added a comment - Hi Elena, Thanks for your suggestions. I did a test after midnight, I couldn't sleep, and This time even the 3.3 GB import went smooth, even without setting the variables to 28800. (Yes one of them was set by default to that value). So, right now I cannot reproduce any of the errors. I think you can close this case. I have downloaded 10.0.2 and will test that, and also 5.5.31 when it is release on 12 days... Cheers, Ingemar
            Hide
            elenst Elena Stepanova added a comment -

            Hi Ingemar,

            Okay, if you think it could happen that there were leftovers from the previous installation in the datadir, I suppose we can indeed close it.
            Back to real-life scenarios, there are two generic (system-independent) ways to do what you were trying to do, each of which is supposed to work, and if they don't, it's most likely a bug:

            1. you could have installed a really, really new MariaDB server, meaning that you certainly didn't have an old datadir; in this case a brand new empty datadir would have been created upon installation, and restoration of your dump should have worked;

            2. you could have upgraded to MariaDB server from an earlier version of MariaDB or MySQL server; but in this case you should have run mysql_upgrade before trying to restore your dump, and better still, restart your server after running mysql_upgrade (in rare cases it might be important).

            But since you are working on Windows, please check Windows-specific recommendations on upgrading MariaDB server:
            https://kb.askmonty.org/en/upgrading-mariadb-on-windows/

            Show
            elenst Elena Stepanova added a comment - Hi Ingemar, Okay, if you think it could happen that there were leftovers from the previous installation in the datadir, I suppose we can indeed close it. Back to real-life scenarios, there are two generic (system-independent) ways to do what you were trying to do, each of which is supposed to work, and if they don't, it's most likely a bug: 1. you could have installed a really, really new MariaDB server, meaning that you certainly didn't have an old datadir; in this case a brand new empty datadir would have been created upon installation, and restoration of your dump should have worked; 2. you could have upgraded to MariaDB server from an earlier version of MariaDB or MySQL server; but in this case you should have run mysql_upgrade before trying to restore your dump, and better still, restart your server after running mysql_upgrade (in rare cases it might be important). But since you are working on Windows, please check Windows-specific recommendations on upgrading MariaDB server: https://kb.askmonty.org/en/upgrading-mariadb-on-windows/
            Hide
            elenst Elena Stepanova added a comment -

            Closing as discussed above. Please comment if you get any new information on this.

            Show
            elenst Elena Stepanova added a comment - Closing as discussed above. Please comment if you get any new information on this.

              People

              • Assignee:
                elenst Elena Stepanova
                Reporter:
                bagtjesen Ingemar Skarpås
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: