diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-13 18:36:09 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-13 18:36:09 +0300 |
commit | 984d7100cdab91fb23d97c05e8b6329a90fe1583 (patch) | |
tree | db323b31d44e10079fadf9de048972745cd89070 | |
parent | d46db415cef910c65b0e550a9d00fe188cfd8910 (diff) | |
parent | 8e3a4be45c551883d37e5598f0b4108ccf31521c (diff) | |
download | mariadb-git-984d7100cdab91fb23d97c05e8b6329a90fe1583.tar.gz |
Merge 10.4 into 10.5
157 files changed, 3030 insertions, 2599 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 96346808a62..37087b7c6c6 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -72,10 +72,10 @@ MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c) TARGET_LINK_LIBRARIES(mysql_plugin ${CLIENT_LIB}) MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc) -TARGET_LINK_LIBRARIES(mysqlbinlog ${CLIENT_LIB}) +TARGET_LINK_LIBRARIES(mysqlbinlog ${CLIENT_LIB} mysys_ssl) MYSQL_ADD_EXECUTABLE(mysqladmin mysqladmin.cc ../sql/password.c) -TARGET_LINK_LIBRARIES(mysqladmin ${CLIENT_LIB}) +TARGET_LINK_LIBRARIES(mysqladmin ${CLIENT_LIB} mysys_ssl) MYSQL_ADD_EXECUTABLE(mysqlslap mysqlslap.c) SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS") diff --git a/client/mysqldump.c b/client/mysqldump.c index f1746dcabc4..f1d59b449af 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -971,6 +971,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), exit(1); } break; + case (int) OPT_DEFAULT_CHARSET: + if (default_charset == disabled_my_option) + default_charset= (char *)mysql_universal_client_charset; + break; } return 0; } diff --git a/debian/po/ar.po b/debian/po/ar.po index abf6967063b..f8469e448f9 100644 --- a/debian/po/ar.po +++ b/debian/po/ar.po @@ -190,60 +190,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "هل Ùعلاً تريد التثبيط؟" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "هناك مل٠مسمى /var/lib/mysql/debian-*.flag موجود على هذا النظام." - -#, fuzzy -#~| msgid "" -#~| "Such file is an indication that a mariadb-server package with a higher " -#~| "version has been installed earlier." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "هذا المل٠دلالة على أن نسخة Ø£Øدث من Øزمة mariadb-server تم تثبيتها مسبقاً." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "ليست هناك أية ضمانة أن النسخة التي تقوم بتثبيتها ستكون قادرة على استخدام " -#~ "قواعد البيانات الØالية." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "تشغيل خادم MariaDB عند الإقلاع؟" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "يمكن تشغيل خادم MariaDB آلياً وقت الإقلاع أو يدوياً باستخدام الأمر '/etc/" -#~ "init.d/mysql start'." - -#~ msgid "" -#~ "To use MariaDB, the following entries for users and groups should be " -#~ "added to the system:" -#~ msgstr "" -#~ "كي تستخدم MariaDBØŒ يجب إضاÙØ© المÙدخلات التالية الخاصة بالمستخدمين " -#~ "والمجموعات إلى النظام:" - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "هل تريد دعم اتصالات MySQL من الأجهزة التي تعمل على ديبيان \"sarge\" أو " -#~ "أقدم؟" - -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "ÙÙŠ إصدارات عملاء MySQL القديمة من ديبيان، لم تكن كلمات المرور تØÙظ بشكل " -#~ "آمن. ولقد ØÙ„ هذه المشكلة بعدها، غير أن العملاء (مثل PHP) المتصلين من " -#~ "أجهزة تعمل على ديبيان Sarge 3.1 لن يكونوا قادرين على الاتصال باستخدام " -#~ "الØسابات الØديثة أو الØسابات التي تم تغيير كلمة مرورها." diff --git a/debian/po/ca.po b/debian/po/ca.po index c7946432ca7..ea826909b53 100644 --- a/debian/po/ca.po +++ b/debian/po/ca.po @@ -158,166 +158,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#, fuzzy -#~| msgid "Should MySQL start on boot?" -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Voleu que el MariaDB s'inici� a l'arrencada ?" - -#, fuzzy -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "El MariaDB es pot executar a l'arrencada o nom�s si executeu manualment '/" -#~ "etc/init.d/mysql start'. Seleccioneu 's�' si voleu que s'inicialitzi " -#~ "autom�ticament." - -#, fuzzy -#~ msgid "" -#~ "To use mysql you must install an equivalent user and group to the " -#~ "following and ensure yourself that /var/lib/mysql has the right " -#~ "permissions (the uid/gid may be different)." -#~ msgstr "" -#~ "Per utilitzar la base de dades de MySQL heu d'afegir un usuari i grup " -#~ "equivalent al seg�ent i assegurar-vos que el directori /var/lib/mysql " -#~ "tingui els permisos correctes." - -#~ msgid "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" -#~ msgstr "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" - -#~ msgid "/etc/group: mysql:x:101:" -#~ msgstr "/etc/group: mysql:x:101:" - -#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" -#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" - -#, fuzzy -#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" -#~ msgstr "" -#~ "Feu una ullada al document: http://www.mysql.com/doc/en/Upgrade.html" - -#, fuzzy -#~ msgid "" -#~ "MySQL will only install if you have a non-numeric hostname that is " -#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " -#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " -#~ "myhostname\"." -#~ msgstr "" -#~ "El MySQL nom�s s'instal�la en cas de tenir un nom d'ordinador central que " -#~ "no sigui num�ric i que es pugui resoldre a trav�s del fitxer /etc/hosts. " -#~ "Ex. si l'ordre \"hostname\" retorna \"myhostname\", llavors hi ha d'haver " -#~ "una línia com la següent \"10.0.0.1 myhostname\"." - -#, fuzzy -#~ msgid "" -#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " -#~ "is used in the start/stop and cron scripts. Don't delete." -#~ msgstr "" -#~ "Es crea un nou usuari de mysql \"debian-sys-maint\". S'utilitza per les " -#~ "seq��ncies d'inicialitzaci� i aturada del cron, no el suprimiu." - -#, fuzzy -#~ msgid "" -#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" -#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " -#~ "there, never only the password!" -#~ msgstr "" -#~ "Recordeu posar una contrasenya al superusuari del MySQL. Si utilitzeu un " -#~ "fitxer /root/.my.cnf, escriviu sempre all� les l�nies \"user\" i " -#~ "\"password\".; mai nom�s la contrasenya. Per a m�s informaci� feu una " -#~ "ullada a /usr/share/doc/mysql-server/README.Debian." - -#, fuzzy -#~ msgid "" -#~ "Should I remove all databases below /var/lib/mysql as you are purging the " -#~ "mysql-server package?" -#~ msgstr "" -#~ "Voleu suprimir totes les bases de dades en purgar el paquet mysql-server ?" - -#~ msgid "" -#~ "Networking is disabled by default for security reasons. You can enable it " -#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf." -#~ msgstr "" -#~ "La xarxa est� inhabilitada per defecte per a raons de seguretat. La podeu " -#~ "habilitar descomentant l'opci� de skip-networking del fitxer /etc/mysql/" -#~ "my.cnf." - -#~ msgid "security and update notice" -#~ msgstr "Av�s de seguretat i actualitzaci�" - -#~ msgid "Please run mysql_fix_privilege_tables !" -#~ msgstr "Executeu mysql_fix_privilege_tables" - -#~ msgid "" -#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs " -#~ "other than root and mysql with mysql." -#~ msgstr "" -#~ "S'asseguren els permisos de seguretat de /var/lib/mysql canviant a mysql " -#~ "tots els GIDs diferents a root i mysql." - -#~ msgid "" -#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/" -#~ msgstr "" -#~ "Per habilitar el suport de SSL podeu seguir les instruccions de /usr/" -#~ "share/doc/mysql-server/" - -#~ msgid "mysql_fix_privileges_tables will be executed" -#~ msgstr "s'executa mysql_fix_privileges_tables" - -#~ msgid "" -#~ "The latest MySQL versions have an enhanced, more fine grained, privilege " -#~ "system. To make use of it, some new fields must be added to the tables " -#~ "in the \"mysql\" database. This is done by the " -#~ "mysql_fix_privilege_tables script during this upgrade regardless of if " -#~ "the server is currently running or not!" -#~ msgstr "" -#~ "Les �ltimes versions de MySQL tenen un sistema de privilegis m�s " -#~ "elaborat. Per utilitzar-lo cal afegir nous camps a les taules de la base " -#~ "de dades \"mysql\". Aquesta tasca la realitza la seq��ncia " -#~ "mysql_fix_privilege_tables durant l'actualitzaci� independentment de si " -#~ "el servidor s'est� executant o no!" - -#~ msgid "" -#~ "This script is not supposed to give any user more rights that he had " -#~ "before, if you encounter such a case, please contact me." -#~ msgstr "" -#~ "Aquesta seq��ncia no assigna privilegis d'usuari diferents als que ja " -#~ "tenia, en cas que us trob�ssiu en aquesta situaci�, poseu-vos en contacte " -#~ "amb mi." - -#~ msgid "" -#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-" -#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. " -#~ "remove everything including the configuration) somewhen? (default is not)" -#~ msgstr "" -#~ "Voleu suprimir tots els continguts de /var/lib/mysql quan es purgui el " -#~ "paquet mysql-server amb l'ordre \"dpkg --purge mysql-server\". (ex. " -#~ "suprimir-ho tot incl�s la configuraci�) ? (per defecte no)" - -#~ msgid "Make MySQL reachable via network?" -#~ msgstr "Voleu fer accessible el MySQL via xarxa ?" - -#~ msgid "" -#~ "Should MySQL listen on a network reachable TCP port? This is not " -#~ "necessary for use on a single computer and could be a security problem." -#~ msgstr "" -#~ "Voleu que el MySQL escolti a un port TCP accessible des de la xarxa ? " -#~ "Aquesta opci� no �s imprescindible en ordinadors a�llats i podria " -#~ "provocar un problema de seguretat." - -#~ msgid "Enable chroot mode?" -#~ msgstr "Permetre el mode chroot ?" - -#~ msgid "" -#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so " -#~ "that users cannot modify any files outside this directory. This improves " -#~ "resistence against crackers, too, as they are not able to modify system " -#~ "files." -#~ msgstr "" -#~ "El MySQL es pot executar en una entorn tancat al directori /var/lib/" -#~ "mysql_jail perqu� els usuaris no puguin modificar cap fitxer fora del " -#~ "directori.Aquesta opci� tamb� augmenta la seguretat envers els crackers, " -#~ "jaque no poden modificar els fitxers del sistema." diff --git a/debian/po/cs.po b/debian/po/cs.po index cb42bef56bf..f5f669ee4bd 100644 --- a/debian/po/cs.po +++ b/debian/po/cs.po @@ -192,154 +192,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Opravdu pokraÄovat v degradaci?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "V systému existuje soubor /var/lib/mysql/debian-*.flag." - -#, fuzzy -#~| msgid "" -#~| "Such file is an indication that a mariadb-server package with a higher " -#~| "version has been installed earlier." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "To znamená, že již byl nainstalován balÃk mariadb-server s vyÅ¡Å¡Ã verzÃ." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Neexistuje žádná záruka, že momentálnÄ› instalovaná verze bude umÄ›t " -#~ "pracovat se stávajÃcÃmi databázemi." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Spustit MariaDB server pÅ™i startu systému?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "MariaDB se může spouÅ¡tÄ›t automaticky pÅ™i startu systému, nebo ruÄnÄ› " -#~ "pÅ™Ãkazem '/etc/init.d/mysql start'." - -#~ msgid "" -#~ "To use MariaDB, the following entries for users and groups should be " -#~ "added to the system:" -#~ msgstr "" -#~ "Abyste mohli MariaDB použÃvat, musÃte v systému založit následujÃcà " -#~ "uživatele a skupiny:" - -#~ msgid "Cannot upgrade if ISAM tables are present!" -#~ msgstr "Aktualizace nelze provést pokud jsou pÅ™Ãtomny tabulky ISAM!" - -#~ msgid "" -#~ "Recent versions of MySQL can no longer use the old ISAM table format and " -#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " -#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " -#~ "The installation of mysql-server-5.1 will now abort. In case your old " -#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " -#~ "those tables." -#~ msgstr "" -#~ "Poslednà verze MySQL již nemohou použÃvat starý formát tabulek ISAM a " -#~ "pÅ™ed aktualizacà je nutné pÅ™evést tyto tabulky napÅ™. do formátu MyISAM " -#~ "pomocà \"mysql_convert_table_format\" nebo \"ALTER TABLE x ENGINE=MyISAM" -#~ "\". Instalace mysql-server-5.1 se nynà pÅ™eruÅ¡Ã. V pÅ™ÃpadÄ›, že se mezitÃm " -#~ "odinstaloval původnà mysql-server-4.1, jednoduÅ¡e jej znovu nainstalujte a " -#~ "tabulky pÅ™eveÄte." - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "Podporovat MySQL pÅ™ipojenà z poÄÃtaÄů použÃvajÃcÃch Debian Sarge nebo " -#~ "starÅ¡Ã?" - -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "Způsob, jakým se dÅ™Ãve ukládala hesla, nebyl pÅ™ÃliÅ¡ bezpeÄný. To se nynà " -#~ "zlepÅ¡ilo, ale nevýhodou je, že se klienti z Debianu 3.1 Sarge (napÅ™. PHP) " -#~ "nebudou moci pÅ™ipojit na nové úÄty, nebo na úÄty, u nichž se heslo " -#~ "zmÄ›nilo." - -#~ msgid "" -#~ "To use mysql you must install an equivalent user and group to the " -#~ "following and ensure yourself that /var/lib/mysql has the right " -#~ "permissions (the uid/gid may be different)." -#~ msgstr "" -#~ "Abyste mohli mysql použÃvat, musÃte do následujÃcÃch souborů pÅ™idat " -#~ "ekvivalentnÃho uživatele a skupinu a zajistit, že /var/lib/mysql má " -#~ "správná práva (uid/gid se mohou liÅ¡it)." - -#~ msgid "Remove the databases used by all MySQL versions?" -#~ msgstr "Odstranit databáze použÃvané vÅ¡emi verzemi MySQL?" - -#~ msgid "" -#~ "If you do not provide a password no changes will be made to the account." -#~ msgstr "Nezadáte-li heslo, žádné zmÄ›ny se s úÄtem neprovedou." - -#~ msgid "" -#~ "When installation finishes, you should verify that the account is " -#~ "properly protected with a password (see README.Debian for more " -#~ "information)." -#~ msgstr "" -#~ "Po skonÄenà instalace byste mÄ›li ověřit, že je úÄet chránÄ›n heslem (vÃce " -#~ "informacà naleznete v souboru README.Debian)." - -#~ msgid "Update Hints" -#~ msgstr "Poznámky k aktualizaci" - -#~ msgid "" -#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be " -#~ "corrupted! This script also enhances the privilege tables but is not " -#~ "supposed to give any user more rights that he had before," -#~ msgstr "" -#~ "Po aktualizaci jeÅ¡tÄ› musÃte spustit \"mysql_upgrade\", protože jinak by " -#~ "se tabulky mohly naruÅ¡it! Tento skript také rozÅ¡iÅ™uje tabulky privilegiÃ, " -#~ "ovÅ¡em nemÄ›l by uživatelům pÅ™idat vÃce práv, než mÄ›li dosud." - -#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" -#~ msgstr "Také si pÅ™eÄtÄ›te http://www.mysql.com/doc/en/Upgrade.html" - -#~ msgid "" -#~ "MySQL will only install if you have a non-numeric hostname that is " -#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " -#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " -#~ "myhostname\"." -#~ msgstr "" -#~ "MySQL se nainstaluje pouze v pÅ™ÃpadÄ›, že použÃváte nenumerické jméno " -#~ "poÄÃtaÄe, které se dá pÅ™eložit pÅ™es soubor /etc/hosts. NapÅ™. když pÅ™Ãkaz " -#~ "\"hostname\" vrátà \"diamond\", tak v /etc/hosts musà existovat obdobný " -#~ "řádek jako \"10.0.0.1 diamond\"." - -#~ msgid "" -#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " -#~ "is used in the start/stop and cron scripts. Don't delete." -#~ msgstr "" -#~ "Bude vytvoÅ™en nový mysql uživatel \"debian-sys-maint\". Tento mysql úÄet " -#~ "se použÃvá ve startovacÃch, ukonÄovacÃch a cronových skriptech. Nemažte " -#~ "jej." - -#~ msgid "" -#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" -#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " -#~ "there, never only the password!" -#~ msgstr "" -#~ "Nezapomeňte nastavit heslo pro úÄet administrátora MySQL! PoužÃváte-li /" -#~ "root/.my.cnf, vždy zde zadejte jak řádek \"user\", tak řádek \"password" -#~ "\". Nikdy zde nezadávejte jenom heslo!" - -#~ msgid "" -#~ "Should I remove the complete /var/lib/mysql directory tree which is used " -#~ "by all MySQL versions, not necessarily only the one you are about to " -#~ "purge?" -#~ msgstr "" -#~ "Mám odstranit kompletnà adresářový strom /var/lib/mysql, který se použÃvá " -#~ "pro vÅ¡echny verze MySQL, tedy ne nutnÄ› pouze pro verzi, kterou se " -#~ "chystáte vyÄistit?" diff --git a/debian/po/da.po b/debian/po/da.po index af566305fd1..780b893c328 100644 --- a/debian/po/da.po +++ b/debian/po/da.po @@ -192,188 +192,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Ønsker du virkelig at fortsætte nedgraderingen?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "" -#~ "Der er en fil med navnet /var/lib/mysql/debian-*.flag på dette system." - -#, fuzzy -#~| msgid "" -#~| "Such file is an indication that a mariadb-server package with a higher " -#~| "version has been installed earlier." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "Sådan en fil tyder på at der tidligere har været installeret en højere " -#~ "version af mariadb-server-pakken." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Det kan ikke garanteres at den version, du er ved at installere, kan " -#~ "benytte data fra de eksisterende databaser." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Start MariaDB-serveren under systemopstart?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "MariaDB-serveren kan enten startes op automatisk under systemopstarten, " -#~ "eller manuelt med kommandoen '/etc/init.d/mysql start'." - -#~ msgid "" -#~ "To use MariaDB, the following entries for users and groups should be " -#~ "added to the system:" -#~ msgstr "" -#~ "Nedenstående linjer for brugere og grupper skal tilføjes dette system for " -#~ "at benytte MariaDB:" - -#~ msgid "Cannot upgrade if ISAM tables are present!" -#~ msgstr "Kan ikke opgradere hvis der er ISAM-tabeller!" - -#~ msgid "" -#~ "Recent versions of MySQL can no longer use the old ISAM table format and " -#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " -#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " -#~ "The installation of mysql-server-5.1 will now abort. In case your old " -#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " -#~ "those tables." -#~ msgstr "" -#~ "Nyere versioner af MySQL kan ikke længere benytte det gamle ISAM-" -#~ "tabelformat, og det er derfor nødvendigt at konvertere dine tabeller til " -#~ "f.eks. MyISAM forud for opgraderingen med \"mysql_convert_table_format\" " -#~ "eller \"ALTER TABLE x ENGINE=MyISAM\". Installationen af mysql-server-5.1 " -#~ "afbrydes nu. Skulle din gamle mysql-server-4.1 alligevel bliver " -#~ "afinstalleret, så geninstallér den blot og konverter tabellerne." - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "Understøt MySQL-forbindelser fra maskiner, der kører Debian \"Sarge\" " -#~ "eller ældre?" - -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "Gamle udgaver af MySQL-klienter på Debian gemte ikke adgangskoderne " -#~ "sikkert. Dette er blevet forbedret siden da, men klienter (f.eks. PHP) " -#~ "fra maskiner, der kører Debian 3.1 Sarge vil ikke kunne forbinde til " -#~ "nyere konti eller konti, hvis adgangskode er blevet ændret." - -#~ msgid "" -#~ "To use mysql you must install an equivalent user and group to the " -#~ "following and ensure yourself that /var/lib/mysql has the right " -#~ "permissions (the uid/gid may be different)." -#~ msgstr "" -#~ "For at kunne bruge mysql skal du installere en bruger og en gruppe, der " -#~ "svarer til nedenstående, og sikre dig at /var/lib/mysql har de rigtige " -#~ "adgangsrettigheder (uid/gid kan afvige)." - -#~ msgid "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" -#~ msgstr "" -#~ "etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" - -#~ msgid "/etc/group: mysql:x:101:" -#~ msgstr "/etc/group: mysql:x:101:" - -#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" -#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" - -#~ msgid "Remove the databases used by all MySQL versions?" -#~ msgstr "Fjern de databaser, der benyttes af samtlige MySQL-versioner?" - -#~ msgid "" -#~ "If you do not provide a password no changes will be made to the account." -#~ msgstr "Hvis du ikke angiver en adgangskode, vil kontoen ikke blive ændret." - -#~ msgid "" -#~ "When installation finishes, you should verify that the account is " -#~ "properly protected with a password (see README.Debian for more " -#~ "information)." -#~ msgstr "" -#~ "Når installationen afsluttes, bør du tjekke at kontoen er ordentligt " -#~ "beskyttet med en adgangskode (se README.Debian for yderligere " -#~ "oplysninger)." - -#~ msgid "Update Hints" -#~ msgstr "Opdateringstips" - -#~ msgid "" -#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be " -#~ "corrupted! This script also enhances the privilege tables but is not " -#~ "supposed to give any user more rights that he had before," -#~ msgstr "" -#~ "Du skal køre \"mysql_upgrade\" efter opgraderingen, da tabellerne eller " -#~ "kan blive ødelagt! Dette script forbedrer også rettighedstabellerne, men " -#~ "burde ikke give nogen bruger flere rettigheder, end han havde tidligere," - -#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" -#~ msgstr "Læs også http://www.mysql.com/doc/en/Upgrade.html" - -#~ msgid "Install Hints" -#~ msgstr "Installationstips" - -#~ msgid "" -#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in " -#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and " -#~ "have manually be restored." -#~ msgstr "" -#~ "Ved opgraderinger fra MySQL 3.23, der fulgte med Debian Woody, kan de " -#~ "symbolske /var/lib/mysql or /var/log/mysql blive fjernet ved et uheld, og " -#~ "må genskabes manuelt." - -#~ msgid "" -#~ "MySQL will only install if you have a non-numeric hostname that is " -#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " -#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " -#~ "myhostname\"." -#~ msgstr "" -#~ "MySQL vil kun blive installeret, hvis du har et ikke-numerisk værtsnavn, " -#~ "som kan slås op i filen /ets/hosts. Hvis f.eks. kommandoen \"hostname\" " -#~ "svarer med \"mitvaertsnavn\", skal du have en linje a'la \"10.0.0.1 " -#~ "mitvaertsnavn\" i /etc/hosts." - -#~ msgid "" -#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " -#~ "is used in the start/stop and cron scripts. Don't delete." -#~ msgstr "" -#~ "Det vil blive oprettet en ny mysql-bruger, \"debian-sys-maint\". Denne " -#~ "mysql-konto bruges i start/stop-cron-scripterne. Slet den ikke." - -#~ msgid "" -#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" -#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " -#~ "there, never only the password!" -#~ msgstr "" -#~ "Husk at sætte en ADGANGSKODE for MySQLs root-bruger! Hvis du bruger en /" -#~ "etc/.my.cnf, så skriv altid \"user\"- og \"password\"-linjer ind her, " -#~ "ikke kun adgangskoden!" - -#~ msgid "" -#~ "Should I remove the complete /var/lib/mysql directory tree which is used " -#~ "by all MySQL versions, not necessarily only the one you are about to " -#~ "purge?" -#~ msgstr "" -#~ "Skal jeg fjerne hele mappetræet /var/lib/mysql, som benyttes af alle " -#~ "MySQL-versioner, ikke kun den version, du er ved at slette?" - -#~ msgid "" -#~ "Rarely, e.g. on new major versions, the privilege system is improved. To " -#~ "make use of it mysql_fix_privilege_tables must be executed manually. The " -#~ "script is not supposed to give any user more rights that he had before," -#~ msgstr "" -#~ "En sjælden gang imellem, f.eks. ved nye hovedversioner, sker det at " -#~ "rettighedssystemet forbedres. For at gøre brug af dette, skal " -#~ "mysql_fix_privilege_tables køres manuelt. Scriptet vil ikke give nogen " -#~ "bruger flere rettigheder, end vedkommende havde tidligere," diff --git a/debian/po/de.po b/debian/po/de.po index 47dc9622dfd..253986ff9a5 100644 --- a/debian/po/de.po +++ b/debian/po/de.po @@ -193,36 +193,3 @@ msgid "The two passwords you entered were not the same. Please try again." msgstr "" "Die beiden von Ihnen eingegebenen Passwörter sind nicht identisch. Bitte " "erneut versuchen." - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Möchten Sie wirklich eine ältere Version einspielen?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "" -#~ "Auf diesem System existiert eine Datei mit dem Namen /var/lib/mysql/" -#~ "debian-*.flag" - -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "Diese Datei ist ein Hinweis darauf, dass früher ein MariaDB-Server-Paket " -#~ "mit einer höheren Version installiert war." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Es kann nicht garantiert werden, dass die gegenwärtig zu installierende " -#~ "Version dessen Daten benutzen kann." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Soll der MariaDB-Server automatisch beim Booten starten?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "Der MariaDB-Dienst kann entweder automatisch beim Systemstart oder " -#~ "manuell durch Eingabe des Befehls »/etc/init.d/mysql start« gestartet " -#~ "werden." diff --git a/debian/po/es.po b/debian/po/es.po index 9d9504a4812..9e7e561693b 100644 --- a/debian/po/es.po +++ b/debian/po/es.po @@ -220,170 +220,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "¿Desea realmente continuar con la desactualización?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "" -#~ "Existe un archivo con el nombre /var/lib/mysql/debian-*.flag en este " -#~ "sistema." - -#, fuzzy -#~| msgid "" -#~| "Such file is an indication that a mariadb-server package with a higher " -#~| "version has been installed earlier." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "Este fichero indica que se instaló previamente una versión superior del " -#~ "paquete mariadb-server." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "No se puede garantizar que la versión que está instalando pueda usar la " -#~ "base de datos actual." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "¿DeberÃa ejecutarse el servidor MariaDB al iniciarse el sistema?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "El servidor MariaDB puede iniciarse en el momento de arranque del sistema " -#~ "o manualmente si escribe la orden «/etc/init.d/mysql start»." - -#~ msgid "" -#~ "To use MariaDB, the following entries for users and groups should be " -#~ "added to the system:" -#~ msgstr "" -#~ "Deben añadirse las siguientes entradas para usuarios y grupos en el " -#~ "sistema para poder utilizar MariaDB:" - -#~ msgid "Cannot upgrade if ISAM tables are present!" -#~ msgstr "¡No se puede actualizar si ya hay tablas ISAM!" - -#~ msgid "" -#~ "Recent versions of MySQL can no longer use the old ISAM table format and " -#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " -#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " -#~ "The installation of mysql-server-5.1 will now abort. In case your old " -#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " -#~ "those tables." -#~ msgstr "" -#~ "Las versiones recientes de MySQL ya no soportan el antiguo formato de " -#~ "tabla ISAM. Antes de realizar la actualización es necesario convertir sus " -#~ "tablas a por ejemplo, MyISAM, usando «mysql_convert_table_format» o " -#~ "«ALTER TABLE x ENGINE=MyISAM». Se va a interrumpir ahora la instalación " -#~ "de mysql-server-5.1. Si aún asà su mysql-server-4.1 se elimina aún asÃ, " -#~ "puede reinstalarlo para convertir ese tipo de tablas." - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "¿Soportar las conexiones MySQL establecidadas desde sistemas que ejecutan " -#~ "Debian Sarge o versiones anteriores?" - -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "No era muy segura la forma en la que se almacenaban las contraseñas en " -#~ "versiones anteriores del cliente de MySQL en Debian. Este problema se ha " -#~ "mejorado posteriormente con el inconveniente, sin embargo, de que " -#~ "clientes (por ejemplo, PHP) en sistemas que ejecutan Debian 3.1 «Sarge» " -#~ "no podrán conectarse a cuentas que son nuevas o a las que se le haya " -#~ "cambiado la contraseña." - -#~ msgid "" -#~ "To use mysql you must install an equivalent user and group to the " -#~ "following and ensure yourself that /var/lib/mysql has the right " -#~ "permissions (the uid/gid may be different)." -#~ msgstr "" -#~ "Para utilizar mysql debe instalar un usuario y grupo equivalente al " -#~ "siguiente y asegurarse de que /var/lib/mysql tiene los permisos correctos " -#~ "(los valores del «uid» y del «gid» pueden ser diferentes)." - -#~ msgid "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" -#~ msgstr "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" - -#~ msgid "/etc/group: mysql:x:101:" -#~ msgstr "/etc/group: mysql:x:101:" - -#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" -#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" - -#~ msgid "Remove the databases used by all MySQL versions?" -#~ msgstr "" -#~ "¿Eliminar las bases de datos utilizadas por todas las versiones de MySQL?" - -#~ msgid "" -#~ "If you do not provide a password no changes will be made to the account." -#~ msgstr "" -#~ "No se hará ningún cambio en la cuenta si no introduce una contraseña." - -#~ msgid "" -#~ "When installation finishes, you should verify that the account is " -#~ "properly protected with a password (see README.Debian for more " -#~ "information)." -#~ msgstr "" -#~ "DeberÃa confirmar que la contraseña está correctamente protegida con una " -#~ "contraseña cuando termine la instalación (consulte el fichero README." -#~ "Debian si desea más información)." - -#~ msgid "Install Hints" -#~ msgstr "Sugerencias para la instalación" - -#~ msgid "" -#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in " -#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and " -#~ "have manually be restored." -#~ msgstr "" -#~ "Al actualizar a la versión de MySQL 3.23, la vrsión proporcionada en " -#~ "Debian Woody, se eliminan de manera accidental, los enlaces simbólicos a " -#~ "«/var/lib/mysql» o «/var/log/mysql» y tienen que restaurarse manualmente." - -#~ msgid "" -#~ "MySQL will only install if you have a non-numeric hostname that is " -#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " -#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " -#~ "myhostname\"." -#~ msgstr "" -#~ "Sólo se instalará MySQL si tiene un nombre de equipo que no sea una " -#~ "dirección IP y pueda resolverse a través del archivo /etc/hosts. Por " -#~ "ejemplo, si la orden «hostname» devuelve «MiNombreEquipo» entonces deberá " -#~ "existir una lÃnea «10.0.0.1 MiNombreEquipo» en dicho archivo." - -#~ msgid "" -#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " -#~ "is used in the start/stop and cron scripts. Don't delete." -#~ msgstr "" -#~ "Se creará un nuevo usuario «debian-sys-maint». Esta cuenta de mysql se " -#~ "utilizará en los scripts de inicio y parada y en los scripts «cron». No " -#~ "la elimine." - -#~ msgid "" -#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" -#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " -#~ "there, never only the password!" -#~ msgstr "" -#~ "¡Por favor, recuerde crear una CONTRASEÑA para el usuario «root» de " -#~ "MySQL! ¡Si utiliza /root/.my.cnf debe escribir las lÃneas «user» y " -#~ "«password» en dicho archivo, no incluya sólo la contraseña!" - -#~ msgid "" -#~ "Should I remove the complete /var/lib/mysql directory tree which is used " -#~ "by all MySQL versions, not necessarily only the one you are about to " -#~ "purge?" -#~ msgstr "" -#~ "¿DeberÃa eliminar el árbol de directorio /var/lib/mysql completo? Tenga " -#~ "en cuenta que lo utilizan todas las versiones de MySQL y no sólo la que " -#~ "está a punto de purgar." diff --git a/debian/po/eu.po b/debian/po/eu.po index e17d0cd9305..49082c9059c 100644 --- a/debian/po/eu.po +++ b/debian/po/eu.po @@ -183,44 +183,3 @@ msgstr "Pasahitz sarrera errorea" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "Idatzi dituzun bi pasahitzak ez dira berdina. Mesedez saiatu berriz." - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Benetan bertsio zaharragora itzuli nahi duzu?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "Sisteman badago /var/lib/mysql/debian-*.flag izeneko fitxategi bat." - -#, fuzzy -#~| msgid "" -#~| "Such file is an indication that a mariadb-server package with a higher " -#~| "version has been installed earlier." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "Fitxategi honek aurretik bertsio berriagoko mysql-zerbitzari pakete bat " -#~ "instalatu dela adierazten du." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Ezin da ziurtatu instalatzen ari zaren bertsio honek dauden datubaseak " -#~ "erabili ahal izango dituenik." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Abioan MariaDB zerbitzaria abiarazi?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "Sistema abioan MariaDB automatikoki abiarazi daiteke edo eskuz '/etc/init." -#~ "d/mysql start' eginaz." - -#~ msgid "" -#~ "To use MariaDB, the following entries for users and groups should be " -#~ "added to the system:" -#~ msgstr "" -#~ "MariaDB erabili ahal izateko, hurrengo erabiltzaile eta taldeak gehitu " -#~ "behar dira sisteman:" diff --git a/debian/po/fr.po b/debian/po/fr.po index 42974e7759c..ef2e74058bd 100644 --- a/debian/po/fr.po +++ b/debian/po/fr.po @@ -185,57 +185,3 @@ msgid "The two passwords you entered were not the same. Please try again." msgstr "" "Le mot de passe et sa confirmation ne sont pas identiques. Veuillez " "recommencer." - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Faut-il vraiment revenir à la version précédente ?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "Un fichier /var/lib/mysql/debian-*.flag est présent sur ce système." - -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "Cela indique qu'une version plus récente du paquet mariadb-server a été " -#~ "précédemment installée." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Il n'est pas garanti que cette version puisse en utiliser les données." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Faut-il lancer MariaDB au démarrage ?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "MariaDB peut être lancé soit au démarrage, soit en entrant la commande « /" -#~ "etc/init.d/mysql start »." - -#~ msgid "" -#~ "To use MySQL, the following entries for users and groups should be added " -#~ "to the system:" -#~ msgstr "" -#~ "Pour pouvoir utiliser MySQL, les utilisateurs et les groupes suivants " -#~ "doivent être ajoutés au système :" - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "Gérer les connexions d'hôtes qui utilisent les versions Debian « sarge » " -#~ "ou antérieures  ?" - -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "La méthode de stockage des mots de passe n'était pas très sûre dans les " -#~ "version précédentes de ce paquet. Cette méthode a été améliorée mais les " -#~ "modifications empêchent la connexion avec de nouveaux comptes ou des " -#~ "comptes dont le mot de passe a été modifié, pour les clients (p. ex. PHP) " -#~ "depuis des hôtes qui utilisent Debian 3.1 « sarge »." diff --git a/debian/po/gl.po b/debian/po/gl.po index 99f110f71a8..8c309995001 100644 --- a/debian/po/gl.po +++ b/debian/po/gl.po @@ -185,62 +185,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "¿Quere pasar a unha versión anterior?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "Neste sistema hai un ficheiro chamado /var/lib/mysql/debian-*.flag." - -#, fuzzy -#~| msgid "" -#~| "Such file is an indication that a mariadb-server package with a higher " -#~| "version has been installed earlier." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "Este ficheiro indica que antes se instalou un paquete mariadb-server " -#~ "cunha versión superior." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Non se pode garantir que a versión que está a instalar poida empregar as " -#~ "bases de datos actuais." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "¿Iniciar o servidor MariaDB co ordenador?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "Pódese iniciar automaticamente o servidor MariaDB ao iniciar o ordenador, " -#~ "ou manualmente coa orde \"/etc/init.d/mysql start\"." - -#~ msgid "" -#~ "To use MariaDB, the following entries for users and groups should be " -#~ "added to the system:" -#~ msgstr "" -#~ "Para empregar MariaDB deberÃan engadirse ao sistema as seguintes entradas " -#~ "de usuarios e grupos:" - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "¿Soportar as conexións a MySQL de máquinas que empreguen Debian \"sarge\" " -#~ "ou anterior?" - -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "Nas versións antigas dos clientes MySQL de Debian, os contrasinais non se " -#~ "armacenaban de xeito seguro. Isto mellorouse desde aquela; nembargantes, " -#~ "os clientes (tales coma PHP) das máquinas que executen Debian 3.1 Sarge " -#~ "non se han poder conectar a contas recentes ou a contas nas que se " -#~ "cambiara o contrasinal." diff --git a/debian/po/it.po b/debian/po/it.po index 2a1e0209485..255db97e902 100644 --- a/debian/po/it.po +++ b/debian/po/it.po @@ -179,34 +179,3 @@ msgstr "Errore di inserimento della password" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "Le due password inserite sono diverse. Riprovare." - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Procedere realmente con l'abbassamento di versione?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "" -#~ "Su questo sistema esiste un file con nome /var/lib/mysql/debian-*.flag." - -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "Quel file indica che in precedenza è stata installata una versione " -#~ "superiore del pacchetto mariadb-server." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Non è garantito che la versione che si sta installando sia in grado di " -#~ "usare i database presenti." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Lanciare il server MariaDB all'avvio?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "Il server MariaDB può essere lanciato automaticamente all'avvio del " -#~ "sistema oppure manualmente con il comando «/etc/init.d/mysql start»." diff --git a/debian/po/ja.po b/debian/po/ja.po index 4f4abdc4ecb..2f3c1359601 100644 --- a/debian/po/ja.po +++ b/debian/po/ja.po @@ -184,35 +184,3 @@ msgstr "パスワード入力エラー" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "入力ã•ã‚ŒãŸäºŒã¤ã®ãƒ‘スワードãŒä¸€è‡´ã—ã¾ã›ã‚“。å†å…¥åŠ›ã—ã¦ãã ã•ã„。" - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "本当ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ã‹?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "" -#~ "ã“ã®ã‚·ã‚¹ãƒ†ãƒ ã«ã¯ /var/lib/mysql/debian-*.flag ã¨ã„ã†åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå˜åœ¨" -#~ "ã—ã¦ã„ã¾ã™ã€‚" - -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ„味ã™ã‚‹ã®ã¯ã€ä»¥å‰ã«ã‚ˆã‚Šæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® mariadb-server " -#~ "パッケージãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãŸã“ã¨ã‚’示ã—ã¾ã™ã€‚" - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’ç¾åœ¨ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—よã†ã¨ã—ã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ä½¿ãˆã‚‹ã‹ã©ã†" -#~ "ã‹ã¯ä¿è¨¼ã§ãã¾ã›ã‚“。" - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "MariaDB をシステム起動時ã«é–‹å§‹ã—ã¾ã™ã‹?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "MariaDB ã®èµ·å‹•æ–¹æ³•ã«ã¤ã„ã¦ã€ã‚·ã‚¹ãƒ†ãƒ 起動時ã«è‡ªå‹•çš„ã«é–‹å§‹ã™ã‚‹ã‹ã€ã‚ã‚‹ã„㯠" -#~ "'/etc/init.d/mysql start' ã¨æ‰‹ã§å…¥åŠ›ã—ã¦èµ·å‹•ã™ã‚‹ã‹ã‚’é¸ã¹ã¾ã™ã€‚" diff --git a/debian/po/nb.po b/debian/po/nb.po index 742d9194b4f..742b58dd944 100644 --- a/debian/po/nb.po +++ b/debian/po/nb.po @@ -190,99 +190,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#, fuzzy -#~| msgid "Do you really want to downgrade?" -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Er du sikker pÃ¥ at du vil nedgradere?" - -#, fuzzy -#~| msgid "" -#~| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates " -#~| "that a mysql-server package with a higher version has been installed " -#~| "before. It can not be guaranteed that this version can use its data." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "ADVARSEL: Fila /var/lib/mysql/debian-*.flag finnes. Dette viser at en " -#~ "mariadb-server-pakke med et høyere versjonsnummer har vært installert " -#~ "før. Det kan ikke garanteres at denne versjonen kan bruke data fra den " -#~ "høyere versjonen." - -#, fuzzy -#~| msgid "Should MySQL start on boot?" -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Skal MariaDB startes ved maskinoppstart?" - -#, fuzzy -#~| msgid "" -#~| "The MySQL can start automatically on boot time or only if you manually " -#~| "type '/etc/init.d/mysql start'." -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "MariaDB kan startes automatisk nÃ¥r maskinen starter, eller bare hvis du " -#~ "skriver «/etc/init.d/mysql start»." - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "Skal MySQL-tilkoblinger støttes fra vertsmaskiner som kjører Debian " -#~ "«sarge» eller eldre?" - -#, fuzzy -#~| msgid "" -#~| "The way passwords were stored was not very secure. This has been " -#~| "improved with the drawback that clients (e.g. PHP) from hosts running " -#~| "Debian 3.1 Sarge will not be able to connect to account which are new or " -#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.1/" -#~| "README.Debian." -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "Passord ble tidligere lagret pÃ¥ en lite sikker mÃ¥te. Dette er nÃ¥ " -#~ "forbedret, med den ulempen at klienter (f.eks. PHP) fra verter som kjører " -#~ "Debian 3.1 Sarge ikke vil kunne koble til en konto som er ny eller har " -#~ "fÃ¥tt endret passordet. Se /usr/share/doc/mysql-server-5.1/README.Debian." - -#~ msgid "" -#~ "To use mysql you must install an equivalent user and group to the " -#~ "following and ensure yourself that /var/lib/mysql has the right " -#~ "permissions (the uid/gid may be different)." -#~ msgstr "" -#~ "For Ã¥ bruke MySQL mÃ¥ du installere en bruker og gruppe tilsvarende den " -#~ "nedenfor og se til at /var/lib/mysql har riktige rettigheter (uid/gid kan " -#~ "være forskjellig)." - -#~ msgid "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" -#~ msgstr "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" - -#~ msgid "/etc/group: mysql:x:101:" -#~ msgstr "/etc/group: mysql:x:101:" - -#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" -#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" - -#~ msgid "Remove the databases used by all MySQL versions?" -#~ msgstr "Skal databasene brukt av alle MySQL-versjoner fjernes?" - -#~ msgid "" -#~ "If you do not provide a password no changes will be made to the account." -#~ msgstr "" -#~ "Hvis du ikke oppgir et passord blir det ikke gjort noen endringer med " -#~ "kontoen." - -#~ msgid "" -#~ "When installation finishes, you should verify that the account is " -#~ "properly protected with a password (see README.Debian for more " -#~ "information)." -#~ msgstr "" -#~ "NÃ¥r installasjonen er ferdig bør det sjekkes at kontoen er ordentlig " -#~ "beskyttet med et passord (mer informasjon finnes i README.Debian)." diff --git a/debian/po/nl.po b/debian/po/nl.po index 9945dbce3c4..6473df81055 100644 --- a/debian/po/nl.po +++ b/debian/po/nl.po @@ -190,102 +190,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#, fuzzy -#~| msgid "Do you really want to downgrade?" -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Wilt u echt een oude versie herstellen?" - -#, fuzzy -#~| msgid "" -#~| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates " -#~| "that a mysql-server package with a higher version has been installed " -#~| "before. It can not be guaranteed that this version can use its data." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "Waarschuwing: waarschijnlijk is een hogere versie van het mariadb-server " -#~ "pakket geïnstalleerd geweest (het bestand /var/lib/mysql/debian-*.flag " -#~ "bestaat). Er is geen garantie dat de gegevensbestanden, bewerkt met die " -#~ "hogere versie, kunnen worden gebruikt met de versie van mysql die u nu " -#~ "installeert." - -#, fuzzy -#~| msgid "Should MySQL start on boot?" -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Moet MariaDB starten als de computer start?" - -#, fuzzy -#~| msgid "" -#~| "The MySQL can start automatically on boot time or only if you manually " -#~| "type '/etc/init.d/mysql start'." -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "MariaDB kan automatisch starten bij het starten van de computer, of " -#~ "slechts wanneer u '/etc/init.d/mysql start' handmatig uitvoert." - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "Moet u MySQL-verbindingen accepteren van computers die Debian \"sarge\" " -#~ "of ouder draaien?" - -#, fuzzy -#~| msgid "" -#~| "The way passwords were stored was not very secure. This has been " -#~| "improved with the drawback that clients (e.g. PHP) from hosts running " -#~| "Debian 3.1 Sarge will not be able to connect to account which are new or " -#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.1/" -#~| "README.Debian." -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "De wijze waarop wachtwoorden werden bewaard was niet erg veilig. Dit is " -#~ "verbeterd, maar helaas zullen programma's van computers die Debian 3.1 " -#~ "Sarge draaien, geen verbinding meer kunnen maken met accounts die nieuw " -#~ "zijn, of waarvan het wachtwoord is gewijzigd. Zie /usr/share/doc/mysql-" -#~ "server-5.1/README.Debian." - -#~ msgid "" -#~ "To use mysql you must install an equivalent user and group to the " -#~ "following and ensure yourself that /var/lib/mysql has the right " -#~ "permissions (the uid/gid may be different)." -#~ msgstr "" -#~ "Om mysql te gebruiken dient u een gebruiker en groep aan te maken, " -#~ "gelijkwaardig aan onderstaand voorbeeld, en u dient ervoor te zorgen dat /" -#~ "var/lib/mysql de bijbehorende toegangsrechten heeft (uid en gid mogen " -#~ "anders zijn)." - -#~ msgid "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" -#~ msgstr "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" - -#~ msgid "/etc/group: mysql:x:101:" -#~ msgstr "/etc/group: mysql:x:101:" - -#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" -#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" - -#~ msgid "Remove the databases used by all MySQL versions?" -#~ msgstr "Databases verwijderen die door alle MySQL versies worden gebruikt?" - -#~ msgid "" -#~ "If you do not provide a password no changes will be made to the account." -#~ msgstr "" -#~ "Indien u geen wachtwoord opgeeft zal het account niet worden gewijzigd." - -#~ msgid "" -#~ "When installation finishes, you should verify that the account is " -#~ "properly protected with a password (see README.Debian for more " -#~ "information)." -#~ msgstr "" -#~ "Wanneer de installatie klaar is, dient u te verifiëren dat het account " -#~ "netjes beschermd is met een wachtwoord (zie README.Debian voor meer " -#~ "informatie)." diff --git a/debian/po/pt.po b/debian/po/pt.po index e76adebcb63..b8f34f107c8 100644 --- a/debian/po/pt.po +++ b/debian/po/pt.po @@ -190,117 +190,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Deseja mesmo fazer downgrade?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "" -#~ "Existe um ficheiro chamado /var/lib/mysql/debian-*.flag neste sistema." - -#, fuzzy -#~| msgid "" -#~| "Such file is an indication that a mariadb-server package with a higher " -#~| "version has been installed earlier." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "Tal ficheiro significa que anteriormente foi instalado um pacote mariadb-" -#~ "server com um número de versão superior." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Não existe nenhuma garantia que a versão que está actualmente a instalar " -#~ "seja capaz de utilizar as bases de dados actuais." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Iniciar o servidor MariaDB no arranque?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "O MariaDB pode ser automaticamente lançado no arranque ou manualmente " -#~ "através do comando '/etc/init.d/mysql start'." - -#~ msgid "" -#~ "To use MariaDB, the following entries for users and groups should be " -#~ "added to the system:" -#~ msgstr "" -#~ "Para utilizar o MariaDB, têm de ser acrescentadas as seguintes entradas " -#~ "para os utilizadores e grupos:" - -#~ msgid "Cannot upgrade if ISAM tables are present!" -#~ msgstr "Não é possÃvel actualizar se estiverem presentes tabelas ISAM!" - -#~ msgid "" -#~ "Recent versions of MySQL can no longer use the old ISAM table format and " -#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " -#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " -#~ "The installation of mysql-server-5.1 will now abort. In case your old " -#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " -#~ "those tables." -#~ msgstr "" -#~ "As versões recentes de MySQL já não podem utilizar o antigo formato de " -#~ "tabelas ISAM e é por isso necessário converter as suas tabelas pra e.g. " -#~ "MyISAM antes da actualização, utilizando \"mysql_convert_table_format\" " -#~ "ou \"ALTER TABLE x ENGINE=MyISAM\". A instalação de mysql-server-5.1 irá " -#~ "agora ser cancelada. Se o seu antigo mysql-server-4.1 for removido apenas " -#~ "reinstale para converter essas tabelas." - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "Suportar ligações MySQL de máquinas que corram Debian \"sarge\" ou mais " -#~ "antigos?" - -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "Nas versões antigas de clientes de MySQL em Debian, as palavras-passe não " -#~ "eram guardadas de forma segura. Isto foi melhorado desde aÃ, no entanto " -#~ "os clientes (como o PHP) de máquinas que corram Debian 3.1 Sarge não irão " -#~ "conseguir ligar-se a contas novas ou cuja palavra-passe foi alterada." - -#~ msgid "" -#~ "To use mysql you must install an equivalent user and group to the " -#~ "following and ensure yourself that /var/lib/mysql has the right " -#~ "permissions (the uid/gid may be different)." -#~ msgstr "" -#~ "Para utilizar mysql e instalar um utilizador e grupo equivalentes para o " -#~ "seguinte e assegurar-se que /var/lib/mysql têm as permissões correctas (o " -#~ "uid/gid podem ser diferentes)." - -#~ msgid "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" -#~ msgstr "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" - -#~ msgid "/etc/group: mysql:x:101:" -#~ msgstr "/etc/group: mysql:x:101:" - -#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" -#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" - -#~ msgid "Remove the databases used by all MySQL versions?" -#~ msgstr "Remover as bases de dados utilizadas por todas as versões de MySQL?" - -#~ msgid "" -#~ "If you do not provide a password no changes will be made to the account." -#~ msgstr "" -#~ "Se não disponibilizar uma password não serão feitas alterações nesta " -#~ "conta." - -#~ msgid "" -#~ "When installation finishes, you should verify that the account is " -#~ "properly protected with a password (see README.Debian for more " -#~ "information)." -#~ msgstr "" -#~ "Quando terminar a instalação, deve verificar se a conta está devidamente " -#~ "protegida com uma password (para mais informações veja README.Debian)." diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po index c4484ffa344..7df742ca842 100644 --- a/debian/po/pt_BR.po +++ b/debian/po/pt_BR.po @@ -189,254 +189,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Realmente proceder com o rebaixamento de versão?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "Um arquivo de nome /var/lib/mysql/debian-*.flag existe no sistema." - -#, fuzzy -#~| msgid "" -#~| "Such file is an indication that a mariadb-server package with a higher " -#~| "version has been installed earlier." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "A presença de um arquivo como este é uma indicação de que um pacote " -#~ "mariadb-server com um número de versão mais alto já foi instalado " -#~ "anteriormente." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Não há garantias de que a versão que você está instalando no momento " -#~ "conseguirá utilizar as bases de dados existentes." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Iniciar o servidor MariaDB junto a inicialização da máquina?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "O servidor MariaDB pode ser iniciado automaticamente junto a " -#~ "inicialização da máquina ou manualmente com o comando '/etc/init.d/mysql " -#~ "start'." - -#~ msgid "" -#~ "To use MariaDB, the following entries for users and groups should be " -#~ "added to the system:" -#~ msgstr "" -#~ "Para utilizar o MariaDB, as seguintes entradas para usuários e grupos " -#~ "devem ser adicionadas ao sistema:" - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "Suportar conexões MySQL originadas de hosts executando o Debian \"sarge\" " -#~ "ou mais antigos ?" - -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "Em versões antigas dos clientes MySQL no Debian, as senhas não eram " -#~ "armazenadas de forma segura. Isto foi corrigido desde então, porém, " -#~ "clientes (como o PHP) em hosts executando o Debian 3.1 Sarge não serão " -#~ "capazes de conectar em contas recentes ou contas as quais as senhas " -#~ "tenham sido modificadas." - -#~ msgid "" -#~ "To use mysql you must install an equivalent user and group to the " -#~ "following and ensure yourself that /var/lib/mysql has the right " -#~ "permissions (the uid/gid may be different)." -#~ msgstr "" -#~ "Para utilizar o MySQL, você deve instalar um usuário e um grupo " -#~ "equivalentes ao usuário e grupo a seguir para se certificar de que o " -#~ "diretório /var/lib/mysql possua as permissões correctas (o uid/gid podem " -#~ "ser diferentes)." - -#~ msgid "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" -#~ msgstr "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" - -#~ msgid "/etc/group: mysql:x:101:" -#~ msgstr "/etc/group: mysql:x:101:" - -#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" -#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" - -#~ msgid "Remove the databases used by all MySQL versions?" -#~ msgstr "Remover as bases de dados utilizadas por todas as versões do MySQL?" - -#~ msgid "" -#~ "If you do not provide a password no changes will be made to the account." -#~ msgstr "" -#~ "Caso você não forneça uma senha, nenhuma mudança será feita na conta." - -#~ msgid "" -#~ "When installation finishes, you should verify that the account is " -#~ "properly protected with a password (see README.Debian for more " -#~ "information)." -#~ msgstr "" -#~ "Quando a instalação finalizar, você deverá verificar se a conta está " -#~ "apropriadamente protegida com uma senha (consulte o arquivo README.Debian " -#~ "para maiores informações)." - -#~ msgid "internal" -#~ msgstr "interno" - -#~ msgid "Only internally used." -#~ msgstr "Somente utilizado internamente." - -#, fuzzy -#~ msgid "Update Hints" -#~ msgstr "Dicas de atualização" - -#, fuzzy -#~ msgid "" -#~ "Rarely, e.g. on new major versions, the privilege system is improved. To " -#~ "make use of it mysql_fix_privilege_tables must be executed manually. The " -#~ "script is not supposed to give any user more rights that he had before," -#~ msgstr "" -#~ "Raramente, por exemplo, em novas versões maiores, o sistema de " -#~ "privilégios é melhorado. Para fazer uso disso, o script " -#~ "mysql_fix_privilege_tables deve ser executado manualmente. O script não " -#~ "atribuirá a nenhum usuário mais direitos do que os mesmos já possuÃam " -#~ "anteriormente." - -#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" -#~ msgstr "Por favor, leia http://www.mysql.com/doc/en/Upgrade.html" - -#, fuzzy -#~ msgid "Install Hints" -#~ msgstr "Dicas de instalação" - -#, fuzzy -#~ msgid "" -#~ "MySQL will only install if you have a non-numeric hostname that is " -#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " -#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " -#~ "myhostname\"." -#~ msgstr "" -#~ "O MySQL será instalado somente caso você possua um nome de host NÃO " -#~ "NUMÉRICO que possa ser resolvido através do arquivo /etc/hosts, ou seja, " -#~ "caso o comando \"hostname\" retorne \"myhostname\", uma linha como " -#~ "\"10.0.0.1 myhostname\" deverá existir no arquivo /etc/hosts." - -#~ msgid "" -#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " -#~ "is used in the start/stop and cron scripts. Don't delete." -#~ msgstr "" -#~ "Um novo usuário MySQL de nome \"debian-sys-maint\" será criado. Essa " -#~ "conta MySQL é utilizada pelos scripts de inicialização/parada e pelos " -#~ "scripts cron. Não remova esse usuário." - -#, fuzzy -#~ msgid "" -#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" -#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " -#~ "there, never only the password!" -#~ msgstr "" -#~ "Por favor, lembre-se de definir uma SENHA para o usuário root do MySQL ! " -#~ "Caso você utilize um arquivo /root/.my.cnf, sempre inclua as linhas \"user" -#~ "\" e \"password\" nesse arquivo, nunca somente a senha ! Consulte o " -#~ "arquivo /usr/share/doc/mysql-server/README.Debian para mais informações." - -#~ msgid "" -#~ "Should I remove all databases below /var/lib/mysql as you are purging the " -#~ "mysql-server package?" -#~ msgstr "" -#~ "Todas as base de dados sob o diretório /var/lib/mysql devem ser removidas " -#~ "quando você remover o pacote pacote mysql-server ?" - -#~ msgid "" -#~ "Networking is disabled by default for security reasons. You can enable it " -#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf." -#~ msgstr "" -#~ "O suporte ao funcionamento em rede está desativado por padrão por " -#~ "questões de segurança. Você poderá ativá-lo comentando a opção 'skip-" -#~ "networking' no arquivo /etc/mysql/my.cnf." - -#~ msgid "security and update notice" -#~ msgstr "aviso de segurança e actualização" - -#~ msgid "" -#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-" -#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. " -#~ "remove everything including the configuration) somewhen? (default is not)" -#~ msgstr "" -#~ "Devo remover tudo abaixo de /var/lib/mysql quando fizer o purge do pacote " -#~ "mysql-server com o comando \"dpkg --purge mysql-server\" (ou seja, " -#~ "remover tudo incluÃndo a configuração)? (o padrão é não remover)" - -#~ msgid "Make MySQL reachable via network?" -#~ msgstr "Fazer com que o MySQL seja acessÃvel via rede?" - -#~ msgid "" -#~ "Should MySQL listen on a network reachable TCP port? This is not " -#~ "necessary for use on a single computer and could be a security problem." -#~ msgstr "" -#~ "O MySQL deve aguardar ligações numa porta TCP acessÃvel via rede? Isto " -#~ "não é necessário para uso num único computador e pode ser um problema de " -#~ "segurança." - -#~ msgid "Enable chroot mode?" -#~ msgstr "Activar o modo chroot?" - -#~ msgid "" -#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so " -#~ "that users cannot modify any files outside this directory. This improves " -#~ "resistence against crackers, too, as they are not able to modify system " -#~ "files." -#~ msgstr "" -#~ "O MySQL é capaz de se prender no diretório /var/lib/mysql_jail, assim os " -#~ "utilizadores não poderão modificar ficheiros fora deste directório. Isto " -#~ "aumenta também a resistência contra crackers, pois eles não poderão " -#~ "modificar arquivos de sistema." - -#~ msgid "Please run mysql_fix_privilege_tables !" -#~ msgstr "Por favor execute mysql_fix_privilege_tables !" - -#~ msgid "" -#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs " -#~ "other than root and mysql with mysql." -#~ msgstr "" -#~ "Permissões seguras para o diretório /var/lib/mysql serão asseguradas " -#~ "substituÃndo GIDs diferentes de root e mysql por mysql." - -#~ msgid "" -#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/" -#~ msgstr "" -#~ "Instruções sobre como activar o suporte de SSL estão disponÃveis no " -#~ "directório /usr/share/doc/mysql-server/." - -#, fuzzy -#~ msgid "mysql_fix_privileges_tables should be executed" -#~ msgstr "mysql_fix_privileges_tables será executado" - -#, fuzzy -#~ msgid "" -#~ "The latest MySQL versions have an enhanced, more fine grained, privilege " -#~ "system. To make use of it, some new fields must be added to the tables " -#~ "in the \"mysql\" database. This will not happen automatically." -#~ msgstr "" -#~ "As últimas versões do MySQL possuem um sistema de privilégios melhorado e " -#~ "mais refinado. Para utilizá-lo, alguns novos campos devem ser adicionados " -#~ "as tabelas na base de dados \"mysql\". Isto é feito pelo script " -#~ "mysql_fix_privileges_tables durante esta actualização independente do " -#~ "servidor estar a correr ou não !" - -#~ msgid "" -#~ "This script is not supposed to give any user more rights that he had " -#~ "before, if you encounter such a case, please contact me." -#~ msgstr "" -#~ "Este script não deverá fornecer mais direitos a um utilizador além dos " -#~ "quais ele já possua anteriormente. SE encontrar um caso desses, por favor " -#~ "entre em contacto com o mantainer deste pacote Debian." diff --git a/debian/po/ro.po b/debian/po/ro.po index 853107d1f9d..e54ed9ba6ba 100644 --- a/debian/po/ro.po +++ b/debian/po/ro.po @@ -190,120 +190,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#, fuzzy -#~| msgid "Do you really want to downgrade?" -#~ msgid "Really proceed with downgrade?" -#~ msgstr "SunteÅ£i sigur că doriÅ£i să instalaÅ£i o versiune mai veche?" - -#, fuzzy -#~| msgid "" -#~| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates " -#~| "that a mysql-server package with a higher version has been installed " -#~| "before. It can not be guaranteed that this version can use its data." -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "AVERTISMENT: FiÅŸierul /var/lib/mysql/debian-*.flag există. Acest lucru " -#~ "indică faptul că anterior a fost instalată o versiune nouă a pachetului " -#~ "mariadb-server. Nu se poate garanta că versiunea instalată acum poate " -#~ "folosi datele versiunii instalate anterior." - -#, fuzzy -#~| msgid "Should MySQL start on boot?" -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "DoriÅ£i ca MariaDB să pornească la initializarea sistemului?" - -#, fuzzy -#~| msgid "" -#~| "The MySQL can start automatically on boot time or only if you manually " -#~| "type '/etc/init.d/mysql start'." -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "MariaDB poate porni automat la iniÅ£ializarea sistemului sau doar dacă " -#~ "rulaÅ£i comanda „/etc/init.d/mysql startâ€." - -#~ msgid "Cannot upgrade if ISAM tables are present!" -#~ msgstr "Nu se poate face actualizarea dacă sunt prezente tabele ISAM!" - -#~ msgid "" -#~ "Recent versions of MySQL can no longer use the old ISAM table format and " -#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " -#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " -#~ "The installation of mysql-server-5.1 will now abort. In case your old " -#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " -#~ "those tables." -#~ msgstr "" -#~ "Versiunile recente MySQL nu mai pot folosi vechiul format de tabele ISAM " -#~ "ÅŸieste necesar să convertiÅ£i tabelele dumneavoastră de ex. la formatul " -#~ "MyISAM înainte de a face actualizarea folosind comanda " -#~ "„mysql_convert_table_format†sau „ALTER TABLE x ENGINE=MyISAMâ€. " -#~ "Instalarea mysql-server-5.1 va eÅŸua. ÃŽn caz că ÅŸtergeÅ£iversiunea " -#~ "anterioară mysql-server-4.1 va trebui reinstalată pentru a converti " -#~ "tabelele." - -#~ msgid "" -#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" -#~ msgstr "" -#~ "SuportaÅ£i conexiuni MySQL de la staÅ£ii ce rulează sistemul Debian „sarge†" -#~ "sau mai vechi?" - -#, fuzzy -#~| msgid "" -#~| "The way passwords were stored was not very secure. This has been " -#~| "improved with the drawback that clients (e.g. PHP) from hosts running " -#~| "Debian 3.1 Sarge will not be able to connect to account which are new or " -#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.1/" -#~| "README.Debian." -#~ msgid "" -#~ "In old versions of MySQL clients on Debian, passwords were not stored " -#~ "securely. This has been improved since then, however clients (such as " -#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " -#~ "recent accounts or accounts whose password have been changed." -#~ msgstr "" -#~ "Modul în care erau păstrate parolele nu era foarte sigur. Acest lucru a " -#~ "fost îmbunătăţitcu dezajantajul că clienÅ£ii (de ex. PHP) de pe staÅ£ii ce " -#~ "rulează sistemul Debian 3.1 Sargenu se vor putea conecta la conturi noi " -#~ "sau ale căror parole au fost schimbate. CitiÅ£i /usr/share/doc/mysql-" -#~ "server-5.1/README.Debian." - -#~ msgid "" -#~ "To use mysql you must install an equivalent user and group to the " -#~ "following and ensure yourself that /var/lib/mysql has the right " -#~ "permissions (the uid/gid may be different)." -#~ msgstr "" -#~ "Pentru a folosi mysql trebuie să adăugaÅ£i un utilizator ÅŸi grup " -#~ "echivalent ÅŸi să vă asiguraÅ£i că /var/lib/mysql are permisiunile " -#~ "stabilite corect (uid/gid pot aveavalori diferite)." - -#~ msgid "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" -#~ msgstr "" -#~ "/etc/passwd:\tmysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" - -#~ msgid "/etc/group: mysql:x:101:" -#~ msgstr "/etc/group:\tmysql:x:101:" - -#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" -#~ msgstr "/var/lib/mysql:\tdrwxr-xr-x\tmysql\tmysql" - -#~ msgid "Remove the databases used by all MySQL versions?" -#~ msgstr "DoriÅ£i să ÅŸtergeÅ£i bazele de date folosite de toate versiune MySQL?" - -#~ msgid "" -#~ "If you do not provide a password no changes will be made to the account." -#~ msgstr "" -#~ "Dacă nu introduceÅ£i nici o parolă, nici o schimbare nu va fi luată în " -#~ "considerare." - -#~ msgid "" -#~ "When installation finishes, you should verify that the account is " -#~ "properly protected with a password (see README.Debian for more " -#~ "information)." -#~ msgstr "" -#~ "După finalizarea instalării, ar trebui să verificaÅ£i dacă contul este " -#~ "protejat cu o parolă (citiÅ£i fiÅŸierul README.Debian pentru informaÅ£ii " -#~ "suplimentare)." diff --git a/debian/po/ru.po b/debian/po/ru.po index 0810077af62..6198b7425c8 100644 --- a/debian/po/ru.po +++ b/debian/po/ru.po @@ -187,33 +187,3 @@ msgstr "Ошибка ввода паролÑ" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "Два введённых Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð½Ðµ одинаковы. Повторите ввод." - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "ДейÑтвительно уÑтановить более Ñтарую верÑию?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "Ð’ ÑиÑтеме найден файл /var/lib/mysql/debian-*.flag." - -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "Ðто означает, что ранее уже был уÑтановлен пакет mariadb-server более " -#~ "новой верÑии." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Ðет гарантий, что верÑиÑ, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑƒÑтанавливаетÑÑ ÑейчаÑ, будет ÑпоÑобна " -#~ "работать Ñ Ð¸Ð¼ÐµÑŽÑ‰Ð¸Ð¼Ð¸ÑÑ Ð±Ð°Ð·Ð°Ð¼Ð¸ данных." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "ЗапуÑкать MariaDB при загрузке ÑиÑтемы?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "Сервер MariaDB можно запуÑкать автоматичеÑки при загрузке ÑиÑтемы или " -#~ "вручную по команде '/etc/init.d/mysql start'." diff --git a/debian/po/sv.po b/debian/po/sv.po index d5e7f89e5d6..9b74e3300ab 100644 --- a/debian/po/sv.po +++ b/debian/po/sv.po @@ -181,40 +181,3 @@ msgstr "Fel vid inmatning av lösenord" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "De tvÃ¥ lösenorden du angav stämde inte överrens. Prova igen." - -#~ msgid "Really proceed with downgrade?" -#~ msgstr "Vill du verkligen genomföra nedgraderingen?" - -#~ msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." -#~ msgstr "En fil med namnet /var/lib/mysql/debian-*.flag hittades i systemet." - -#~ msgid "" -#~ "Such a file is an indication that a mariadb-server package with a higher " -#~ "version has been installed previously." -#~ msgstr "" -#~ "En sÃ¥dan fil är en indikation pÃ¥ att paketet mariadb-server med ett högre " -#~ "versionsnummer har installerats tidigare." - -#~ msgid "" -#~ "There is no guarantee that the version you're currently installing will " -#~ "be able to use the current databases." -#~ msgstr "" -#~ "Det finns ingen garanti för att den version som du hÃ¥ller pÃ¥ att " -#~ "installera kommer att kunna använda de aktuella databaserna." - -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "Ska MariaDB startas vid systemets uppstart?" - -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "MariaDB-servern kan startas vid systemets uppstart eller manuellt med " -#~ "kommandot \"/etc/init.d/mysql start\"." - -#~ msgid "" -#~ "To use MySQL, the following entries for users and groups should be added " -#~ "to the system:" -#~ msgstr "" -#~ "För att använda MySQL mÃ¥ste följande användare och grupper läggas till i " -#~ "systemet:" diff --git a/debian/po/tr.po b/debian/po/tr.po index b05e43190f3..a4249bfe9c6 100644 --- a/debian/po/tr.po +++ b/debian/po/tr.po @@ -159,165 +159,3 @@ msgstr "" #: ../mariadb-server-10.5.templates:8001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" - -#, fuzzy -#~| msgid "Should MySQL start on boot?" -#~ msgid "Start the MariaDB server on boot?" -#~ msgstr "MariaDB açılış sırasında baÅŸlatılsın mı?" - -#, fuzzy -#~ msgid "" -#~ "The MariaDB server can be launched automatically at boot time or manually " -#~ "with the '/etc/init.d/mysql start' command." -#~ msgstr "" -#~ "MariaDB açılış sırasında veya '/etc/init.d/mysql start' komutunu vermeniz " -#~ "halinde elle baÅŸlatılabilir. EÄŸer açılışta otomatik olarak baÅŸlatılmasını " -#~ "istiyorsanız burada 'evet'i seçin." - -#~ msgid "" -#~ "To use mysql you must install an equivalent user and group to the " -#~ "following and ensure yourself that /var/lib/mysql has the right " -#~ "permissions (the uid/gid may be different)." -#~ msgstr "" -#~ "Mysql'i kullanmak için aÅŸağıdakiyle eÅŸdeÄŸer bir kullanıcı ve grup " -#~ "tanımlamalı, ve /var/lib/mysql izinlerinin uygun ÅŸekilde ayarlandığından " -#~ "emin olmalısınız (uid/gid farklı olabilir)." - -#~ msgid "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" -#~ msgstr "" -#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" - -#~ msgid "/etc/group: mysql:x:101:" -#~ msgstr "/etc/group: mysql:x:101:" - -#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" -#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" - -#, fuzzy -#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" -#~ msgstr "Lütfen http://www.mysql.com/doc/en/Upgrade.html belgesini okuyun" - -#, fuzzy -#~ msgid "" -#~ "MySQL will only install if you have a non-numeric hostname that is " -#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " -#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " -#~ "myhostname\"." -#~ msgstr "" -#~ "MySQL sadece /etc/hosts dosyası yoluyla çözülebilir NUMERÄ°K OLMAYAN bir " -#~ "makine adına sahipseniz kurulacaktır. ÖrneÄŸin, eÄŸer \"hostname\" komutu " -#~ "\"makinem\" ismini döndürüyorsa, bu dosya içinde \"10.0.0.1 makinem\" " -#~ "gibi bir satır olmalıdır." - -#, fuzzy -#~ msgid "" -#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " -#~ "is used in the start/stop and cron scripts. Don't delete." -#~ msgstr "" -#~ "Yeni mysql kullanıcısı \"debian-sys-maint\" yaratılacak. Bu hesap, " -#~ "baÅŸlangıç betiklerinde ve cron içinde kullanılıyor. Bu hesabı silmeyin." - -#, fuzzy -#~ msgid "" -#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" -#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " -#~ "there, never only the password!" -#~ msgstr "" -#~ "Lütfen MySQL root kullanıcısı için bir PAROLA girmeyi unutmayın! EÄŸer /" -#~ "root/.my.cnf kullanıyorsanız, \"user\" ve \"password\" satırlarını her " -#~ "zaman buraya ekleyin, sadece parolayı deÄŸil! Daha fazla bilgi için /usr/" -#~ "share/doc/mysql-server/README.Debian dosyasını okuyun." - -#, fuzzy -#~ msgid "" -#~ "Should I remove all databases below /var/lib/mysql as you are purging the " -#~ "mysql-server package?" -#~ msgstr "" -#~ "mysql-server paketi kaldırıldıktan sonra bütün veritabanları silinsin mi?" - -#~ msgid "" -#~ "Networking is disabled by default for security reasons. You can enable it " -#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf." -#~ msgstr "" -#~ "AÄŸ, öntanımlı olarak güvenlik gerekçeleriyle devre dışı bırakıldı. Bu " -#~ "özelliÄŸi /etc/mysql/my.cnf dosyası içindeki \"skip-networking\" " -#~ "seçeneÄŸini kaldırarak etkinleÅŸtirebilirsiniz." - -#~ msgid "security and update notice" -#~ msgstr "güvenlik ve güncelleme duyurusu" - -#~ msgid "" -#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-" -#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. " -#~ "remove everything including the configuration) somewhen? (default is not)" -#~ msgstr "" -#~ "mysql-server paketini temizlemek için \"dpkg --purge mysql-server\" " -#~ "komutunu kullandığınızda (yani yapılandırma dahil herÅŸeyi silmek) /var/" -#~ "lib/mysql altındaki herÅŸeyi sileyim mi? (öntanımlı cevap hayır'dır)." - -#~ msgid "Please run mysql_fix_privilege_tables !" -#~ msgstr "Lütfen mysql_fix_privilege_tables komutunu çalıştırın!" - -#~ msgid "" -#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs " -#~ "other than root and mysql with mysql." -#~ msgstr "" -#~ "/var/lib/mysql'in izinlerinin güvenli olmasını saÄŸlamak amacıyla, buna " -#~ "ait GID'leri root ve mysql'den farklı olacak ÅŸekilde deÄŸiÅŸtireceÄŸim." - -#~ msgid "" -#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/" -#~ msgstr "" -#~ "SSL desteÄŸini nasıl etkinleÅŸtirebileceÄŸinize iliÅŸkin talimatlar /usr/" -#~ "share/doc/mysql-server/ içinde." - -#~ msgid "mysql_fix_privileges_tables will be executed" -#~ msgstr "mysql_fix_privileges_tables çalıştırılacak" - -#~ msgid "" -#~ "The latest MySQL versions have an enhanced, more fine grained, privilege " -#~ "system. To make use of it, some new fields must be added to the tables " -#~ "in the \"mysql\" database. This is done by the " -#~ "mysql_fix_privilege_tables script during this upgrade regardless of if " -#~ "the server is currently running or not!" -#~ msgstr "" -#~ "En son MySQL sürümleri zenginleÅŸtirilmiÅŸ, daha ayrıntılandırılmış bir " -#~ "ayrıcalık (privilege) sistemine sahiptir. Yeni sistemi kullanmak için, " -#~ "\"mysql\" veritabanındaki tablolara bazı yeni alanlar eklenmelidir. Bu " -#~ "iÅŸlem, sunucunun çalışıp çalışmamasına baÄŸlı olmaksızın " -#~ "mysql_fix_privilege_tables betiÄŸi tarafından bu yükseltme sırasında " -#~ "yapılır." - -#~ msgid "" -#~ "This script is not supposed to give any user more rights that he had " -#~ "before, if you encounter such a case, please contact me." -#~ msgstr "" -#~ "Bu betiÄŸin hiç bir kullanıcıya öncekinden daha fazla hak kazandırmadığı " -#~ "varsayılıyor. EÄŸer bunun aksinde bir durumla karşılaşırsanız, lütfen " -#~ "benimle baÄŸlantıya geçin." - -#~ msgid "Make MySQL reachable via network?" -#~ msgstr "MySQL network üzerinden ulaşılabilir olsun mu?" - -#~ msgid "" -#~ "Should MySQL listen on a network reachable TCP port? This is not " -#~ "necessary for use on a single computer and could be a security problem." -#~ msgstr "" -#~ "MySQL aÄŸ üzerinde ulaşılabilen bir TCP portunu dinlesin mi? Tek olan bir " -#~ "bilgisayar için bu ayar gerekli deÄŸildir ve bir güvenlik sorunu " -#~ "oluÅŸturabilir." - -#~ msgid "Enable chroot mode?" -#~ msgstr "chroot kipi etkinleÅŸtirilsin mi?" - -#~ msgid "" -#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so " -#~ "that users cannot modify any files outside this directory. This improves " -#~ "resistence against crackers, too, as they are not able to modify system " -#~ "files." -#~ msgstr "" -#~ "MySQL kendini /var/lib/mysql_jail dizinine hapsederek kullanıcıların bu " -#~ "dizin dışındaki hiç bir dosyayı deÄŸiÅŸtirmemesini saÄŸlayabilir. Bu " -#~ "düzenleme, sistem dosyalarını deÄŸiÅŸtirmelerini engelleyeceÄŸinden, " -#~ "cracker'lara karşı dayanıklılığı arttırır." diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index fb6c1f519a3..d666cd7aa13 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -5193,7 +5193,11 @@ next_file_item_1: goto next_datadir_item; } - snprintf(dbpath, sizeof(dbpath)-1, "%s/%s", path, dbinfo.name); + snprintf(dbpath, sizeof(dbpath), "%.*s/%.*s", + OS_FILE_MAX_PATH/2-1, + path, + OS_FILE_MAX_PATH/2-1, + dbinfo.name); os_normalize_path(dbpath); diff --git a/extra/wolfssl/CMakeLists.txt b/extra/wolfssl/CMakeLists.txt index 6de9ea5d5d3..cf6715280e3 100644 --- a/extra/wolfssl/CMakeLists.txt +++ b/extra/wolfssl/CMakeLists.txt @@ -1,3 +1,26 @@ +IF(MSVC) + PROJECT(wolfssl C ASM_MASM) +ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + PROJECT(wolfssl C ASM) +ELSE() + PROJECT(wolfssl C) +ENDIF() + +IF(MSVC AND (CMAKE_SIZEOF_VOID_P MATCHES 8)) + SET(WOLFSSL_INTELASM ON) +ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + IF(CMAKE_C_COMPILER_ID MATCHES GNU AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) + MESSAGE_ONCE(NO_INTEL_ASSEMBLY "Disable Intel assembly for WolfSSL - compiler is too old") + ELSE() + MY_CHECK_C_COMPILER_FLAG(-maes) + MY_CHECK_C_COMPILER_FLAG(-msse4) + MY_CHECK_C_COMPILER_FLAG(-mpclmul) + ENDIF() + IF(have_C__maes AND have_C__msse4 AND have_C__mpclmul) + SET(WOLFSSL_INTELASM ON) + ENDIF() +ENDIF() + SET(WOLFSSL_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/src) ADD_DEFINITIONS(${SSL_DEFINES}) ADD_DEFINITIONS( @@ -32,7 +55,7 @@ ADD_DEFINITIONS(-DWOLFSSL_LIB) INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl) IF(MSVC) # size_t to long truncation warning - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4267") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd4267 -wd4334") IF(CMAKE_C_COMPILER_ID MATCHES Clang) # Workaround a bug with clang-cl, see https://github.com/wolfSSL/wolfssl/pull/2090 ADD_DEFINITIONS(-DMP_16BIT) @@ -66,7 +89,6 @@ ${WOLFCRYPT_SRCDIR}/dsa.c ${WOLFCRYPT_SRCDIR}/ecc.c ${WOLFCRYPT_SRCDIR}/error.c ${WOLFCRYPT_SRCDIR}/hmac.c -${WOLFCRYPT_SRCDIR}/integer.c ${WOLFCRYPT_SRCDIR}/logging.c ${WOLFCRYPT_SRCDIR}/md4.c ${WOLFCRYPT_SRCDIR}/md5.c @@ -85,5 +107,42 @@ ${WOLFCRYPT_SRCDIR}/hash.c ${WOLFCRYPT_SRCDIR}/wolfmath.c ) +# Use fastmath large number math library. +IF(NOT (MSVC AND CMAKE_C_COMPILER_ID MATCHES Clang) + AND (CMAKE_SIZEOF_VOID_P EQUAL 8)) + SET(WOLFSSL_FASTMATH 1) +ENDIF() + +IF(WOLFSSL_FASTMATH) + ADD_DEFINITIONS(-DUSE_FAST_MATH) + # FP_MAX_BITS is set high solely to satisfy ssl_8k_key.test + # WolfSSL will use more stack space with it + ADD_DEFINITIONS(-DFP_MAX_BITS=16384) + SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/tfm.c) +ELSE() + SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/integer.c) +ENDIF() + +IF(WOLFSSL_INTELASM) + ADD_DEFINITIONS(-DWOLFSSL_AESNI) + SET(SSL_DEFINES "${SSL_DEFINES} -DWOLFSSL_AESNI" PARENT_SCOPE) + LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/cpuid.c) + IF(MSVC) + LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/aes_asm.asm) + IF(CMAKE_C_COMPILER_ID MATCHES Clang) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes") + ELSE() + ADD_DEFINITIONS(-DHAVE_INTEL_RDSEED -DWOLFSSL_X86_64_BUILD) + ENDIF() + ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + ADD_DEFINITIONS(-DHAVE_INTEL_RDSEED -DUSE_INTEL_SPEEDUP) + LIST(APPEND WOLFCRYPT_SOURCES + ${WOLFCRYPT_SRCDIR}/aes_asm.S + ${WOLFCRYPT_SRCDIR}/sha512_asm.S + ${WOLFCRYPT_SRCDIR}/sha256_asm.S) + ADD_DEFINITIONS(-maes -msse4 -mpclmul) + ENDIF() +ENDIF() + ADD_CONVENIENCE_LIBRARY(wolfcrypt ${WOLFCRYPT_SOURCES}) diff --git a/include/mysql/service_my_crypt.h b/include/mysql/service_my_crypt.h index 2de698fe41c..039125066ca 100644 --- a/include/mysql/service_my_crypt.h +++ b/include/mysql/service_my_crypt.h @@ -45,7 +45,7 @@ extern "C" { /* The max key length of all supported algorithms */ #define MY_AES_MAX_KEY_LENGTH 32 -#define MY_AES_CTX_SIZE 560 +#define MY_AES_CTX_SIZE 600 enum my_aes_mode { MY_AES_ECB, MY_AES_CBC diff --git a/libmariadb b/libmariadb -Subproject 68e6c5bd670ee0e6fee8fd82f160611c4529ac5 +Subproject ab4d09dd8de0bb2c56ca0c60cb386f02d173619 diff --git a/mysql-test/lib/My/Config.pm b/mysql-test/lib/My/Config.pm index 12647edf0a4..ecc0830c3df 100644 --- a/mysql-test/lib/My/Config.pm +++ b/mysql-test/lib/My/Config.pm @@ -21,6 +21,17 @@ use strict; use warnings; use Carp; +# Define all MariaDB options that the user should be able to specify +# many times in the config file. Note that options must be written +# using '-' instead of '_' here! + +my %multipart_options= + ( + "plugin-load-add" => 1, + "optimizer-switch" => 1, +); + + sub new { my ($class, $option_name, $option_value)= @_; my $self= bless { name => $option_name, @@ -327,7 +338,6 @@ sub new { # Skip comment next; } - else { croak "Unexpected line '$line' found in '$path'"; } @@ -355,6 +365,11 @@ sub insert { if ( defined $option ) { #print "option: $option, value: $value\n"; + my $tmp_option= $option; + $tmp_option =~ s/_/-/g; + + # If the option is an option that one can specify many times, always add + $if_not_exist= 1 if ($multipart_options{$tmp_option}); # Add the option to the group $group->insert($option, $value, $if_not_exist); diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 60eb1ee94d5..261de37ab54 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -291,7 +291,7 @@ sub post_check_client_groups { $first_mysqld->name()); # Then generate [client.<suffix>] for each [mysqld.<suffix>] - foreach my $mysqld ( $config->like('mysqld.') ) { + foreach my $mysqld ( $config->like('mysqld\.') ) { $self->post_check_client_group($config, 'client'.$mysqld->after('mysqld'), $mysqld->name()) @@ -313,7 +313,7 @@ sub post_check_embedded_group { my $mysqld= $config->group('mysqld') or croak "Can't run with embedded, config has no default mysqld section"; - my $first_mysqld= $config->first_like('mysqld.') or + my $first_mysqld= $config->first_like('mysqld\.') or croak "Can't run with embedded, config has no mysqld"; my %no_copy = map { $_ => 1 } @@ -351,7 +351,7 @@ sub resolve_at_variable { } $res .= $after; - $config->insert($group->name(), $option->name(), $res) + $option->{value}= $res; } @@ -436,7 +436,7 @@ sub new_config { } $self->run_section_rules($config, - 'mysqld.', + 'mysqld\.', @mysqld_rules); # [mysqlbinlog] need additional settings diff --git a/mysql-test/main/backup_lock_debug.result b/mysql-test/main/backup_lock_debug.result index 8832d9cd3e7..7c7b05901a9 100644 --- a/mysql-test/main/backup_lock_debug.result +++ b/mysql-test/main/backup_lock_debug.result @@ -26,3 +26,28 @@ disconnect con1; connection default; DROP TABLE t1; SET DEBUG_SYNC= 'RESET'; +# +# Demonstrates a deadlock if BACKUP namespace is reorder after SCHEMA. +# Culprit is ALTER TABLE taking SCHEMA lock on target database after +# BACKUP lock was acquired. +# +CREATE DATABASE test2; +CREATE TABLE t1(a INT) ENGINE=InnoDB; +SET DEBUG_SYNC='alter_opened_table SIGNAL ready WAIT_FOR go'; +ALTER TABLE t1 RENAME TO test2.t1; +connect con1,localhost,root,,; +SET DEBUG_SYNC='now WAIT_FOR ready'; +BACKUP STAGE START; +SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL ready1'; +BACKUP STAGE BLOCK_DDL; +connect con2,localhost,root,,; +SET DEBUG_SYNC='now WAIT_FOR ready1'; +SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL go'; +DROP DATABASE test2; +connection default; +connection con1; +disconnect con1; +connection con2; +disconnect con2; +connection default; +SET DEBUG_SYNC='reset'; diff --git a/mysql-test/main/backup_lock_debug.test b/mysql-test/main/backup_lock_debug.test index 8cf492b3404..80e7cf9e181 100644 --- a/mysql-test/main/backup_lock_debug.test +++ b/mysql-test/main/backup_lock_debug.test @@ -3,6 +3,7 @@ ######################################################################## --source include/have_debug_sync.inc +--source include/have_innodb.inc --echo # --echo # Make sure pending LOCK TABLES doesn't block BACKUP STAGE @@ -38,3 +39,40 @@ disconnect con1; connection default; DROP TABLE t1; SET DEBUG_SYNC= 'RESET'; + + +--echo # +--echo # Demonstrates a deadlock if BACKUP namespace is reorder after SCHEMA. +--echo # Culprit is ALTER TABLE taking SCHEMA lock on target database after +--echo # BACKUP lock was acquired. +--echo # +CREATE DATABASE test2; +CREATE TABLE t1(a INT) ENGINE=InnoDB; + +SET DEBUG_SYNC='alter_opened_table SIGNAL ready WAIT_FOR go'; +send ALTER TABLE t1 RENAME TO test2.t1; + +connect (con1,localhost,root,,); +SET DEBUG_SYNC='now WAIT_FOR ready'; +BACKUP STAGE START; +SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL ready1'; +send BACKUP STAGE BLOCK_DDL; + +connect (con2,localhost,root,,); +SET DEBUG_SYNC='now WAIT_FOR ready1'; +SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL go'; +send DROP DATABASE test2; + +connection default; +reap; + +connection con1; +reap; +disconnect con1; + +connection con2; +reap; +disconnect con2; + +connection default; +SET DEBUG_SYNC='reset'; diff --git a/mysql-test/main/invisible_field.result b/mysql-test/main/invisible_field.result index 36e62645ef2..87c2b940c7e 100644 --- a/mysql-test/main/invisible_field.result +++ b/mysql-test/main/invisible_field.result @@ -404,8 +404,8 @@ b int(11) YES NULL c int(11) YES NULL explain select * from t1,t2 where t1.b = t2.c and t1.c = t2.b; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL b,c NULL NULL NULL 10 -1 SIMPLE t2 ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t2 ALL NULL NULL NULL NULL 10 Using where +1 SIMPLE t1 ref b,c b 5 test.t2.c 1 Using where select * from t1,t2 where t1.b = t2.c and t1.c = t2.b; a a b c 1 1 1 1 diff --git a/mysql-test/main/join.result b/mysql-test/main/join.result index 47c3e78116f..5c7f24b8d62 100644 --- a/mysql-test/main/join.result +++ b/mysql-test/main/join.result @@ -1605,3 +1605,34 @@ SELECT STRAIGHT_JOIN * FROM t1, t2 AS t2_1, t2 AS t2_2 WHERE t2_2.c = t2_1.c AND t2_2.b = t2_1.b AND ( a IS NULL OR t2_1.c = a ); a b c b c DROP TABLE t1,t2; +# +# MDEV-19600: The optimizer should be able to produce rows=1 estimate for unique index with NULLable columns +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 ( +pk int not null primary key auto_increment, +a int, +b int, +unique key(a) +); +insert into t1 (a,b) select null, 12345 from t0 A, t0 B, t0 C; +insert into t1 (a,b) select a,a from t0; +# Simulate InnoDB's persistent statistics (It always uses nulls_equal) +set @tmp1= @@myisam_stats_method; +set myisam_stats_method=nulls_equal; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +set myisam_stats_method=@tmp1; +show keys from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment +t1 0 PRIMARY 1 pk A 1010 NULL NULL BTREE +t1 0 a 1 a A 1010 NULL NULL YES BTREE +# t1 must use ref(t1.a=t0.a) and rows must be 1 (and not 45): +explain select * from t0,t1 where t0.a=t1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where +1 SIMPLE t1 ref a a 5 test.t0.a 1 +drop table t0,t1; diff --git a/mysql-test/main/join.test b/mysql-test/main/join.test index 6b0481d859b..223886b579c 100644 --- a/mysql-test/main/join.test +++ b/mysql-test/main/join.test @@ -1255,3 +1255,33 @@ SELECT STRAIGHT_JOIN * FROM t1, t2 AS t2_1, t2 AS t2_2 WHERE t2_2.c = t2_1.c AND t2_2.b = t2_1.b AND ( a IS NULL OR t2_1.c = a ); DROP TABLE t1,t2; + +--echo # +--echo # MDEV-19600: The optimizer should be able to produce rows=1 estimate for unique index with NULLable columns +--echo # + +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t1 ( + pk int not null primary key auto_increment, + a int, + b int, + unique key(a) +); + +# 10K of null values +insert into t1 (a,b) select null, 12345 from t0 A, t0 B, t0 C; +insert into t1 (a,b) select a,a from t0; + +--echo # Simulate InnoDB's persistent statistics (It always uses nulls_equal) +set @tmp1= @@myisam_stats_method; +set myisam_stats_method=nulls_equal; +analyze table t1; +set myisam_stats_method=@tmp1; +show keys from t1; + +--echo # t1 must use ref(t1.a=t0.a) and rows must be 1 (and not 45): +explain select * from t0,t1 where t0.a=t1.a; + +drop table t0,t1; diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result index 3e4b7fe6e8a..c0e0b4807a1 100644 --- a/mysql-test/main/opt_trace.result +++ b/mysql-test/main/opt_trace.result @@ -867,7 +867,7 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b { "table": "t1", "field": "a", "equals": "t2.b + 2", - "null_rejecting": false + "null_rejecting": true }, { "table": "t2", @@ -1446,7 +1446,7 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id { { "index": "id", "covering": true, - "ranges": ["(0x24a20f) <= (a)"], + "ranges": ["(2001-01-04) <= (a)"], "rows": 9, "cost": 2.35 } @@ -1462,7 +1462,7 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id { "rows": 9, "cost": 2.35, "key_parts_used_for_access": ["id"], - "ranges": ["(0x24a20f) <= (a)"], + "ranges": ["(2001-01-04) <= (a)"], "chosen": false, "cause": "cost" }, @@ -1624,7 +1624,7 @@ EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id { { "index": "id", "covering": true, - "ranges": ["(0x24a20f) <= (a) <= (0x24a20f)"], + "ranges": ["(2001-01-04) <= (a) <= (2001-01-04)"], "rows": 9, "cost": 2.35 } @@ -1640,7 +1640,7 @@ EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id { "rows": 9, "cost": 2.35, "key_parts_used_for_access": ["id", "a"], - "ranges": ["(0x24a20f) <= (a) <= (0x24a20f)"], + "ranges": ["(2001-01-04) <= (a) <= (2001-01-04)"], "chosen": false, "cause": "cost" }, @@ -1805,19 +1805,19 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 { "table": "t1", "field": "a", "equals": "1", - "null_rejecting": false + "null_rejecting": true }, { "table": "t1", "field": "a", "equals": "1", - "null_rejecting": false + "null_rejecting": true }, { "table": "t1", "field": "b", "equals": "2", - "null_rejecting": false + "null_rejecting": true } ] }, @@ -2821,37 +2821,37 @@ explain select * from t1 where pk = 2 and a=5 and b=1 { "table": "t1", "field": "pk", "equals": "2", - "null_rejecting": false + "null_rejecting": true }, { "table": "t1", "field": "pk", "equals": "2", - "null_rejecting": false + "null_rejecting": true }, { "table": "t1", "field": "a", "equals": "5", - "null_rejecting": false + "null_rejecting": true }, { "table": "t1", "field": "pk", "equals": "2", - "null_rejecting": false + "null_rejecting": true }, { "table": "t1", "field": "a", "equals": "5", - "null_rejecting": false + "null_rejecting": true }, { "table": "t1", "field": "b", "equals": "1", - "null_rejecting": false + "null_rejecting": true } ] }, @@ -6130,7 +6130,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) "index": "start_date", "ranges": [ - "(0x4ac60f,NULL) < (start_date,end_date)" + "(2019-02-10,NULL) < (start_date,end_date)" ], "rowid_ordered": false, "using_mrr": false, @@ -6214,7 +6214,7 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) "index": "i_b", "ranges": [ - "(0xd95b94336a9946a39cf5b58cfe772d8c) <= (b) <= (0xd95b94336a9946a39cf5b58cfe772d8c)" + "(\xD9[\x943j\x99F\xA3\x9C\xF5\xB5\x8C\xFEw-\x8C) <= (b) <= (\xD9[\x943j\x99F\xA3\x9C\xF5\xB5\x8C\xFEw-\x8C)" ], "rowid_ordered": true, "using_mrr": false, @@ -6268,4 +6268,290 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) } ] drop table t1; +# +# MDEV-18880: Optimizer trace prints date in hexadecimal +# +CREATE TABLE t1(i INT PRIMARY KEY, b VARCHAR(10) CHARSET BINARY , INDEX i_b(b)); +INSERT INTO t1 VALUES (1, 'ab\n'); +INSERT INTO t1 VALUES (2, NULL); +set optimizer_trace=1; +EXPLAIN SELECT * FROM t1 WHERE b='ab\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref i_b i_b 13 const 1 Using index condition +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) +[ + + { + "range_scan_alternatives": + [ + + { + "index": "i_b", + "ranges": + [ + "(ab\x0A) <= (b) <= (ab\x0A)" + ], + "rowid_ordered": true, + "using_mrr": false, + "index_only": false, + "rows": 1, + "cost": 2.3787, + "chosen": true + } + ], + "analyzing_roworder_intersect": + { + "cause": "too few roworder scans" + }, + "analyzing_index_merge_union": + [ + ] + } +] +ALTER TABLE t1 modify column b BINARY(10) AFTER i; +EXPLAIN SELECT * FROM t1 WHERE b='ab\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref i_b i_b 11 const 1 Using index condition +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) +[ + + { + "range_scan_alternatives": + [ + + { + "index": "i_b", + "ranges": + [ + "(ab\x0A\x00\x00\x00\x00\x00\x00\x00) <= (b) <= (ab\x0A\x00\x00\x00\x00\x00\x00\x00)" + ], + "rowid_ordered": true, + "using_mrr": false, + "index_only": false, + "rows": 1, + "cost": 2.3785, + "chosen": true + } + ], + "analyzing_roworder_intersect": + { + "cause": "too few roworder scans" + }, + "analyzing_index_merge_union": + [ + ] + } +] +ALTER TABLE t1 modify column b VARBINARY(10) AFTER i; +EXPLAIN SELECT * FROM t1 WHERE b='ab\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref i_b i_b 13 const 1 Using index condition +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) +[ + + { + "range_scan_alternatives": + [ + + { + "index": "i_b", + "ranges": + [ + "(ab\x0A) <= (b) <= (ab\x0A)" + ], + "rowid_ordered": true, + "using_mrr": false, + "index_only": false, + "rows": 1, + "cost": 2.3787, + "chosen": true + } + ], + "analyzing_roworder_intersect": + { + "cause": "too few roworder scans" + }, + "analyzing_index_merge_union": + [ + ] + } +] +drop table t1; +CREATE TABLE t1(i INT PRIMARY KEY, b CHAR(10), INDEX i_b(b)); +INSERT INTO t1 VALUES (1, 'ab\n'); +INSERT INTO t1 VALUES (2, NULL); +EXPLAIN SELECT * FROM t1 WHERE b='ab\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref i_b i_b 11 const 1 Using index condition +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) +[ + + { + "range_scan_alternatives": + [ + + { + "index": "i_b", + "ranges": + [ + "(ab\n) <= (b) <= (ab\n)" + ], + "rowid_ordered": true, + "using_mrr": false, + "index_only": false, + "rows": 1, + "cost": 2.3785, + "chosen": true + } + ], + "analyzing_roworder_intersect": + { + "cause": "too few roworder scans" + }, + "analyzing_index_merge_union": + [ + ] + } +] +drop table t1; +CREATE TABLE t1(i INT PRIMARY KEY, b blob , INDEX i_b(b)); +Warnings: +Note 1071 Specified key was too long; max key length is 1000 bytes +INSERT INTO t1 VALUES (1, 'ab\n'); +INSERT INTO t1 VALUES (2, NULL); +set optimizer_trace=1; +EXPLAIN SELECT * FROM t1 WHERE b= 'ab\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref i_b i_b 1003 const 1 Using where +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) +[ + + { + "range_scan_alternatives": + [ + + { + "index": "i_b", + "ranges": + [ + "(ab\x0A) <= (b) <= (ab\x0A)" + ], + "rowid_ordered": false, + "using_mrr": false, + "index_only": false, + "rows": 1, + "cost": 3.5719, + "chosen": true + } + ], + "analyzing_roworder_intersect": + { + "cause": "too few roworder scans" + }, + "analyzing_index_merge_union": + [ + ] + } +] +drop table t1; +CREATE TABLE t1(i INT PRIMARY KEY, b VARCHAR(10), INDEX i_b(b)); +INSERT INTO t1 VALUES (1, 'ab\n'); +INSERT INTO t1 VALUES (2, 'ab\n'); +set optimizer_trace=1; +EXPLAIN SELECT * FROM t1 WHERE b='ab\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref i_b i_b 13 const 2 Using index condition +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) +[ + + { + "range_scan_alternatives": + [ + + { + "index": "i_b", + "ranges": + [ + "(ab\n) <= (b) <= (ab\n)" + ], + "rowid_ordered": true, + "using_mrr": false, + "index_only": false, + "rows": 2, + "cost": 3.6324, + "chosen": true + } + ], + "analyzing_roworder_intersect": + { + "cause": "too few roworder scans" + }, + "analyzing_index_merge_union": + [ + ] + } +] +drop table t1; +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table one_k (a int); +insert into one_k select A.a + B.a*10 + C.a*100 from t0 A, t0 B, t0 C; +create table t1 (start_date date, end_date date, filler char(100), key(start_date, end_date)) ; +insert into t1 select date_add(now(), interval a day), date_add(now(), interval (a+7) day), 'data' from one_k; +explain format=json select * from t1 force index(start_date) where start_date >= '2019-02-10' and end_date <'2019-04-01'; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "range", + "possible_keys": ["start_date"], + "key": "start_date", + "key_length": "8", + "used_key_parts": ["start_date", "end_date"], + "rows": 1000, + "filtered": 100, + "index_condition": "t1.start_date >= '2019-02-10' and t1.end_date < '2019-04-01'" + } + } +} +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) +[ + + { + "range_scan_alternatives": + [ + + { + "index": "start_date", + "ranges": + [ + "(2019-02-10,NULL) < (start_date,end_date)" + ], + "rowid_ordered": false, + "using_mrr": false, + "index_only": false, + "rows": 1000, + "cost": 1282.2, + "chosen": true + } + ], + "analyzing_roworder_intersect": + { + "cause": "too few roworder scans" + }, + "analyzing_index_merge_union": + [ + ] + } +] +drop table t1, t0, one_k; set optimizer_trace='enabled=off'; diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test index 981a53ac1ad..916b9313ca6 100644 --- a/mysql-test/main/opt_trace.test +++ b/mysql-test/main/opt_trace.test @@ -444,4 +444,58 @@ select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) fr drop table t1; +--echo # +--echo # MDEV-18880: Optimizer trace prints date in hexadecimal +--echo # + +CREATE TABLE t1(i INT PRIMARY KEY, b VARCHAR(10) CHARSET BINARY , INDEX i_b(b)); +INSERT INTO t1 VALUES (1, 'ab\n'); +INSERT INTO t1 VALUES (2, NULL); +set optimizer_trace=1; +EXPLAIN SELECT * FROM t1 WHERE b='ab\n'; +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; + +ALTER TABLE t1 modify column b BINARY(10) AFTER i; +EXPLAIN SELECT * FROM t1 WHERE b='ab\n'; +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; + +ALTER TABLE t1 modify column b VARBINARY(10) AFTER i; +EXPLAIN SELECT * FROM t1 WHERE b='ab\n'; +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +drop table t1; + +CREATE TABLE t1(i INT PRIMARY KEY, b CHAR(10), INDEX i_b(b)); +INSERT INTO t1 VALUES (1, 'ab\n'); +INSERT INTO t1 VALUES (2, NULL); +EXPLAIN SELECT * FROM t1 WHERE b='ab\n'; +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +drop table t1; + +CREATE TABLE t1(i INT PRIMARY KEY, b blob , INDEX i_b(b)); +INSERT INTO t1 VALUES (1, 'ab\n'); +INSERT INTO t1 VALUES (2, NULL); +set optimizer_trace=1; +EXPLAIN SELECT * FROM t1 WHERE b= 'ab\n'; +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +drop table t1; + +CREATE TABLE t1(i INT PRIMARY KEY, b VARCHAR(10), INDEX i_b(b)); +INSERT INTO t1 VALUES (1, 'ab\n'); +INSERT INTO t1 VALUES (2, 'ab\n'); +set optimizer_trace=1; +EXPLAIN SELECT * FROM t1 WHERE b='ab\n'; +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +drop table t1; +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table one_k (a int); +insert into one_k select A.a + B.a*10 + C.a*100 from t0 A, t0 B, t0 C; +create table t1 (start_date date, end_date date, filler char(100), key(start_date, end_date)) ; +--disable_warnings +insert into t1 select date_add(now(), interval a day), date_add(now(), interval (a+7) day), 'data' from one_k; +--enable_warnings +explain format=json select * from t1 force index(start_date) where start_date >= '2019-02-10' and end_date <'2019-04-01'; +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +drop table t1, t0, one_k; + set optimizer_trace='enabled=off'; diff --git a/mysql-test/main/opt_trace_ucs2.result b/mysql-test/main/opt_trace_ucs2.result new file mode 100644 index 00000000000..306fdbf94ad --- /dev/null +++ b/mysql-test/main/opt_trace_ucs2.result @@ -0,0 +1,54 @@ +create or replace table t1 (col1 char(10) character set ucs2, filler char(100), key(col1)) ; +insert into t1 values ('a', 'a'); +insert into t1 values ('a', 'a'); +set optimizer_trace=1; +explain format=json select * from t1 force index(col1) where col1 >='a'; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "range", + "possible_keys": ["col1"], + "key": "col1", + "key_length": "21", + "used_key_parts": ["col1"], + "rows": 2, + "filtered": 100, + "index_condition": "t1.col1 >= 'a'" + } + } +} +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) +[ + + { + "range_scan_alternatives": + [ + + { + "index": "col1", + "ranges": + [ + "(a) <= (col1)" + ], + "rowid_ordered": false, + "using_mrr": false, + "index_only": false, + "rows": 2, + "cost": 3.7609, + "chosen": true + } + ], + "analyzing_roworder_intersect": + { + "cause": "too few roworder scans" + }, + "analyzing_index_merge_union": + [ + ] + } +] +drop table t1; diff --git a/mysql-test/main/opt_trace_ucs2.test b/mysql-test/main/opt_trace_ucs2.test new file mode 100644 index 00000000000..827dc403d58 --- /dev/null +++ b/mysql-test/main/opt_trace_ucs2.test @@ -0,0 +1,10 @@ +--source include/not_embedded.inc +--source include/have_ucs2.inc + +create or replace table t1 (col1 char(10) character set ucs2, filler char(100), key(col1)) ; +insert into t1 values ('a', 'a'); +insert into t1 values ('a', 'a'); +set optimizer_trace=1; +explain format=json select * from t1 force index(col1) where col1 >='a'; +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +drop table t1; diff --git a/mysql-test/main/order_by.result b/mysql-test/main/order_by.result index 9532c2995ce..b059cc686cd 100644 --- a/mysql-test/main/order_by.result +++ b/mysql-test/main/order_by.result @@ -1589,7 +1589,7 @@ WHERE t2.b=14 AND t2.a=t1.a AND 5.1<t2.c AND t1.b='DE' ORDER BY t2.c LIMIT 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 range a,b,c c 5 NULL 420 Using where -1 SIMPLE t1 ref a a 39 test.t2.a,const 10 Using where; Using index +1 SIMPLE t1 ref a a 39 test.t2.a,const 1 Using where; Using index SELECT d FROM t3 AS t1, t2 AS t2 WHERE t2.b=14 AND t2.a=t1.a AND 5.1<t2.c AND t1.b='DE' ORDER BY t2.c LIMIT 1; diff --git a/mysql-test/main/stat_tables_missing.result b/mysql-test/main/stat_tables_missing.result new file mode 100644 index 00000000000..a7cd35b1d1f --- /dev/null +++ b/mysql-test/main/stat_tables_missing.result @@ -0,0 +1,11 @@ +create table t1 (a int); +alter table mysql.column_stats rename to mysql.column_stats1; +flush tables; +alter table t1 change a b varchar(100); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` varchar(100) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table mysql.column_stats1 rename to mysql.column_stats; +drop table t1; diff --git a/mysql-test/main/stat_tables_missing.test b/mysql-test/main/stat_tables_missing.test new file mode 100644 index 00000000000..63ee9d5dde3 --- /dev/null +++ b/mysql-test/main/stat_tables_missing.test @@ -0,0 +1,10 @@ +# +# MDEV-18788 Live upgrade from MySQL 5.6/5.7 to MariaDB 10.4 fails with "Event Scheduler: An error occurred when initializing system tables" +# +create table t1 (a int); +alter table mysql.column_stats rename to mysql.column_stats1; +flush tables; +alter table t1 change a b varchar(100); +show create table t1; +alter table mysql.column_stats1 rename to mysql.column_stats; +drop table t1; diff --git a/mysql-test/main/subselect_no_semijoin.result b/mysql-test/main/subselect_no_semijoin.result index 3265a4f81bb..c9a52512614 100644 --- a/mysql-test/main/subselect_no_semijoin.result +++ b/mysql-test/main/subselect_no_semijoin.result @@ -7314,5 +7314,60 @@ ERROR HY000: Illegal parameter data types row and boolean for operation '=' # # End of 10.4 tests # +# +# MDEV-19714: JOIN::pseudo_bits_cond is not visible in EXPLAIN FORMAT=JSON +# +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES (1),(5); +CREATE TABLE t2 ( b INT ) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1); +CREATE TABLE t3 ( c INT ); +INSERT INTO t3 VALUES (4),(5); +SET @tmp19714=@@optimizer_switch; +SET optimizer_switch='subquery_cache=off'; +explain format=json +SELECT ( SELECT b FROM t2 WHERE b = a OR EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + }, + "subqueries": [ + { + "query_block": { + "select_id": 2, + "pseudo_bits_condition": "1 = t1.a or <in_optimizer>(1,<exists>(subquery#3))", + "table": { + "table_name": "t2", + "access_type": "system", + "rows": 1, + "filtered": 100 + }, + "subqueries": [ + { + "query_block": { + "select_id": 3, + "table": { + "table_name": "t3", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "1 = t3.c" + } + } + } + ] + } + } + ] + } +} +SET optimizer_switch=@tmp19714; +drop table t1,t2,t3; set @optimizer_switch_for_subselect_test=null; set @join_cache_level_for_subselect_test=NULL; diff --git a/mysql-test/main/subselect_no_semijoin.test b/mysql-test/main/subselect_no_semijoin.test index 6b82b748912..84d312c03c8 100644 --- a/mysql-test/main/subselect_no_semijoin.test +++ b/mysql-test/main/subselect_no_semijoin.test @@ -8,5 +8,28 @@ set @join_cache_level_for_subselect_test=@@join_cache_level; --source subselect.test +--echo # +--echo # MDEV-19714: JOIN::pseudo_bits_cond is not visible in EXPLAIN FORMAT=JSON +--echo # +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES (1),(5); + +# t2 must be MyISAM or Aria and contain 1 row +CREATE TABLE t2 ( b INT ) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1); + +CREATE TABLE t3 ( c INT ); +INSERT INTO t3 VALUES (4),(5); + +SET @tmp19714=@@optimizer_switch; +SET optimizer_switch='subquery_cache=off'; + +explain format=json +SELECT ( SELECT b FROM t2 WHERE b = a OR EXISTS ( SELECT c FROM t3 WHERE c = b ) ) FROM t1; + +SET optimizer_switch=@tmp19714; + +drop table t1,t2,t3; + set @optimizer_switch_for_subselect_test=null; set @join_cache_level_for_subselect_test=NULL; diff --git a/mysql-test/main/subselect_sj.result b/mysql-test/main/subselect_sj.result index 7114024310c..98143246673 100644 --- a/mysql-test/main/subselect_sj.result +++ b/mysql-test/main/subselect_sj.result @@ -2555,33 +2555,94 @@ CREATE TABLE t1 ( a INT PRIMARY KEY, b INT, KEY(b) ); INSERT INTO t1 VALUES (1,2),(2,1),(3,3),(4,2),(5,5), (6,3),(7,1),(8,4),(9,3),(10,2); -CREATE TABLE t2 ( c INT, d INT, UNIQUE KEY(c) ); +CREATE TABLE t2 ( c INT, d INT, KEY(c) ); INSERT INTO t2 VALUES (1,2),(2,1),(3,3),(4,2),(5,5),(6,3),(7,1); +analyze table t1,t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +explain +SELECT a, b, d FROM t1, t2 +WHERE ( b, d ) IN +( SELECT b, d FROM t1, t2 WHERE b = c ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 7 +1 PRIMARY t1 index b b 5 NULL 10 Using where; Using index; LooseScan +1 PRIMARY t2 ref c c 5 test.t1.b 1 Using where; FirstMatch(t1) +1 PRIMARY t1 ref b b 5 test.t1.b 2 SELECT a, b, d FROM t1, t2 WHERE ( b, d ) IN ( SELECT b, d FROM t1, t2 WHERE b = c ); a b d 2 1 2 7 1 2 -2 1 2 -7 1 2 -1 2 1 -4 2 1 -10 2 1 +8 4 2 1 2 1 4 2 1 10 2 1 3 3 3 6 3 3 9 3 3 +2 1 2 +7 1 2 +8 4 2 +5 5 5 3 3 3 6 3 3 9 3 3 -8 4 2 -8 4 2 -5 5 5 +1 2 1 +4 2 1 +10 2 1 DROP TABLE t1, t2; +# Another testcase for the above that still uses LooseScan: +create table t0(a int primary key); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t10(a int primary key); +insert into t10 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C; +create table t1 ( +pk int primary key auto_increment, +kp1 int, +kp2 int, +filler char(100), +key (kp1, kp2) +); +insert into t1 (kp1, kp2, filler) +select +A.a, B.a, 'filler-data' +from t0 A, t0 B; +create table t2 (a int, filler char(100), key(a)); +create table t3 (a int); +insert into t3 values (1),(2); +insert into t2 +select (A.a+1000*B.a)/20, 'filler_data' from t10 A, t0 B; +analyze table t1,t2,t3; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status Table is already up to date +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +delete from t1 where kp2 in (1,3); +# Ref + LooseScan on t1: +explain select sum(t2.a) +from t2,t3 +where (t3.a,t2.a) in (select kp1,kp2 from t1,t0 where t0.a=2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t0 const PRIMARY PRIMARY 4 const 1 Using index +1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where +1 PRIMARY t1 ref kp1 kp1 5 test.t3.a 10 Using where; Using index; LooseScan +1 PRIMARY t2 ref a a 5 test.t1.kp2 19 Using index +select sum(t2.a) +from t2,t3 +where (t3.a,t2.a) in (select kp1,kp2 from t1,t0 where t0.a=2); +sum(t2.a) +1640 +drop table t0,t10; +drop table t1,t2,t3; # # BUG#920713: Wrong result (missing rows) with firstmatch+BNL, IN subquery, ... # diff --git a/mysql-test/main/subselect_sj.test b/mysql-test/main/subselect_sj.test index ad4577b72b0..b693f7b5b93 100644 --- a/mysql-test/main/subselect_sj.test +++ b/mysql-test/main/subselect_sj.test @@ -2285,16 +2285,66 @@ INSERT INTO t1 VALUES (1,2),(2,1),(3,3),(4,2),(5,5), (6,3),(7,1),(8,4),(9,3),(10,2); -CREATE TABLE t2 ( c INT, d INT, UNIQUE KEY(c) ); +CREATE TABLE t2 ( c INT, d INT, KEY(c) ); INSERT INTO t2 VALUES (1,2),(2,1),(3,3),(4,2),(5,5),(6,3),(7,1); +analyze table t1,t2; +explain +SELECT a, b, d FROM t1, t2 +WHERE ( b, d ) IN + ( SELECT b, d FROM t1, t2 WHERE b = c ); SELECT a, b, d FROM t1, t2 WHERE ( b, d ) IN ( SELECT b, d FROM t1, t2 WHERE b = c ); DROP TABLE t1, t2; +--echo # Another testcase for the above that still uses LooseScan: + +create table t0(a int primary key); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t10(a int primary key); +insert into t10 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C; + +create table t1 ( + pk int primary key auto_increment, + kp1 int, + kp2 int, + filler char(100), + key (kp1, kp2) +); + +# 10 groups, each has 10 elements. +insert into t1 (kp1, kp2, filler) +select + A.a, B.a, 'filler-data' +from t0 A, t0 B; + +create table t2 (a int, filler char(100), key(a)); + +create table t3 (a int); +insert into t3 values (1),(2); + +insert into t2 +select (A.a+1000*B.a)/20, 'filler_data' from t10 A, t0 B; + +analyze table t1,t2,t3; +delete from t1 where kp2 in (1,3); + +--echo # Ref + LooseScan on t1: +explain select sum(t2.a) +from t2,t3 +where (t3.a,t2.a) in (select kp1,kp2 from t1,t0 where t0.a=2); + +select sum(t2.a) +from t2,t3 +where (t3.a,t2.a) in (select kp1,kp2 from t1,t0 where t0.a=2); + +drop table t0,t10; +drop table t1,t2,t3; + --echo # --echo # BUG#920713: Wrong result (missing rows) with firstmatch+BNL, IN subquery, ... --echo # diff --git a/mysql-test/main/subselect_sj_jcl6.result b/mysql-test/main/subselect_sj_jcl6.result index f7f87fc2511..acfafde6d7e 100644 --- a/mysql-test/main/subselect_sj_jcl6.result +++ b/mysql-test/main/subselect_sj_jcl6.result @@ -2569,9 +2569,24 @@ CREATE TABLE t1 ( a INT PRIMARY KEY, b INT, KEY(b) ); INSERT INTO t1 VALUES (1,2),(2,1),(3,3),(4,2),(5,5), (6,3),(7,1),(8,4),(9,3),(10,2); -CREATE TABLE t2 ( c INT, d INT, UNIQUE KEY(c) ); +CREATE TABLE t2 ( c INT, d INT, KEY(c) ); INSERT INTO t2 VALUES (1,2),(2,1),(3,3),(4,2),(5,5),(6,3),(7,1); +analyze table t1,t2; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +explain +SELECT a, b, d FROM t1, t2 +WHERE ( b, d ) IN +( SELECT b, d FROM t1, t2 WHERE b = c ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 7 +1 PRIMARY t1 index b b 5 NULL 10 Using where; Using index; LooseScan +1 PRIMARY t2 ref c c 5 test.t1.b 1 Using where; FirstMatch(t1) +1 PRIMARY t1 ref b b 5 test.t1.b 2 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan SELECT a, b, d FROM t1, t2 WHERE ( b, d ) IN ( SELECT b, d FROM t1, t2 WHERE b = c ); @@ -2596,6 +2611,52 @@ a b d 10 2 1 10 2 1 DROP TABLE t1, t2; +# Another testcase for the above that still uses LooseScan: +create table t0(a int primary key); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t10(a int primary key); +insert into t10 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C; +create table t1 ( +pk int primary key auto_increment, +kp1 int, +kp2 int, +filler char(100), +key (kp1, kp2) +); +insert into t1 (kp1, kp2, filler) +select +A.a, B.a, 'filler-data' +from t0 A, t0 B; +create table t2 (a int, filler char(100), key(a)); +create table t3 (a int); +insert into t3 values (1),(2); +insert into t2 +select (A.a+1000*B.a)/20, 'filler_data' from t10 A, t0 B; +analyze table t1,t2,t3; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status Table is already up to date +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status Table is already up to date +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +delete from t1 where kp2 in (1,3); +# Ref + LooseScan on t1: +explain select sum(t2.a) +from t2,t3 +where (t3.a,t2.a) in (select kp1,kp2 from t1,t0 where t0.a=2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t0 const PRIMARY PRIMARY 4 const 1 Using index +1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where +1 PRIMARY t1 ref kp1 kp1 5 test.t3.a 10 Using where; Using index; LooseScan +1 PRIMARY t2 ref a a 5 test.t1.kp2 19 Using index +select sum(t2.a) +from t2,t3 +where (t3.a,t2.a) in (select kp1,kp2 from t1,t0 where t0.a=2); +sum(t2.a) +1640 +drop table t0,t10; +drop table t1,t2,t3; # # BUG#920713: Wrong result (missing rows) with firstmatch+BNL, IN subquery, ... # diff --git a/mysql-test/main/subselect_sj_nonmerged.result b/mysql-test/main/subselect_sj_nonmerged.result index 47970668ae5..4d9a70e6bba 100644 --- a/mysql-test/main/subselect_sj_nonmerged.result +++ b/mysql-test/main/subselect_sj_nonmerged.result @@ -67,9 +67,9 @@ insert into t4 select A.a + 10*B.a, A.a + 10*B.a, 'filler' from t0 A, t0 B; explain select * from t0, t4 where t4.b=t0.a and t4.a in (select max(t2.a) from t1, t2 group by t2.b); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t0 ALL NULL NULL NULL NULL 10 -1 PRIMARY t4 ALL a NULL NULL NULL 100 Using where; Using join buffer (flat, BNL join) -1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 test.t4.a 1 +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 5 +1 PRIMARY t0 ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join) +1 PRIMARY t4 ref a a 10 <subquery2>.max(t2.a),test.t0.a 1 2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 Using temporary 2 MATERIALIZED t1 ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join) insert into t4 select 100 + (B.a *100 + A.a), 100 + (B.a*100 + A.a), 'filler' from t4 A, t0 B; @@ -77,9 +77,9 @@ explain select * from t4 where t4.a in (select max(t2.a) from t1, t2 group by t2.b) and t4.b in (select max(t2.a) from t1, t2 group by t2.b); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 5 -1 PRIMARY t4 ref a a 5 <subquery2>.max(t2.a) 12 Using index condition -1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 test.t4.b 1 +1 PRIMARY <subquery3> ALL distinct_key NULL NULL NULL 5 +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 5 Using join buffer (flat, BNL join) +1 PRIMARY t4 ref a a 10 <subquery2>.max(t2.a),<subquery3>.max(t2.a) 1 3 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 Using temporary 3 MATERIALIZED t1 ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join) 2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 Using temporary diff --git a/mysql-test/main/table_elim.result b/mysql-test/main/table_elim.result index 2bfbbfb433f..bc03e1b251d 100644 --- a/mysql-test/main/table_elim.result +++ b/mysql-test/main/table_elim.result @@ -279,7 +279,7 @@ insert into t2 values explain select t1.* from t1 left join t2 on t2.a=t1.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL PRIMARY 10 NULL 2 Using index -1 SIMPLE t2 ref a a 3 test.t1.a 2 Using where +1 SIMPLE t2 ref a a 3 test.t1.a 1 Using where drop table t1, t2; # # check UPDATE/DELETE that look like they could be eliminated diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result index 85d645359ea..51a0f35ad61 100644 --- a/mysql-test/main/win.result +++ b/mysql-test/main/win.result @@ -3607,6 +3607,33 @@ b row_number() over (partition by sum(a)+1) 2000 1 drop table t1; # +# MDEV-18015: Assertion `global_status_var.global_memory_used == 0' failed when using UDF, +# window functions and views +# +create table t1 (id int, n1 int); +insert into t1 values (1,1),(2,1),(3,2),(4,4); +explain +select max(n1) over (partition by 'abc') from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary +select max(n1) over (partition by 'abc') from t1; +max(n1) over (partition by 'abc') +4 +4 +4 +4 +explain +select rank() over (partition by 'abc' order by 'xyz') from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary +select rank() over (partition by 'abc' order by 'xyz') from t1; +rank() over (partition by 'abc' order by 'xyz') +1 +1 +1 +1 +drop table t1; +# # End of 10.2 tests # # diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test index c5c5215b215..01b8f17b0f2 100644 --- a/mysql-test/main/win.test +++ b/mysql-test/main/win.test @@ -2326,6 +2326,22 @@ select b, row_number() over (partition by sum(a)+1) from t1 group by b; drop table t1; --echo # +--echo # MDEV-18015: Assertion `global_status_var.global_memory_used == 0' failed when using UDF, +--echo # window functions and views +--echo # + +create table t1 (id int, n1 int); +insert into t1 values (1,1),(2,1),(3,2),(4,4); +explain +select max(n1) over (partition by 'abc') from t1; +select max(n1) over (partition by 'abc') from t1; + +explain +select rank() over (partition by 'abc' order by 'xyz') from t1; +select rank() over (partition by 'abc' order by 'xyz') from t1; +drop table t1; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/suite/archive/disabled.def b/mysql-test/suite/archive/disabled.def index ae841eaaf33..888298bbb09 100644 --- a/mysql-test/suite/archive/disabled.def +++ b/mysql-test/suite/archive/disabled.def @@ -9,5 +9,3 @@ # Do not use any TAB characters for whitespace. # ############################################################################## - -archive_gis : MDEV-17297 wait for the fix and then enable it diff --git a/mysql-test/suite/binlog/r/flashback-largebinlog.result b/mysql-test/suite/binlog/r/flashback-largebinlog.result new file mode 100644 index 00000000000..526204f259f --- /dev/null +++ b/mysql-test/suite/binlog/r/flashback-largebinlog.result @@ -0,0 +1,71 @@ +# +# Preparatory cleanup. +# +drop database if exists mysqltest; +create database mysqltest; +use mysqltest; +DROP TABLE IF EXISTS t1; +# +# We need a fixed timestamp to avoid varying results. +# +SET timestamp=1000000000; +# +# We need big packets. +# +# Capture initial value to reset at the end of the test +# Now adjust max_allowed_packet +SET @@global.max_allowed_packet= 10*1024*1024*1024; +Warnings: +Warning 1292 Truncated incorrect max_allowed_packet value: '10737418240' +max_allowed_packet is a global variable. +In order for the preceding change in max_allowed_packets' value +to be seen and used, we must start a new connection. +The change does not take effect with the current one. +For simplicity, we just disconnect / reconnect connection default here. +disconnect default; +connect default, localhost,root,,; +# +# Delete all existing binary logs. +# +RESET MASTER; +# +# Create a test table. +# +use mysqltest; +CREATE TABLE t1 ( +c1 LONGTEXT +) DEFAULT CHARSET latin1; +# +# Show how many rows are affected by each statement. +# +# +# Insert some big rows. +# +insert 1024MB data twice +INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 67108864)); +affected rows: 1 +INSERT INTO t1 VALUES (REPEAT('MegaByteBlckMany', 67108864)); +affected rows: 1 +# +# Flush all log buffers to the log file. +# +FLUSH LOGS; +affected rows: 0 +# +# Call mysqlbinlog to display the log file contents. +# NOTE: The output of mysqlbinlog is redirected to +# $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out +# If you want to examine it, disable remove_file +# at the bottom of the test script. +# +# +# Cleanup. +# +# reset variable value to pass testcase checks +SET @@global.max_allowed_packet = 16777216; +affected rows: 0 +DROP TABLE t1; +affected rows: 0 +drop database if exists mysqltest; +affected rows: 0 +remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out diff --git a/mysql-test/suite/binlog/t/flashback-largebinlog.test b/mysql-test/suite/binlog/t/flashback-largebinlog.test new file mode 100644 index 00000000000..6ff58b706d3 --- /dev/null +++ b/mysql-test/suite/binlog/t/flashback-largebinlog.test @@ -0,0 +1,110 @@ +# mysqlbinlog_big.test +# +# Show that mysqlbinlog can handle big rows. +# + +# +# The *huge* output of mysqlbinlog will be redirected to +# $MYSQLTEST_VARDIR/$mysqlbinlog_output +# +--let $mysqlbinlog_output= tmp/mysqlbinlog_big_1.out + +--source include/have_binlog_format_row.inc + +--source include/have_log_bin.inc + +# This is a big test. +--source include/big_test.inc + +--echo # +--echo # Preparatory cleanup. +--echo # +--disable_warnings +drop database if exists mysqltest; +create database mysqltest; +use mysqltest; +DROP TABLE IF EXISTS t1; +--enable_warnings + +--echo # +--echo # We need a fixed timestamp to avoid varying results. +--echo # +SET timestamp=1000000000; + +--echo # +--echo # We need big packets. +--echo # +--echo # Capture initial value to reset at the end of the test +# use let $<var> = query_get_value as FLUSH statements +# in the test will set @<var> values to NULL +let $orig_max_allowed_packet = +query_get_value(SELECT @@global.max_allowed_packet, @@global.max_allowed_packet, 1); + +--echo # Now adjust max_allowed_packet +SET @@global.max_allowed_packet= 10*1024*1024*1024; + +--echo max_allowed_packet is a global variable. +--echo In order for the preceding change in max_allowed_packets' value +--echo to be seen and used, we must start a new connection. +--echo The change does not take effect with the current one. +--echo For simplicity, we just disconnect / reconnect connection default here. +disconnect default; +connect (default, localhost,root,,); + +--echo # +--echo # Delete all existing binary logs. +--echo # +RESET MASTER; + +--echo # +--echo # Create a test table. +--echo # +use mysqltest; +eval CREATE TABLE t1 ( + c1 LONGTEXT + ) DEFAULT CHARSET latin1; + +--echo # +--echo # Show how many rows are affected by each statement. +--echo # +--enable_info + +--echo # +--echo # Insert some big rows. +--echo # + +--echo insert 1024MB data twice +INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 67108864)); +INSERT INTO t1 VALUES (REPEAT('MegaByteBlckMany', 67108864)); + +--echo # +--echo # Flush all log buffers to the log file. +--echo # +FLUSH LOGS; + +--echo # +--echo # Call mysqlbinlog to display the log file contents. +--echo # NOTE: The output of mysqlbinlog is redirected to +--echo # \$MYSQLTEST_VARDIR/$mysqlbinlog_output +--echo # If you want to examine it, disable remove_file +--echo # at the bottom of the test script. +--echo # +let $MYSQLD_DATADIR= `select @@datadir`; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ +--exec $MYSQL_BINLOG -B -v -v $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/$mysqlbinlog_output + +--echo # +--echo # Cleanup. +--echo # +--echo # reset variable value to pass testcase checks +eval SET @@global.max_allowed_packet = $orig_max_allowed_packet; +DROP TABLE t1; +drop database if exists mysqltest; + +--echo remove_file \$MYSQLTEST_VARDIR/$mysqlbinlog_output +# +# NOTE: If you want to see the *huge* mysqlbinlog output, disable next line: +# +--remove_file $MYSQLTEST_VARDIR/$mysqlbinlog_output + diff --git a/mysql-test/suite/encryption/r/compressed_import_tablespace.result b/mysql-test/suite/encryption/r/compressed_import_tablespace.result new file mode 100644 index 00000000000..63e7cf8b0c3 --- /dev/null +++ b/mysql-test/suite/encryption/r/compressed_import_tablespace.result @@ -0,0 +1,39 @@ +CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=YES; +INSERT INTO t1 VALUES(1, repeat('Nesamani', 10)); +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `a` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED `ENCRYPTED`=YES +# Wait max 10 min for key encryption threads to encrypt all spaces +db.opt +t1.frm +t1.ibd +FLUSH TABLES t1 FOR EXPORT; +backup: t1 +db.opt +t1.cfg +t1.frm +t1.ibd +UNLOCK TABLES; +DROP TABLE t1; +CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=YES; +ALTER TABLE t1 DISCARD TABLESPACE; +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `a` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED `ENCRYPTED`=YES +DROP TABLE t1; diff --git a/mysql-test/suite/encryption/t/compressed_import_tablespace.opt b/mysql-test/suite/encryption/t/compressed_import_tablespace.opt new file mode 100644 index 00000000000..a9893ed4b29 --- /dev/null +++ b/mysql-test/suite/encryption/t/compressed_import_tablespace.opt @@ -0,0 +1,3 @@ +--innodb-encrypt-tables=ON +--innodb-encryption-threads=4 +--innodb-tablespaces-encryption diff --git a/mysql-test/suite/encryption/t/compressed_import_tablespace.test b/mysql-test/suite/encryption/t/compressed_import_tablespace.test new file mode 100644 index 00000000000..e79fdb17f02 --- /dev/null +++ b/mysql-test/suite/encryption/t/compressed_import_tablespace.test @@ -0,0 +1,45 @@ +-- source include/have_innodb.inc +-- source include/have_example_key_management_plugin.inc +-- source include/not_valgrind.inc +-- source include/not_embedded.inc + +let MYSQLD_DATADIR = `SELECT @@datadir`; +--let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd +CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=YES; +INSERT INTO t1 VALUES(1, repeat('Nesamani', 10)); + +SELECT COUNT(*) FROM t1; +SHOW CREATE TABLE t1; + +--echo # Wait max 10 min for key encryption threads to encrypt all spaces +--let $wait_timeout= 600 +--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND ROTATING_OR_FLUSHING <> 0 +--source include/wait_condition.inc + +let $restart_noprint=2; +--source include/restart_mysqld.inc +let MYSQLD_DATADIR =`SELECT @@datadir`; + +--list_files $MYSQLD_DATADIR/test +FLUSH TABLES t1 FOR EXPORT; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF +--list_files $MYSQLD_DATADIR/test +UNLOCK TABLES; +DROP TABLE t1; + +CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTED=YES; +ALTER TABLE t1 DISCARD TABLESPACE; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; + +SELECT COUNT(*) FROM t1; +SHOW CREATE TABLE t1; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_sync_wait_show.result b/mysql-test/suite/galera/r/galera_sync_wait_show.result index 793da3246ff..4ec83a7f33f 100644 --- a/mysql-test/suite/galera/r/galera_sync_wait_show.result +++ b/mysql-test/suite/galera/r/galera_sync_wait_show.result @@ -49,6 +49,8 @@ tr1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE DROP TABLE t1; connection node_1; CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1; +Warnings: +Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. connection node_2; SHOW CREATE EVENT event1; Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation diff --git a/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test b/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test index d04603891db..1db5ee3bdc7 100644 --- a/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test +++ b/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test @@ -25,7 +25,7 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoD set session wsrep_sync_wait=15; --let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads` SET GLOBAL wsrep_slave_threads = 4; ---let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%'); +--let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%'); --source include/wait_condition.inc --connection node_1 diff --git a/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result b/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result index 2e94461f377..df454772346 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result @@ -23,8 +23,7 @@ connection node_2; Shutting down server ... connection node_1; connection node_2; -Starting server ... -# restart: --wsrep_sst_auth=sst:sst --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=127.0.0.1:16001 +# restart: with restart_parameters connection node_1; connection node_2; SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; diff --git a/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test index e5cf5e43b44..5a3f48e02a3 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_mysqldump_sst.test @@ -43,7 +43,7 @@ UPDATE t1 SET f2 = REPEAT('y', 255); --source include/wait_condition.inc --connection node_2 ---echo Starting server ... +--let $restart_noprint = 1 --let $restart_parameters = --wsrep_sst_auth=sst:sst --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=127.0.0.1:$NODE_MYPORT_2 --source include/start_mysqld.inc diff --git a/mysql-test/suite/gcol/r/gcol_select_myisam.result b/mysql-test/suite/gcol/r/gcol_select_myisam.result index 853412fe7fe..45c3f73ed8e 100644 --- a/mysql-test/suite/gcol/r/gcol_select_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_select_myisam.result @@ -1110,7 +1110,7 @@ id select_type table type possible_keys key key_len ref rows Extra EXPLAIN SELECT * FROM t1 AS t2 STRAIGHT_JOIN t1 FORCE INDEX(b) WHERE t1.b=t2.b; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL b NULL NULL NULL 2 Using where -1 SIMPLE t1 ref b b 5 test.t2.b 2 +1 SIMPLE t1 ref b b 5 test.t2.b 1 EXPLAIN SELECT b FROM t1 FORCE INDEX(b); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL b 5 NULL 2 Using index diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result index 5e79a12d17e..05c68e5d893 100644 --- a/mysql-test/suite/vcol/r/vcol_select_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result @@ -64,7 +64,7 @@ a b c explain select * from t1 where b in (select c from t3); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -1 PRIMARY t3 ref c c 5 test.t1.b 2 Using index +1 PRIMARY t3 ref c c 5 test.t1.b 1 Using index # select_type=PRIMARY, type=range,ref select * from t1 where c in (select c from t3 where c between -2 and -1); a b c @@ -74,7 +74,7 @@ a b c explain select * from t1 where c in (select c from t3 where c between -2 and -1); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 range c c 5 NULL 3 Using index condition -1 PRIMARY t3 index c c 5 NULL 6 Using where; Using index; Using join buffer (flat, BNL join) +1 PRIMARY t3 ref c c 5 test.t1.c 1 Using index # select_type=UNION, type=system # select_type=UNION RESULT, type=<union1,2> select * from t1 union select * from t2; diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index 78fee354592..6990d1350e3 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -74,7 +74,7 @@ IF(HAVE_MLOCK) ENDIF() ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES}) -TARGET_LINK_LIBRARIES(mysys dbug strings mysys_ssl ${ZLIB_LIBRARY} +TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} ${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY}) DTRACE_INSTRUMENT(mysys) diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc index a668c222b79..fda909e6530 100644 --- a/mysys_ssl/my_crypt.cc +++ b/mysys_ssl/my_crypt.cc @@ -25,16 +25,28 @@ #include <my_crypt.h> #include <ssl_compat.h> +#include <cstdint> + +#ifdef HAVE_WOLFSSL +#define CTX_ALIGN 16 +#else +#define CTX_ALIGN 0 +#endif class MyCTX { public: - char ctx_buf[EVP_CIPHER_CTX_SIZE]; - EVP_CIPHER_CTX *ctx; - + char ctx_buf[EVP_CIPHER_CTX_SIZE + CTX_ALIGN]; + EVP_CIPHER_CTX* ctx; MyCTX() { - ctx= (EVP_CIPHER_CTX *)ctx_buf; +#if CTX_ALIGN > 0 + uintptr_t p= ((uintptr_t)ctx_buf + (CTX_ALIGN - 1)) & ~(CTX_ALIGN - 1); + ctx = reinterpret_cast<EVP_CIPHER_CTX*>(p); +#else + ctx = (EVP_CIPHER_CTX*)ctx_buf; +#endif + EVP_CIPHER_CTX_init(ctx); } virtual ~MyCTX() @@ -149,8 +161,11 @@ public: uchar mask[MY_AES_BLOCK_SIZE]; uint mlen; - my_aes_crypt(MY_AES_ECB, ENCRYPTION_FLAG_ENCRYPT | ENCRYPTION_FLAG_NOPAD, + int rc= my_aes_crypt(MY_AES_ECB, ENCRYPTION_FLAG_ENCRYPT | ENCRYPTION_FLAG_NOPAD, oiv, sizeof(mask), mask, &mlen, key, klen, 0, 0); + DBUG_ASSERT(rc == MY_AES_OK); + if (rc) + return rc; DBUG_ASSERT(mlen == sizeof(mask)); for (uint i=0; i < buf_len; i++) diff --git a/plugin/auth_ed25519/CMakeLists.txt b/plugin/auth_ed25519/CMakeLists.txt index ffd2523d1af..1a3d5cc4bce 100644 --- a/plugin/auth_ed25519/CMakeLists.txt +++ b/plugin/auth_ed25519/CMakeLists.txt @@ -25,8 +25,8 @@ MYSQL_ADD_PLUGIN(auth_ed25519 server_ed25519.c ${REF10_SOURCES} MODULE_ONLY) # client plugin and unit test ed25519-t can use the library #MYSQL_ADD_PLUGIN(client_ed25519 client_ed25519.c MODULE_ONLY -# CLIENT LINK_LIBRARIES mysys_ssl ref10 COMPONENT ClientPlugins) +# CLIENT LINK_LIBRARIES ref10 mysys_ssl COMPONENT ClientPlugins) IF(WITH_UNIT_TESTS) - MY_ADD_TESTS(ed25519 LINK_LIBRARIES mysys ref10) + MY_ADD_TESTS(ed25519 LINK_LIBRARIES ref10 mysys_ssl) ENDIF() diff --git a/sql/field.cc b/sql/field.cc index 6813943c5f4..990d86a545e 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -11246,3 +11246,58 @@ bool Field::val_str_nopad(MEM_ROOT *mem_root, LEX_CSTRING *to) return rc; } + + +void Field::print_key_value(String *out, uint32 length) +{ + if (charset() == &my_charset_bin) + print_key_value_binary(out, ptr, length); + else + val_str(out); +} + + +void Field_string::print_key_value(String *out, uint32 length) +{ + if (charset() == &my_charset_bin) + { + size_t len= field_charset->cset->lengthsp(field_charset, (const char*) ptr, length); + print_key_value_binary(out, ptr, static_cast<uint32>(len)); + } + else + { + THD *thd= get_thd(); + sql_mode_t sql_mode_backup= thd->variables.sql_mode; + thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH; + val_str(out,out); + thd->variables.sql_mode= sql_mode_backup; + } +} + + +void Field_varstring::print_key_value(String *out, uint32 length) +{ + if (charset() == &my_charset_bin) + print_key_value_binary(out, get_data(), get_length()); + else + val_str(out,out); +} + + +void Field_blob::print_key_value(String *out, uint32 length) +{ + if (charset() == &my_charset_bin) + { + uchar *blob; + memcpy(&blob, ptr+packlength, sizeof(uchar*)); + print_key_value_binary(out, blob, get_length()); + } + else + val_str(out, out); +} + + +void Field::print_key_value_binary(String *out, const uchar* key, uint32 length) +{ + out->append_semi_hex((const char*)key, length, charset()); +}
\ No newline at end of file diff --git a/sql/field.h b/sql/field.h index cb4f0321c9d..2ce9b974a50 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1442,6 +1442,8 @@ public: virtual int set_time() { return 1; } bool set_warning(Sql_condition::enum_warning_level, unsigned int code, int cuted_increment, ulong current_row=0) const; + virtual void print_key_value(String *out, uint32 length); + void print_key_value_binary(String *out, const uchar* key, uint32 length); protected: bool set_warning(unsigned int code, int cuted_increment) const { @@ -3699,6 +3701,7 @@ public: { return charset() == &my_charset_bin ? FALSE : TRUE; } Field *make_new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type); virtual uint get_key_image(uchar *buff,uint length, imagetype type); + void print_key_value(String *out, uint32 length); private: int save_field_metadata(uchar *first_byte); }; @@ -3815,6 +3818,7 @@ public: uint is_equal(Create_field *new_field); void hash(ulong *nr, ulong *nr2); uint length_size() { return length_bytes; } + void print_key_value(String *out, uint32 length); private: int save_field_metadata(uchar *first_byte); }; @@ -4163,6 +4167,7 @@ public: uint32 char_length() const; uint32 character_octet_length() const; uint is_equal(Create_field *new_field); + void print_key_value(String *out, uint32 length); friend void TABLE::remember_blob_values(String *blob_storage); friend void TABLE::restore_blob_values(String *blob_storage); @@ -4290,6 +4295,10 @@ public: geometry_type get_geometry_type() { return geom_type; }; static geometry_type geometry_type_merge(geometry_type, geometry_type); uint get_srid() { return srid; } + void print_key_value(String *out, uint32 length) + { + out->append(STRING_WITH_LEN("unprintable_geometry_value")); + } }; uint gis_field_options_image(uchar *buff, List<Create_field> &create_fields); @@ -4608,6 +4617,11 @@ public: { return get_mm_leaf_int(param, key_part, cond, op, value, true); } + void print_key_value(String *out, uint32 length) + { + val_int_as_str(out, 1); + } + private: virtual size_t do_last_null_byte() const; int save_field_metadata(uchar *first_byte); diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 3050c62d908..00be71e55eb 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -8199,6 +8199,7 @@ int ha_partition::info(uint flag) stats.delete_length= 0; stats.check_time= 0; stats.checksum= 0; + stats.checksum_null= TRUE; for (i= bitmap_get_first_set(&m_part_info->read_partitions); i < m_tot_parts; i= bitmap_get_next_set(&m_part_info->read_partitions, i)) @@ -8212,7 +8213,11 @@ int ha_partition::info(uint flag) stats.delete_length+= file->stats.delete_length; if (file->stats.check_time > stats.check_time) stats.check_time= file->stats.check_time; - stats.checksum+= file->stats.checksum; + if (!file->stats.checksum_null) + { + stats.checksum+= file->stats.checksum; + stats.checksum_null= FALSE; + } } if (stats.records && stats.records < 2 && !(m_file[0]->ha_table_flags() & HA_STATS_RECORDS_IS_EXACT)) @@ -8369,6 +8374,7 @@ void ha_partition::get_dynamic_partition_info(PARTITION_STATS *stat_info, stat_info->update_time= file->stats.update_time; stat_info->check_time= file->stats.check_time; stat_info->check_sum= file->stats.checksum; + stat_info->check_sum_null= file->stats.checksum_null; } @@ -10585,6 +10591,64 @@ void ha_partition::init_table_handle_for_HANDLER() } +/** + Calculate the checksum of the table (all partitions) +*/ + +int ha_partition::pre_calculate_checksum() +{ + int error; + DBUG_ENTER("ha_partition::pre_calculate_checksum"); + m_pre_calling= TRUE; + if ((table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM))) + { + handler **file= m_file; + do + { + if ((error= (*file)->pre_calculate_checksum())) + { + DBUG_RETURN(error); + } + } while (*(++file)); + } + DBUG_RETURN(0); +} + + +int ha_partition::calculate_checksum() +{ + int error; + stats.checksum= 0; + stats.checksum_null= TRUE; + + DBUG_ENTER("ha_partition::calculate_checksum"); + if (!m_pre_calling) + { + if ((error= pre_calculate_checksum())) + { + m_pre_calling= FALSE; + DBUG_RETURN(error); + } + } + m_pre_calling= FALSE; + + handler **file= m_file; + do + { + if ((error= (*file)->calculate_checksum())) + { + DBUG_RETURN(error); + } + if (!(*file)->stats.checksum_null) + { + stats.checksum+= (*file)->stats.checksum; + stats.checksum_null= FALSE; + } + } while (*(++file)); + DBUG_RETURN(0); +} + + /**************************************************************************** MODULE enable/disable indexes ****************************************************************************/ diff --git a/sql/ha_partition.h b/sql/ha_partition.h index d538abc69ed..3ad00e853d1 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -1441,6 +1441,9 @@ public: void append_row_to_str(String &str); public: + virtual int pre_calculate_checksum(); + virtual int calculate_checksum(); + /* Enabled keycache for performance reasons, WL#4571 */ virtual int assign_to_keycache(THD* thd, HA_CHECK_OPT *check_opt); virtual int preload_keys(THD* thd, HA_CHECK_OPT* check_opt); diff --git a/sql/handler.cc b/sql/handler.cc index 5f368720390..e309de97dd9 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4859,6 +4859,7 @@ void handler::get_dynamic_partition_info(PARTITION_STATS *stat_info, stat_info->update_time= stats.update_time; stat_info->check_time= stats.check_time; stat_info->check_sum= stats.checksum; + stat_info->check_sum_null= stats.checksum_null; } @@ -5013,7 +5014,7 @@ int handler::calculate_checksum() return HA_ERR_ABORTED_BY_USER; ha_checksum row_crc= 0; - error= table->file->ha_rnd_next(table->record[0]); + error= ha_rnd_next(table->record[0]); if (error) break; @@ -5067,7 +5068,7 @@ int handler::calculate_checksum() stats.checksum+= row_crc; } - table->file->ha_rnd_end(); + ha_rnd_end(); return error == HA_ERR_END_OF_FILE ? 0 : error; } diff --git a/sql/handler.h b/sql/handler.h index ccd5f038b70..31b7bdcf998 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1040,7 +1040,7 @@ typedef bool (stat_print_fn)(THD *thd, const char *type, size_t type_len, const char *file, size_t file_len, const char *status, size_t status_len); enum ha_stat_type { HA_ENGINE_STATUS, HA_ENGINE_LOGS, HA_ENGINE_MUTEX }; -extern st_plugin_int *hton2plugin[MAX_HA]; +extern MYSQL_PLUGIN_IMPORT st_plugin_int *hton2plugin[MAX_HA]; /* Transaction log maintains type definitions */ enum log_status @@ -1929,6 +1929,7 @@ typedef struct { time_t check_time; time_t update_time; ulonglong check_sum; + bool check_sum_null; } PARTITION_STATS; #define UNDEF_NODEGROUP 65535 @@ -2890,6 +2891,7 @@ public: time_t update_time; uint block_size; /* index block size */ ha_checksum checksum; + bool checksum_null; /* number of buffer bytes that native mrr implementation needs, @@ -2901,7 +2903,7 @@ public: index_file_length(0), max_index_file_length(0), delete_length(0), auto_increment_value(0), records(0), deleted(0), mean_rec_length(0), create_time(0), check_time(0), update_time(0), block_size(0), - mrr_length_per_rec(0) + checksum(0), checksum_null(FALSE), mrr_length_per_rec(0) {} }; @@ -3934,6 +3936,7 @@ public: virtual uint max_supported_key_part_length() const { return 255; } virtual uint min_record_length(uint options) const { return 1; } + virtual int pre_calculate_checksum() { return 0; } virtual int calculate_checksum(); virtual bool is_crashed() const { return 0; } virtual bool auto_repair(int error) const { return 0; } diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 02018eba384..4e02d7edbe4 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -3915,7 +3915,6 @@ int subselect_single_select_engine::exec() tab->save_read_record= tab->read_record.read_record_func; tab->read_record.read_record_func= rr_sequential; tab->read_first_record= read_first_record_seq; - tab->read_record.record= tab->table->record[0]; tab->read_record.thd= join->thd; tab->read_record.ref_length= tab->table->file->ref_length; tab->read_record.unlock_row= rr_unlock_row; @@ -3933,7 +3932,6 @@ int subselect_single_select_engine::exec() for (JOIN_TAB **ptab= changed_tabs; ptab != last_changed_tab; ptab++) { JOIN_TAB *tab= *ptab; - tab->read_record.record= 0; tab->read_record.ref_length= 0; tab->read_first_record= tab->save_read_first_record; tab->read_record.read_record_func= tab->save_read_record; diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h index 8c6a661366f..ecac80d2aaa 100644 --- a/sql/item_windowfunc.h +++ b/sql/item_windowfunc.h @@ -44,11 +44,6 @@ public: first_check= true; } - void cleanup() - { - group_fields.empty(); - } - /* Check if the current row is in a different group than the previous row this function was called for. @@ -86,6 +81,10 @@ public: } return 0; } + ~Group_bound_tracker() + { + group_fields.delete_elements(); + } private: List<Cached_item> group_fields; @@ -213,7 +212,6 @@ public: { if (peer_tracker) { - peer_tracker->cleanup(); delete peer_tracker; peer_tracker= NULL; } @@ -284,7 +282,6 @@ class Item_sum_dense_rank: public Item_sum_int { if (peer_tracker) { - peer_tracker->cleanup(); delete peer_tracker; peer_tracker= NULL; } @@ -548,7 +545,6 @@ class Item_sum_percent_rank: public Item_sum_window_with_row_count { if (peer_tracker) { - peer_tracker->cleanup(); delete peer_tracker; peer_tracker= NULL; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 1e22c5621e6..f3d36bfc15c 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8322,8 +8322,10 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) opt_specialflag|= SPECIAL_NO_HOST_CACHE; break; case (int) OPT_SKIP_RESOLVE: - opt_skip_name_resolve= 1; - opt_specialflag|=SPECIAL_NO_RESOLVE; + if ((opt_skip_name_resolve= (argument != disabled_my_option))) + opt_specialflag|= SPECIAL_NO_RESOLVE; + else + opt_specialflag&= ~SPECIAL_NO_RESOLVE; break; case (int) OPT_WANT_CORE: test_flags |= TEST_CORE_ON_SIGNAL; @@ -8382,6 +8384,8 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) break; case OPT_PLUGIN_LOAD: free_list(opt_plugin_load_list_ptr); + if (argument == disabled_my_option) + break; // Resets plugin list /* fall through */ case OPT_PLUGIN_LOAD_ADD: opt_plugin_load_list_ptr->push_back(new i_string(argument)); diff --git a/sql/opt_range.cc b/sql/opt_range.cc index bff5bd371b6..d0c4ed2ffbc 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -15835,12 +15835,10 @@ static void print_key_value(String *out, const KEY_PART_INFO *key_part, { // Byte 0 of a nullable key is the null-byte. If set, key is NULL. if (field->real_maybe_null() && *key) + { out->append(STRING_WITH_LEN("NULL")); - else - (field->type() == MYSQL_TYPE_GEOMETRY) - ? out->append(STRING_WITH_LEN("unprintable_geometry_value")) - : out->append(STRING_WITH_LEN("unprintable_blob_value")); - goto next; + goto next; + } } if (field->real_maybe_null()) @@ -15859,28 +15857,12 @@ static void print_key_value(String *out, const KEY_PART_INFO *key_part, store_length--; } - /* - Binary data cannot be converted to UTF8 which is what the - optimizer trace expects. If the column is binary, the hex - representation is printed to the trace instead. - */ - if (field->flags & BINARY_FLAG) - { - out->append("0x"); - for (uint i = 0; i < store_length; i++) - { - out->append(_dig_vec_lower[*(key + i) >> 4]); - out->append(_dig_vec_lower[*(key + i) & 0x0F]); - } - goto next; - } - field->set_key_image(key, key_part->length); - if (field->type() == MYSQL_TYPE_BIT) - (void)field->val_int_as_str(&tmp, 1); // may change tmp's charset + field->print_key_value(&tmp, key_part->length); + if (field->charset() == &my_charset_bin) + out->append(tmp.ptr(), tmp.length(), tmp.charset()); else - field->val_str(&tmp); // may change tmp's charset - out->append(tmp.ptr(), tmp.length(), tmp.charset()); + tmp.print(out, system_charset_info); next: if (key + store_length < key_end) diff --git a/sql/records.cc b/sql/records.cc index c2db29c4912..5dd4318b105 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -77,7 +77,6 @@ bool init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table, bzero((char*) info,sizeof(*info)); info->thd= thd; info->table= table; - info->record= table->record[0]; info->print_error= print_error; info->unlock_row= rr_unlock_row; @@ -210,7 +209,6 @@ bool init_read_record(READ_RECORD *info,THD *thd, TABLE *table, else { empty_record(table); - info->record= table->record[0]; info->ref_length= (uint)table->file->ref_length; } info->select=select; @@ -393,7 +391,7 @@ static int rr_index_first(READ_RECORD *info) return tmp; } - tmp= info->table->file->ha_index_first(info->record); + tmp= info->table->file->ha_index_first(info->record()); info->read_record_func= rr_index; if (tmp) tmp= rr_handle_error(info, tmp); @@ -416,7 +414,7 @@ static int rr_index_first(READ_RECORD *info) static int rr_index_last(READ_RECORD *info) { - int tmp= info->table->file->ha_index_last(info->record); + int tmp= info->table->file->ha_index_last(info->record()); info->read_record_func= rr_index_desc; if (tmp) tmp= rr_handle_error(info, tmp); @@ -442,7 +440,7 @@ static int rr_index_last(READ_RECORD *info) static int rr_index(READ_RECORD *info) { - int tmp= info->table->file->ha_index_next(info->record); + int tmp= info->table->file->ha_index_next(info->record()); if (tmp) tmp= rr_handle_error(info, tmp); return tmp; @@ -467,7 +465,7 @@ static int rr_index(READ_RECORD *info) static int rr_index_desc(READ_RECORD *info) { - int tmp= info->table->file->ha_index_prev(info->record); + int tmp= info->table->file->ha_index_prev(info->record()); if (tmp) tmp= rr_handle_error(info, tmp); return tmp; @@ -477,7 +475,7 @@ static int rr_index_desc(READ_RECORD *info) int rr_sequential(READ_RECORD *info) { int tmp; - while ((tmp= info->table->file->ha_rnd_next(info->record))) + while ((tmp= info->table->file->ha_rnd_next(info->record()))) { tmp= rr_handle_error(info, tmp); break; @@ -493,7 +491,7 @@ static int rr_from_tempfile(READ_RECORD *info) { if (my_b_read(info->io_cache,info->ref_pos,info->ref_length)) return -1; /* End of file */ - if (!(tmp= info->table->file->ha_rnd_pos(info->record,info->ref_pos))) + if (!(tmp= info->table->file->ha_rnd_pos(info->record(), info->ref_pos))) break; /* The following is extremely unlikely to happen */ if (tmp == HA_ERR_KEY_NOT_FOUND) @@ -543,7 +541,7 @@ int rr_from_pointers(READ_RECORD *info) cache_pos= info->cache_pos; info->cache_pos+= info->ref_length; - if (!(tmp= info->table->file->ha_rnd_pos(info->record,cache_pos))) + if (!(tmp= info->table->file->ha_rnd_pos(info->record(), cache_pos))) break; /* The following is extremely unlikely to happen */ @@ -638,7 +636,7 @@ static int rr_from_cache(READ_RECORD *info) else { error=0; - memcpy(info->record,info->cache_pos, + memcpy(info->record(), info->cache_pos, (size_t) info->table->s->reclength); } info->cache_pos+=info->reclength; diff --git a/sql/records.h b/sql/records.h index e97f6b273cc..faf0d13c9a9 100644 --- a/sql/records.h +++ b/sql/records.h @@ -19,9 +19,10 @@ #pragma interface /* gcc class implementation */ #endif +#include "table.h" + struct st_join_table; class handler; -struct TABLE; class THD; class SQL_SELECT; class Copy_field; @@ -58,7 +59,6 @@ struct READ_RECORD SQL_SELECT *select; uint ref_length, reclength, rec_cache_size, error_offset; uchar *ref_pos; /* pointer to form->refpos */ - uchar *record; uchar *rec_buf; /* to read field values after filesort */ uchar *cache,*cache_pos,*cache_end,*read_positions; struct st_sort_addon_field *addon_field; /* Pointer to the fields info */ @@ -67,6 +67,7 @@ struct READ_RECORD void (*unpack)(struct st_sort_addon_field *, uchar *, uchar *); int read_record() { return read_record_func(this); } + uchar *record() const { return table->record[0]; } /* SJ-Materialization runtime may need to read fields from the materialized diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h index 93c5056a8fb..cce80ce2bc8 100644 --- a/sql/sql_bitmap.h +++ b/sql/sql_bitmap.h @@ -27,8 +27,22 @@ #include <my_bitmap.h> #include <my_bit.h> + template <uint width> class Bitmap { + +/* + Workaround GCC optimizer bug (generating SSE instuctions on unaligned data) +*/ +#if defined (__GNUC__) && defined(__x86_64__) && (__GNUC__ < 6) && !defined(__clang__) +#define NEED_GCC_NO_SSE_WORKAROUND +#endif + +#ifdef NEED_GCC_NO_SSE_WORKAROUND +#pragma GCC push_options +#pragma GCC target ("no-sse") +#endif + uint32 buffer[(width + 31) / 32]; public: Bitmap() @@ -264,8 +278,15 @@ public: } enum { BITMAP_END = width }; }; + +#ifdef NEED_GCC_NO_SSE_WORKAROUND +#pragma GCC pop_options +#undef NEED_GCC_NO_SSE_WORKAROUND +#endif + }; + /* An iterator to quickly walk over bits in ulonglong bitmap. */ class Table_map_iterator { diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc index 51412aedaf2..03ca08fb3fb 100644 --- a/sql/sql_explain.cc +++ b/sql/sql_explain.cc @@ -941,6 +941,11 @@ void Explain_select::print_explain_json(Explain_query *query, writer->add_member("outer_ref_condition"); write_item(writer, outer_ref_cond); } + if (pseudo_bits_cond) + { + writer->add_member("pseudo_bits_condition"); + write_item(writer, pseudo_bits_cond); + } /* we do not print HAVING which always evaluates to TRUE */ if (having || (having_value == Item::COND_FALSE)) diff --git a/sql/sql_explain.h b/sql/sql_explain.h index 35388416908..3896636f9fd 100644 --- a/sql/sql_explain.h +++ b/sql/sql_explain.h @@ -236,6 +236,7 @@ public: /* Expensive constant condition */ Item *exec_const_cond; Item *outer_ref_cond; + Item *pseudo_bits_cond; /* HAVING condition */ Item *having; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 7e2e2a1365a..165ae88879f 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5900,18 +5900,16 @@ add_key_field(JOIN *join, (*key_fields)->level= and_level; (*key_fields)->optimize= optimize; /* - If the condition has form "tbl.keypart = othertbl.field" and - othertbl.field can be NULL, there will be no matches if othertbl.field - has NULL value. - We use null_rejecting in add_not_null_conds() to add - 'othertbl.field IS NOT NULL' to tab->select_cond. + If the condition we are analyzing is NULL-rejecting and at least + one side of the equalities is NULLable, mark the KEY_FIELD object as + null-rejecting. This property is used by: + - add_not_null_conds() to add "column IS NOT NULL" conditions + - best_access_path() to produce better estimates for NULL-able unique keys. */ { - Item *real= (*value)->real_item(); - if (((cond->functype() == Item_func::EQ_FUNC) || - (cond->functype() == Item_func::MULT_EQUAL_FUNC)) && - (real->type() == Item::FIELD_ITEM) && - ((Item_field*)real)->field->maybe_null()) + if ((cond->functype() == Item_func::EQ_FUNC || + cond->functype() == Item_func::MULT_EQUAL_FUNC) && + ((*value)->maybe_null || field->real_maybe_null())) (*key_fields)->null_rejecting= true; else (*key_fields)->null_rejecting= false; @@ -7235,6 +7233,7 @@ best_access_path(JOIN *join, ulong key_flags; uint key_parts; key_part_map found_part= 0; + key_part_map notnull_part=0; // key parts which won't have NULL in lookup tuple. table_map found_ref= 0; uint key= keyuse->key; filter= 0; @@ -7294,6 +7293,9 @@ best_access_path(JOIN *join, if (!(keyuse->used_tables & ~join->const_table_map)) const_part|= keyuse->keypart_map; + if (!keyuse->val->maybe_null || keyuse->null_rejecting) + notnull_part|=keyuse->keypart_map; + double tmp2= prev_record_reads(join->positions, idx, (found_ref | keyuse->used_tables)); if (tmp2 < best_prev_record_reads) @@ -7347,12 +7349,19 @@ best_access_path(JOIN *join, loose_scan_opt.check_ref_access_part1(s, key, start_key, found_part); /* Check if we found full key */ - if (found_part == PREV_BITS(uint, key_parts) && - !ref_or_null_part) + const key_part_map all_key_parts= PREV_BITS(uint, key_parts); + if (found_part == all_key_parts && !ref_or_null_part) { /* use eq key */ max_key_part= (uint) ~0; - if ((key_flags & (HA_NOSAME | HA_NULL_PART_KEY)) == HA_NOSAME || - MY_TEST(key_flags & HA_EXT_NOSAME)) + /* + If the index is a unique index (1), and + - all its columns are not null (2), or + - equalities we are using reject NULLs (3) + then the estimate is rows=1. + */ + if ((key_flags & (HA_NOSAME | HA_EXT_NOSAME)) && // (1) + (!(key_flags & HA_NULL_PART_KEY) || // (2) + all_key_parts == notnull_part)) // (3) { trace_access_idx.add("access_type", "eq_ref") .add("index", keyinfo->name); @@ -10565,8 +10574,16 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, uint maybe_null= MY_TEST(keyinfo->key_part[i].null_bit); j->ref.items[i]=keyuse->val; // Save for cond removal j->ref.cond_guards[i]= keyuse->cond_guard; - if (keyuse->null_rejecting) + + /* + Set ref.null_rejecting to true only if we are going to inject a + "keyuse->val IS NOT NULL" predicate. + */ + Item *real= (keyuse->val)->real_item(); + if (keyuse->null_rejecting && (real->type() == Item::FIELD_ITEM) && + ((Item_field*)real)->field->maybe_null()) j->ref.null_rejecting|= (key_part_map)1 << i; + keyuse_uses_no_tables= keyuse_uses_no_tables && !keyuse->used_tables; /* We don't want to compute heavy expressions in EXPLAIN, an example would @@ -21163,7 +21180,6 @@ join_read_first(JOIN_TAB *tab) tab->table->status=0; tab->read_record.read_record_func= join_read_next; tab->read_record.table=table; - tab->read_record.record=table->record[0]; if (!table->file->inited) error= table->file->ha_index_init(tab->index, tab->sorted); if (likely(!error)) @@ -21183,7 +21199,7 @@ static int join_read_next(READ_RECORD *info) { int error; - if (unlikely((error= info->table->file->ha_index_next(info->record)))) + if (unlikely((error= info->table->file->ha_index_next(info->record())))) return report_error(info->table, error); return 0; @@ -21203,7 +21219,6 @@ join_read_last(JOIN_TAB *tab) tab->table->status=0; tab->read_record.read_record_func= join_read_prev; tab->read_record.table=table; - tab->read_record.record=table->record[0]; if (!table->file->inited) error= table->file->ha_index_init(tab->index, 1); if (likely(!error)) @@ -21220,7 +21235,7 @@ static int join_read_prev(READ_RECORD *info) { int error; - if (unlikely((error= info->table->file->ha_index_prev(info->record)))) + if (unlikely((error= info->table->file->ha_index_prev(info->record())))) return report_error(info->table, error); return 0; } @@ -21250,7 +21265,7 @@ static int join_ft_read_next(READ_RECORD *info) { int error; - if (unlikely((error= info->table->file->ha_ft_read(info->table->record[0])))) + if (unlikely((error= info->table->file->ha_ft_read(info->record())))) return report_error(info->table, error); return 0; } @@ -26505,6 +26520,7 @@ int JOIN::save_explain_data_intern(Explain_query *output, xpl_sel->exec_const_cond= exec_const_cond; xpl_sel->outer_ref_cond= outer_ref_cond; + xpl_sel->pseudo_bits_cond= pseudo_bits_cond; if (tmp_having) xpl_sel->having= tmp_having; else diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 3d2bc310004..8e8791d836f 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -5680,7 +5680,9 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables, table->field[16]->store_time(&time); table->field[16]->set_notnull(); } - if (file->ha_table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM)) + if ((file->ha_table_flags() & + (HA_HAS_OLD_CHECKSUM | HA_HAS_NEW_CHECKSUM)) && + !file->stats.checksum_null) { table->field[18]->store((longlong) file->stats.checksum, TRUE); table->field[18]->set_notnull(); diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 5c8d85c2cc1..8c170b7df52 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -102,29 +102,6 @@ inline void init_table_list_for_stat_tables(TABLE_LIST *tables, bool for_write) } } - -/** - @details - The function builds a TABLE_LIST containing only one element 'tbl' for - the statistical table called 'stat_tab_name'. - The lock type of the element is set to TL_READ if for_write = FALSE, - otherwise it is set to TL_WRITE. -*/ - -static inline -void init_table_list_for_single_stat_table(TABLE_LIST *tbl, - const LEX_CSTRING *stat_tab_name, - bool for_write) -{ - memset((char *) tbl, 0, sizeof(TABLE_LIST)); - - tbl->db= MYSQL_SCHEMA_NAME; - tbl->table_name= *stat_tab_name; - tbl->alias= *stat_tab_name; - tbl->lock_type= for_write ? TL_WRITE : TL_READ; -} - - static Table_check_intact_log_error stat_table_intact; static const @@ -286,16 +263,21 @@ inline int open_stat_tables(THD *thd, TABLE_LIST *tables, /** @brief Open a statistical table and lock it + + @details + This is used by DDLs. When a column or index is dropped or renamed, + stat tables need to be adjusted accordingly. */ -static -inline int open_single_stat_table(THD *thd, TABLE_LIST *table, - const LEX_CSTRING *stat_tab_name, - Open_tables_backup *backup, - bool for_write) +static inline int open_stat_table_for_ddl(THD *thd, TABLE_LIST *table, + const LEX_CSTRING *stat_tab_name, + Open_tables_backup *backup) { - init_table_list_for_single_stat_table(table, stat_tab_name, for_write); - init_mdl_requests(table); - return open_system_tables_for_read(thd, table, backup); + table->init_one_table(&MYSQL_SCHEMA_NAME, stat_tab_name, NULL, TL_WRITE); + No_such_table_error_handler nst_handler; + thd->push_internal_handler(&nst_handler); + int res= open_system_tables_for_read(thd, table, backup); + thd->pop_internal_handler(); + return res; } @@ -3478,21 +3460,16 @@ int delete_statistics_for_table(THD *thd, const LEX_CSTRING *db, @brief Delete statistics on a column of the specified table - @param - thd The thread handle - @param - tab The table the column belongs to - @param - col The field of the column whose statistics is to be deleted + @param thd The thread handle + @param tab The table the column belongs to + @param col The field of the column whose statistics is to be deleted @details The function delete statistics on the column 'col' belonging to the table 'tab' from the statistical table column_stats. - @retval - 0 If all deletions are successful or we couldn't open statistics table - @retval - 1 Otherwise + @retval 0 If all deletions are successful or we couldn't open statistics table + @retval 1 Otherwise @note The function is called when dropping a table column or when changing @@ -3509,8 +3486,8 @@ int delete_statistics_for_column(THD *thd, TABLE *tab, Field *col) int rc= 0; DBUG_ENTER("delete_statistics_for_column"); - if (open_single_stat_table(thd, &tables, &stat_table_name[1], - &open_tables_backup, TRUE)) + if (open_stat_table_for_ddl(thd, &tables, &stat_table_name[1], + &open_tables_backup)) DBUG_RETURN(0); save_binlog_format= thd->set_current_stmt_binlog_format_stmt(); @@ -3537,24 +3514,18 @@ int delete_statistics_for_column(THD *thd, TABLE *tab, Field *col) @brief Delete statistics on an index of the specified table - @param - thd The thread handle - @param - tab The table the index belongs to - @param - key_info The descriptor of the index whose statistics is to be deleted - @param - ext_prefixes_only Delete statistics only on the index prefixes extended by - the components of the primary key + @param thd The thread handle + @param tab The table the index belongs to + @param key_info The descriptor of the index whose statistics is to be deleted + @param ext_prefixes_only Delete statistics only on the index prefixes + extended by the components of the primary key @details The function delete statistics on the index specified by 'key_info' defined on the table 'tab' from the statistical table index_stats. - @retval - 0 If all deletions are successful or we couldn't open statistics table - @retval - 1 Otherwise + @retval 0 If all deletions are successful or we couldn't open statistics table + @retval 1 Otherwise @note The function is called when dropping an index, or dropping/changing the @@ -3572,8 +3543,8 @@ int delete_statistics_for_index(THD *thd, TABLE *tab, KEY *key_info, int rc= 0; DBUG_ENTER("delete_statistics_for_index"); - if (open_single_stat_table(thd, &tables, &stat_table_name[2], - &open_tables_backup, TRUE)) + if (open_stat_table_for_ddl(thd, &tables, &stat_table_name[2], + &open_tables_backup)) DBUG_RETURN(0); save_binlog_format= thd->set_current_stmt_binlog_format_stmt(); @@ -3635,7 +3606,7 @@ int delete_statistics_for_index(THD *thd, TABLE *tab, KEY *key_info, index_stats. @retval - 0 If all updates of the table name are successful + 0 If all updates of the table name are successful @retval 1 Otherwise @@ -3716,26 +3687,19 @@ int rename_table_in_stat_tables(THD *thd, const LEX_CSTRING *db, /** - @brief Rename a column in the statistical table column_stats - @param - thd The thread handle - @param - tab The table the column belongs to - @param - col The column to be renamed - @param - new_name The new column name + @param thd The thread handle + @param tab The table the column belongs to + @param col The column to be renamed + @param new_name The new column name @details The function replaces the name of the column 'col' belonging to the table 'tab' for 'new_name' in the statistical table column_stats. - @retval - 0 If all updates of the table name are successful - @retval - 1 Otherwise + @retval 0 If all updates of the table name are successful + @retval 1 Otherwise @note The function is called when executing any statement that renames a column, @@ -3756,8 +3720,8 @@ int rename_column_in_stat_tables(THD *thd, TABLE *tab, Field *col, if (tab->s->tmp_table != NO_TMP_TABLE) DBUG_RETURN(0); - if (open_single_stat_table(thd, &tables, &stat_table_name[1], - &open_tables_backup, TRUE)) + if (open_stat_table_for_ddl(thd, &tables, &stat_table_name[1], + &open_tables_backup)) DBUG_RETURN(rc); save_binlog_format= thd->set_current_stmt_binlog_format_stmt(); diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 410f52a8c74..1b567ecb325 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -1196,3 +1196,15 @@ uint convert_to_printable(char *to, size_t to_len, *t= '\0'; return (uint) (t - to); } + + +bool String::append_semi_hex(const char *s, uint len, CHARSET_INFO *cs) +{ + size_t dst_len= len * 4 + 1; //extra length for the '\0' character + if (reserve(dst_len)) + return true; + uint nbytes= convert_to_printable(Ptr + str_length, dst_len, s, len, cs); + DBUG_ASSERT((ulonglong) str_length + nbytes < UINT_MAX32); + str_length+= nbytes; + return false; +} diff --git a/sql/sql_string.h b/sql/sql_string.h index 3c112c94fe9..b343200aa77 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -679,6 +679,7 @@ public: int reserve(size_t space_needed) { + DBUG_ASSERT((ulonglong) str_length + space_needed < UINT_MAX32); return realloc(str_length + space_needed); } int reserve(size_t space_needed, size_t grow_by); @@ -964,6 +965,8 @@ public: { return !sortcmp(this, other, cs); } +private: + bool append_semi_hex(const char *s, uint len, CHARSET_INFO *cs); }; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index cbe4381a3a4..5845f96ca58 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -11002,7 +11002,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables, (((t->file->ha_table_flags() & HA_HAS_OLD_CHECKSUM) && thd->variables.old_mode) || ((t->file->ha_table_flags() & HA_HAS_NEW_CHECKSUM) && !thd->variables.old_mode))) { - if (t->file->info(HA_STATUS_VARIABLE)) + if (t->file->info(HA_STATUS_VARIABLE) || t->file->stats.checksum_null) protocol->store_null(); else protocol->store((longlong)t->file->stats.checksum); @@ -11022,7 +11022,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables, thd->protocol->remove_last_row(); goto err; } - if (error) + if (error || t->file->stats.checksum_null) protocol->store_null(); else protocol->store((longlong)t->file->stats.checksum); diff --git a/sql/sql_window.cc b/sql/sql_window.cc index 487242933d4..a6c9dd3fea7 100644 --- a/sql/sql_window.cc +++ b/sql/sql_window.cc @@ -898,7 +898,7 @@ public: { Rowid_seq_cursor::init(info); table= info->table; - record= info->record; + record= info->record(); } virtual int fetch() diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index eeabc6aa8ab..53c63d82fe2 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -6113,10 +6113,12 @@ database_corrupted: if (err == DB_PAGE_CORRUPTED || err == DB_DECRYPTION_FAILED) { + const page_id_t corrupt_page_id = bpage->id; + buf_corrupt_page_release(bpage, space); if (recv_recovery_is_on()) { - recv_recover_corrupt_page(bpage); + recv_recover_corrupt_page(corrupt_page_id); } space->release_for_io(); diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h index 0914e2710d7..564931b6f3a 100644 --- a/storage/innobase/include/log0recv.h +++ b/storage/innobase/include/log0recv.h @@ -49,8 +49,8 @@ recv_find_max_checkpoint(ulint* max_field) /** Remove records for a corrupted page. This function should called when srv_force_recovery > 0. -@param[in] bpage buffer pool page */ -ATTRIBUTE_COLD void recv_recover_corrupt_page(buf_page_t* bpage); +@param[in] page_id page id of the corrupted page */ +ATTRIBUTE_COLD void recv_recover_corrupt_page(page_id_t page_id); /** Apply any buffered redo log to a page that was just read from a data file. @param[in,out] bpage buffer pool page */ diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h index 812b4697ada..a3c95593acf 100644 --- a/storage/innobase/include/os0file.h +++ b/storage/innobase/include/os0file.h @@ -777,9 +777,7 @@ os_file_rename os_aio os_file_read os_file_read_no_error_handling -os_file_read_no_error_handling_int_fd os_file_write -os_file_write_int_fd The wrapper functions have the prefix of "innodb_". */ @@ -1155,13 +1153,9 @@ to original un-instrumented file I/O APIs */ # define os_file_read_no_error_handling(type, file, buf, offset, n, o) \ os_file_read_no_error_handling_func(type, file, buf, offset, n, o) -# define os_file_read_no_error_handling_int_fd(type, file, buf, offset, n) \ - os_file_read_no_error_handling_func(type, OS_FILE_FROM_FD(file), buf, offset, n, NULL) # define os_file_write(type, name, file, buf, offset, n) \ os_file_write_func(type, name, file, buf, offset, n) -# define os_file_write_int_fd(type, name, file, buf, offset, n) \ - os_file_write_func(type, name, OS_FILE_FROM_FD(file), buf, offset, n) # define os_file_flush(file) os_file_flush_func(file) diff --git a/storage/innobase/include/os0file.ic b/storage/innobase/include/os0file.ic index f1b8aa67180..e01fcb41afb 100644 --- a/storage/innobase/include/os0file.ic +++ b/storage/innobase/include/os0file.ic @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2010, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2017, MariaDB Corporation. +Copyright (c) 2013, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h index 45366f9128a..27bd19252ac 100644 --- a/storage/innobase/include/row0merge.h +++ b/storage/innobase/include/row0merge.h @@ -370,7 +370,9 @@ row_merge_buf_sort( /********************************************************************//** Write a merge block to the file system. -@return whether the request was completed successfully */ +@return whether the request was completed successfully +@retval false on error +@retval true on success */ UNIV_INTERN bool row_merge_write( diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index d7966aff096..d4d81a8aa9b 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -1971,11 +1971,11 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr, /** Remove records for a corrupted page. This function should called when srv_force_recovery > 0. -@param[in] bpage buffer pool page */ -void recv_recover_corrupt_page(buf_page_t* bpage) +@param[in] page_id page id of the corrupted page */ +void recv_recover_corrupt_page(page_id_t page_id) { mutex_enter(&recv_sys.mutex); - recv_sys.pages.erase(bpage->id); + recv_sys.pages.erase(page_id); mutex_exit(&recv_sys.mutex); } diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index c6cc3197205..3ff56a53ebf 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -4860,7 +4860,8 @@ Requests a synchronous write operation. @param[out] buf buffer from which to write @param[in] offset file offset from the start where to read @param[in] n number of bytes to read, starting from offset -@return DB_SUCCESS if request was successful, false if fail */ +@return error code +@retval DB_SUCCESS if the operation succeeded */ dberr_t os_file_write_func( const IORequest& type, @@ -5345,7 +5346,8 @@ Requests a synchronous positioned read operation. @param[out] buf buffer where to read @param[in] offset file offset from the start where to read @param[in] n number of bytes to read, starting from offset -@return DB_SUCCESS or error code */ +@return error code +@retval DB_SUCCESS if the operation succeeded */ dberr_t os_file_read_func( const IORequest& type, diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index 52eec25ce9b..39dc8f4bba4 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -3424,8 +3424,12 @@ page_corrupted: if (!encrypted) { } else if (!key_version) { not_encrypted: - if (!page_compressed - && !block->page.zip.data) { + if (block->page.id.page_no() == 0 + && block->page.zip.data) { + block->page.zip.data = src; + frame_changed = true; + } else if (!page_compressed + && !block->page.zip.data) { block->frame = src; frame_changed = true; } else { @@ -3529,7 +3533,11 @@ not_encrypted: } if (frame_changed) { - block->frame = dst; + if (block->page.zip.data) { + block->page.zip.data = dst; + } else { + block->frame = dst; + } } src = io_buffer + (i * size); diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index 6c9b8193cc0..43d06e983cf 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -1123,7 +1123,9 @@ row_merge_read( /********************************************************************//** Write a merge block to the file system. -@return whether the request was completed successfully */ +@return whether the request was completed successfully +@retval false on error +@retval true on success */ UNIV_INTERN bool row_merge_write( diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index fb41ce525e2..89a1f4fdcf4 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -2793,9 +2793,12 @@ int ha_maria::external_lock(THD *thd, int lock_type) } } } /* if transactional table */ - DBUG_RETURN(maria_lock_database(file, !table->s->tmp_table ? + int result = maria_lock_database(file, !table->s->tmp_table ? lock_type : ((lock_type == F_UNLCK) ? - F_UNLCK : F_EXTRA_LCK))); + F_UNLCK : F_EXTRA_LCK)); + if (!file->s->base.born_transactional) + file->state= &file->s->state.state; // Restore state if clone + DBUG_RETURN(result); } int ha_maria::start_stmt(THD *thd, thr_lock_type lock_type) diff --git a/storage/rocksdb/mysql-test/rocksdb/slow_query_log.awk b/storage/rocksdb/mysql-test/rocksdb/slow_query_log.awk index 4617b6d9fc3..a921f47243e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/slow_query_log.awk +++ b/storage/rocksdb/mysql-test/rocksdb/slow_query_log.awk @@ -1,5 +1,3 @@ -#!/bin/awk - /Query_time:/ { results["Rows_examined:"] = "uninit"; results["RocksDB_key_skipped:"] = "uninit"; diff --git a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/create_slocket_socket.sh b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/create_slocket_socket.sh index 6174e5d1864..db470f527ca 100755 --- a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/create_slocket_socket.sh +++ b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/create_slocket_socket.sh @@ -1,2 +1,4 @@ +#!/bin/bash + src_data_dir="${MYSQLTEST_VARDIR}/mysqld.1/data/" python -c "import socket as s; sock = s.socket(s.AF_UNIX); sock.bind('${src_data_dir}/slocket')" diff --git a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/create_table.sh b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/create_table.sh index a4d60dc864c..2004caca160 100755 --- a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/create_table.sh +++ b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/create_table.sh @@ -1,3 +1,5 @@ +#!/bin/bash + set -e COPY_LOG=$1 diff --git a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data.sh b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data.sh index f3836ab75e5..80f1a5e2567 100755 --- a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data.sh +++ b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data.sh @@ -1,3 +1,5 @@ +#!/bin/bash + set -e # Insert 100 batches of 100 records each to a table with following schema: diff --git a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data_and_run.sh b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data_and_run.sh index a4e4afab9d4..a8e6fc445bb 100755 --- a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data_and_run.sh +++ b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data_and_run.sh @@ -1,3 +1,5 @@ +#!/bin/bash + set -e # Initially loads a chunk of data. diff --git a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data_slocket.sh b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data_slocket.sh index ed0b3cb5c1c..036d68662d4 100755 --- a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data_slocket.sh +++ b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/load_data_slocket.sh @@ -1,3 +1,5 @@ +#!/bin/bash + set -e # Insert 10 batches of 10 records each to a table with following schema: diff --git a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/remove_slocket_socket.sh b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/remove_slocket_socket.sh index 0c2c71aad68..9114629ba31 100755 --- a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/remove_slocket_socket.sh +++ b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/remove_slocket_socket.sh @@ -1,2 +1,4 @@ +#!/bin/bash + src_data_dir="${MYSQLTEST_VARDIR}/mysqld.1/data/" rm "${src_data_dir}/slocket" diff --git a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/setup_replication_gtid.sh b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/setup_replication_gtid.sh index 18e1feeda96..3c95068a488 100755 --- a/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/setup_replication_gtid.sh +++ b/storage/rocksdb/mysql-test/rocksdb_hotbackup/include/setup_replication_gtid.sh @@ -1,3 +1,5 @@ +#!/bin/bash + set -e binlog_line=($(grep -o "Last binlog file position [0-9]*, file name .*\.[0-9]*" ${MYSQLTEST_VARDIR}/log/mysqld.2.err | tail -1)) diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index fb947ef643f..33e81201fff 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -1,4 +1,5 @@ -/* Copyright (C) 2008-2018 Kentoku Shiba +/* Copyright (C) 2008-2019 Kentoku Shiba + Copyright (C) 2019 MariaDB corp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -116,7 +117,7 @@ ha_spider::ha_spider( use_fields = FALSE; #endif use_pre_call = FALSE; - use_pre_records = FALSE; + use_pre_action = FALSE; #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS do_direct_update = FALSE; #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) @@ -228,7 +229,7 @@ ha_spider::ha_spider( use_fields = FALSE; #endif use_pre_call = FALSE; - use_pre_records = FALSE; + use_pre_action = FALSE; #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS do_direct_update = FALSE; #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) @@ -1805,7 +1806,7 @@ int ha_spider::reset() high_priority = FALSE; insert_delayed = FALSE; use_pre_call = FALSE; - use_pre_records = FALSE; + use_pre_action = FALSE; pre_bitmap_checked = FALSE; bulk_insert = FALSE; clone_bitmap_init = FALSE; @@ -8760,22 +8761,24 @@ int ha_spider::info( } if (flag & HA_STATUS_TIME) - stats.update_time = (ulong) share->update_time; + stats.update_time = (ulong) share->stat.update_time; if (flag & (HA_STATUS_CONST | HA_STATUS_VARIABLE)) { - stats.max_data_file_length = share->max_data_file_length; - stats.create_time = (ulong) share->create_time; + stats.max_data_file_length = share->stat.max_data_file_length; + stats.create_time = share->stat.create_time; stats.block_size = spider_param_block_size(thd); } if (flag & HA_STATUS_VARIABLE) { - stats.data_file_length = share->data_file_length; - stats.index_file_length = share->index_file_length; - stats.records = share->records; - stats.mean_rec_length = share->mean_rec_length; - stats.check_time = (ulong) share->check_time; + stats.data_file_length = share->stat.data_file_length; + stats.index_file_length = share->stat.index_file_length; + stats.records = share->stat.records; + stats.mean_rec_length = share->stat.mean_rec_length; + stats.check_time = share->stat.check_time; if (stats.records <= 1 /* && (flag & HA_STATUS_NO_LOCK) */ ) stats.records = 2; + stats.checksum = share->stat.checksum; + stats.checksum_null = share->stat.checksum_null; } if (flag & HA_STATUS_AUTO) { @@ -9014,7 +9017,7 @@ ha_rows ha_spider::records_in_range( key_part_map tgt_key_part_map; KEY_PART_INFO *key_part; Field *field = NULL; - double rows = (double) share->records; + double rows = (double) share->stat.records; double weight, rate; DBUG_PRINT("info",("spider rows1=%f", rows)); if (start_key) @@ -9323,11 +9326,12 @@ int ha_spider::pre_records() result_list.casual_read[search_link_idx] = spider_param_casual_read(thd, share->casual_read); } - if ((error_num = spider_db_show_records(this, search_link_idx, TRUE))) + if ((error_num = spider_db_simple_action(SPIDER_SIMPLE_RECORDS, this, + search_link_idx, TRUE))) { DBUG_RETURN(check_error_mode(error_num)); } - use_pre_records = TRUE; + use_pre_action = TRUE; DBUG_RETURN(0); } @@ -9339,14 +9343,14 @@ ha_rows ha_spider::records() DBUG_PRINT("info",("spider this=%p", this)); if (sql_command == SQLCOM_ALTER_TABLE) { - use_pre_records = FALSE; + use_pre_action = FALSE; DBUG_RETURN(0); } if (!(share->additional_table_flags & HA_HAS_RECORDS) && !this->result_list.direct_limit_offset) { DBUG_RETURN(handler::records()); } - if (!use_pre_records && !this->result_list.direct_limit_offset) + if (!use_pre_action && !this->result_list.direct_limit_offset) { THD *thd = trx->thd; if ( @@ -9357,17 +9361,84 @@ ha_rows ha_spider::records() spider_param_casual_read(thd, share->casual_read); } } - if ((error_num = spider_db_show_records(this, search_link_idx, FALSE))) + if ((error_num = spider_db_simple_action(SPIDER_SIMPLE_RECORDS, this, + search_link_idx, FALSE))) { - use_pre_records = FALSE; + use_pre_action = FALSE; check_error_mode(error_num); DBUG_RETURN(HA_POS_ERROR); } - use_pre_records = FALSE; - share->records = table_rows; + use_pre_action = FALSE; + share->stat.records = table_rows; DBUG_RETURN(table_rows); } +#ifdef HA_HAS_CHECKSUM_EXTENDED +int ha_spider::pre_calculate_checksum() +{ + int error_num; + backup_error_status(); + DBUG_ENTER("ha_spider::pre_calculate_checksum"); + DBUG_PRINT("info",("spider this=%p", this)); + THD *thd = trx->thd; + if ( + spider_param_sync_autocommit(thd) && + (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) + ) { + result_list.casual_read[search_link_idx] = + spider_param_casual_read(thd, share->casual_read); + } + action_flags = T_EXTEND; + if ((error_num = spider_db_simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE, this, + search_link_idx, TRUE))) + { + DBUG_RETURN(check_error_mode(error_num)); + } + use_pre_action = TRUE; + DBUG_RETURN(0); +} + +int ha_spider::calculate_checksum() +{ + int error_num; + backup_error_status(); + DBUG_ENTER("ha_spider::calculate_checksum"); + DBUG_PRINT("info",("spider this=%p", this)); + if (!use_pre_action && !this->result_list.direct_limit_offset) + { + THD *thd = trx->thd; + if ( + spider_param_sync_autocommit(thd) && + (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) + ) { + result_list.casual_read[search_link_idx] = + spider_param_casual_read(thd, share->casual_read); + } + } + action_flags = T_EXTEND; + if ((error_num = spider_db_simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE, this, + search_link_idx, FALSE))) + { + use_pre_action = FALSE; + DBUG_RETURN(check_error_mode(error_num)); + } + use_pre_action = FALSE; + if (checksum_null) + { + share->stat.checksum_null = TRUE; + share->stat.checksum = 0; + stats.checksum_null = TRUE; + stats.checksum = 0; + } else { + share->stat.checksum_null = FALSE; + share->stat.checksum = (ha_checksum) checksum_val; + stats.checksum_null = FALSE; + stats.checksum = (ha_checksum) checksum_val; + } + DBUG_RETURN(0); +} +#endif + const char *ha_spider::table_type() const { DBUG_ENTER("ha_spider::table_type"); @@ -11172,8 +11243,9 @@ double ha_spider::scan_time() DBUG_ENTER("ha_spider::scan_time"); DBUG_PRINT("info",("spider this=%p", this)); DBUG_PRINT("info",("spider scan_time = %.6f", - share->scan_rate * share->records * share->mean_rec_length + 2)); - DBUG_RETURN(share->scan_rate * share->records * share->mean_rec_length + 2); + share->scan_rate * share->stat.records * share->stat.mean_rec_length + 2)); + DBUG_RETURN(share->scan_rate * share->stat.records * + share->stat.mean_rec_length + 2); } double ha_spider::read_time( @@ -11192,8 +11264,8 @@ double ha_spider::read_time( rows / 2 + 2); } else { DBUG_PRINT("info",("spider read_time = %.6f", - share->read_rate * share->mean_rec_length * rows + 2)); - DBUG_RETURN(share->read_rate * share->mean_rec_length * rows + 2); + share->read_rate * share->stat.mean_rec_length * rows + 2)); + DBUG_RETURN(share->read_rate * share->stat.mean_rec_length * rows + 2); } } diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h index 9ffe49754e8..6f5359007f1 100644 --- a/storage/spider/ha_spider.h +++ b/storage/spider/ha_spider.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2008-2018 Kentoku Shiba +/* Copyright (C) 2008-2019 Kentoku Shiba + Copyright (C) 2019 MariaDB corp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -170,7 +171,7 @@ public: bool high_priority; bool insert_delayed; bool use_pre_call; - bool use_pre_records; + bool use_pre_action; bool pre_bitmap_checked; enum thr_lock_type lock_type; int lock_mode; @@ -243,6 +244,11 @@ public: SPIDER_ITEM_HLD *direct_aggregate_item_current; #endif ha_rows table_rows; +#ifdef HA_HAS_CHECKSUM_EXTENDED + ha_checksum checksum_val; + bool checksum_null; + uint action_flags; +#endif /* for fulltext search */ bool ft_init_and_first; @@ -512,6 +518,10 @@ public: int check_crd(); int pre_records(); ha_rows records(); +#ifdef HA_HAS_CHECKSUM_EXTENDED + int pre_calculate_checksum(); + int calculate_checksum(); +#endif const char *table_type() const; ulonglong table_flags() const; const char *index_type( diff --git a/storage/spider/mysql-test/spider/bugfix/include/checksum_table_with_quick_mode_3_init.inc b/storage/spider/mysql-test/spider/bugfix/include/checksum_table_with_quick_mode_3_init.inc index bf2d9163b9a..123410380ab 100644 --- a/storage/spider/mysql-test/spider/bugfix/include/checksum_table_with_quick_mode_3_init.inc +++ b/storage/spider/mysql-test/spider/bugfix/include/checksum_table_with_quick_mode_3_init.inc @@ -21,7 +21,7 @@ let $CHILD2_1_CREATE_TABLES= let $CHILD2_1_SELECT_TABLES= SELECT pkey FROM tbl_a ORDER BY pkey; let $CHILD2_1_SELECT_ARGUMENT1= - SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'; + SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; --connection master_1 set @old_spider_quick_mode= @@spider_quick_mode; set session spider_quick_mode= 3; diff --git a/storage/spider/mysql-test/spider/bugfix/include/same_server_link_deinit.inc b/storage/spider/mysql-test/spider/bugfix/include/same_server_link_deinit.inc new file mode 100644 index 00000000000..a4e8a10db19 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/include/same_server_link_deinit.inc @@ -0,0 +1,11 @@ +--connection master_1 +set global spider_same_server_link= @old_global_spider_same_server_link; +set session spider_same_server_link= @old_session_spider_same_server_link; +--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP +--disable_warnings +--disable_query_log +--disable_result_log +--source ../t/test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings diff --git a/storage/spider/mysql-test/spider/bugfix/include/same_server_link_init.inc b/storage/spider/mysql-test/spider/bugfix/include/same_server_link_init.inc new file mode 100644 index 00000000000..2c8150c905d --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/include/same_server_link_init.inc @@ -0,0 +1,15 @@ +--disable_warnings +--disable_query_log +--disable_result_log +--source ../t/test_init.inc +--enable_result_log +--enable_query_log +--enable_warnings +--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1 +let $MASTER_1_COMMENT_2_1= + COMMENT='table "tbl_b", host "127.0.0.1", port "$MASTER_1_MYPORT", user "root"'; +--connection master_1 +set @old_global_spider_same_server_link= @@global.spider_same_server_link; +set @old_session_spider_same_server_link= @@session.spider_same_server_link; +set global spider_same_server_link= 0; +set session spider_same_server_link= 0; diff --git a/storage/spider/mysql-test/spider/bugfix/r/checksum_table_with_quick_mode_3.result b/storage/spider/mysql-test/spider/bugfix/r/checksum_table_with_quick_mode_3.result index eae4895411e..bd423d934f5 100644 --- a/storage/spider/mysql-test/spider/bugfix/r/checksum_table_with_quick_mode_3.result +++ b/storage/spider/mysql-test/spider/bugfix/r/checksum_table_with_quick_mode_3.result @@ -44,10 +44,10 @@ CHECKSUM TABLE tbl_a EXTENDED; Table Checksum auto_test_local.tbl_a 1061386331 connection child2_1; -SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'; +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; argument -select `pkey` from `auto_test_remote`.`tbl_a` -SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %' +checksum table `auto_test_remote`.`tbl_a` extended +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' SELECT pkey FROM tbl_a ORDER BY pkey; pkey 0 diff --git a/storage/spider/mysql-test/spider/bugfix/r/same_server_link.result b/storage/spider/mysql-test/spider/bugfix/r/same_server_link.result new file mode 100644 index 00000000000..1f4177568a7 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/same_server_link.result @@ -0,0 +1,42 @@ +for master_1 +for child2 +for child3 +connection master_1; +set @old_global_spider_same_server_link= @@global.spider_same_server_link; +set @old_session_spider_same_server_link= @@session.spider_same_server_link; +set global spider_same_server_link= 0; +set session spider_same_server_link= 0; + +this test is for MDEV-6268 + +drop and create databases +connection master_1; +CREATE DATABASE auto_test_local; +USE auto_test_local; + +create table +connection master_1; +CREATE TABLE tbl_a ( +pkey int NOT NULL, +PRIMARY KEY (pkey) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1 +CREATE TABLE tbl_b ( +pkey int NOT NULL, +PRIMARY KEY (pkey) +) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1 + +select test 1 +connection master_1; +INSERT INTO tbl_a VALUES(1); + +deinit +connection master_1; +DROP DATABASE IF EXISTS auto_test_local; +connection master_1; +set global spider_same_server_link= @old_global_spider_same_server_link; +set session spider_same_server_link= @old_session_spider_same_server_link; +for master_1 +for child2 +for child3 + +end of test diff --git a/storage/spider/mysql-test/spider/bugfix/t/same_server_link.cnf b/storage/spider/mysql-test/spider/bugfix/t/same_server_link.cnf new file mode 100644 index 00000000000..b0853e32654 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/same_server_link.cnf @@ -0,0 +1,2 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf diff --git a/storage/spider/mysql-test/spider/bugfix/t/same_server_link.test b/storage/spider/mysql-test/spider/bugfix/t/same_server_link.test new file mode 100644 index 00000000000..1468f00cd1c --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/same_server_link.test @@ -0,0 +1,55 @@ +--source ../include/same_server_link_init.inc +--echo +--echo this test is for MDEV-6268 +--echo +--echo drop and create databases + +--connection master_1 +--disable_warnings +CREATE DATABASE auto_test_local; +USE auto_test_local; +--enable_warnings + +--echo +--echo create table + +--connection master_1 +--disable_query_log +echo CREATE TABLE tbl_a ( + pkey int NOT NULL, + PRIMARY KEY (pkey) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1; +eval CREATE TABLE tbl_a ( + pkey int NOT NULL, + PRIMARY KEY (pkey) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1; +echo CREATE TABLE tbl_b ( + pkey int NOT NULL, + PRIMARY KEY (pkey) +) MASTER_1_ENGINE2 MASTER_1_CHARSET MASTER_1_COMMENT_2_1; +eval CREATE TABLE tbl_b ( + pkey int NOT NULL, + PRIMARY KEY (pkey) +) $MASTER_1_ENGINE2 $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1; +--enable_query_log + +--echo +--echo select test 1 + +--connection master_1 +--disable_result_log +--error 12720 +INSERT INTO tbl_a VALUES(1); +--enable_result_log + +--echo +--echo deinit +--disable_warnings + +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; + +--enable_warnings +--source ../include/same_server_link_deinit.inc +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_deinit.inc new file mode 100644 index 00000000000..52b0625ed9a --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_deinit.inc @@ -0,0 +1,16 @@ +--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP +--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP +--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP +--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP +--let $CHILD2_2_DROP_TABLES= $CHILD2_2_DROP_TABLES_BACKUP +--let $CHILD2_2_CREATE_TABLES= $CHILD2_2_CREATE_TABLES_BACKUP +--let $CHILD2_2_SELECT_TABLES= $CHILD2_2_SELECT_TABLES_BACKUP +--connection master_1 +set session spider_bgs_mode= @old_spider_bgs_mode; +--disable_warnings +--disable_query_log +--disable_result_log +--source ../t/test_deinit.inc +--enable_result_log +--enable_query_log +--enable_warnings diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_deinit.inc new file mode 100644 index 00000000000..799bd983393 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_deinit.inc @@ -0,0 +1 @@ +--source checksum_table_parallel_deinit.inc diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_init.inc new file mode 100644 index 00000000000..f17a532d53b --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_extended_init.inc @@ -0,0 +1,2 @@ +--source checksum_table_parallel_init.inc +--let $MASTER_1_CHECKSUM_TABLE= CHECKSUM TABLE tbl_a EXTENDED diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_init.inc new file mode 100644 index 00000000000..7aab82515a0 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_init.inc @@ -0,0 +1,53 @@ +--disable_warnings +--disable_query_log +--disable_result_log +--source ../t/test_init.inc +if (!$HAVE_PARTITION) +{ + --source checksum_table_parallel_deinit.inc + --enable_result_log + --enable_query_log + --enable_warnings + skip Test requires partitioning; +} +--enable_result_log +--enable_query_log +--enable_warnings +--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1 +let $MASTER_1_COMMENT_2_1= + COMMENT='table "tbl_a"' + PARTITION BY KEY(pkey) ( + PARTITION pt1 COMMENT='srv "s_2_1"', + PARTITION pt2 COMMENT='srv "s_2_2"' + ); +--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES +let $CHILD2_1_DROP_TABLES= + DROP TABLE IF EXISTS tbl_a; +--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES +let $CHILD2_1_CREATE_TABLES= + CREATE TABLE tbl_a ( + pkey int NOT NULL, + PRIMARY KEY (pkey) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES +let $CHILD2_1_SELECT_TABLES= + SELECT pkey FROM tbl_a ORDER BY pkey; +let $CHILD2_1_SELECT_ARGUMENT1= + SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +--let $CHILD2_2_DROP_TABLES_BACKUP= $CHILD2_2_DROP_TABLES +let $CHILD2_2_DROP_TABLES= + DROP TABLE IF EXISTS tbl_a; +--let $CHILD2_2_CREATE_TABLES_BACKUP= $CHILD2_2_CREATE_TABLES +let $CHILD2_2_CREATE_TABLES= + CREATE TABLE tbl_a ( + pkey int NOT NULL, + PRIMARY KEY (pkey) + ) $CHILD2_2_ENGINE $CHILD2_2_CHARSET; +--let $CHILD2_2_SELECT_TABLES_BACKUP= $CHILD2_2_SELECT_TABLES +let $CHILD2_2_SELECT_TABLES= + SELECT pkey FROM tbl_a ORDER BY pkey; +let $CHILD2_2_SELECT_ARGUMENT1= + SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +--connection master_1 +set @old_spider_bgs_mode= @@spider_bgs_mode; +set session spider_bgs_mode= 1; diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_deinit.inc new file mode 100644 index 00000000000..799bd983393 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_deinit.inc @@ -0,0 +1 @@ +--source checksum_table_parallel_deinit.inc diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_init.inc new file mode 100644 index 00000000000..230b6432a01 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_no_opt_init.inc @@ -0,0 +1,2 @@ +--source checksum_table_parallel_init.inc +--let $MASTER_1_CHECKSUM_TABLE= CHECKSUM TABLE tbl_a diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_deinit.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_deinit.inc new file mode 100644 index 00000000000..799bd983393 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_deinit.inc @@ -0,0 +1 @@ +--source checksum_table_parallel_deinit.inc diff --git a/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_init.inc b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_init.inc new file mode 100644 index 00000000000..66f6ecbe0ef --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/include/checksum_table_parallel_quick_init.inc @@ -0,0 +1,2 @@ +--source checksum_table_parallel_init.inc +--let $MASTER_1_CHECKSUM_TABLE= CHECKSUM TABLE tbl_a QUICK diff --git a/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_extended.result b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_extended.result new file mode 100644 index 00000000000..34587052181 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_extended.result @@ -0,0 +1,130 @@ +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 +connection master_1; +set @old_spider_bgs_mode= @@spider_bgs_mode; +set session spider_bgs_mode= 1; + +this test is for MDEV-16967 + +drop and create databases +connection master_1; +CREATE DATABASE auto_test_local; +USE auto_test_local; +connection child2_1; +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote; +USE auto_test_remote; +connection child2_1_2; +USE auto_test_remote; +connection child2_2; +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote2; +USE auto_test_remote2; +connection child2_2_2; +USE auto_test_remote2; + +create table and insert +connection child2_1; +CHILD2_1_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection child2_2; +CHILD2_2_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection master_1; +CREATE TABLE tbl_a ( +pkey int NOT NULL, +PRIMARY KEY (pkey) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1 +INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19); +INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29); + +select test 1 +connection child2_1; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection child2_2; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection master_1; +CHECKSUM TABLE tbl_a EXTENDED; +connection child2_1_2; +SELECT SLEEP(1); +SLEEP(1) +0 +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +checksum table `auto_test_remote`.`tbl_a` extended +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_2_2; +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +checksum table `auto_test_remote2`.`tbl_a` extended +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_1; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +1 +3 +5 +7 +9 +11 +13 +15 +17 +19 +21 +23 +25 +27 +29 +connection child2_2; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +0 +2 +4 +6 +8 +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +connection master_1; +Table Checksum +auto_test_local.tbl_a 1061386331 + +deinit +connection master_1; +DROP DATABASE IF EXISTS auto_test_local; +connection child2_1; +DROP DATABASE IF EXISTS auto_test_remote; +SET GLOBAL log_output = @old_log_output; +connection child2_2; +DROP DATABASE IF EXISTS auto_test_remote2; +SET GLOBAL log_output = @old_log_output; +connection master_1; +set session spider_bgs_mode= @old_spider_bgs_mode; +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 + +end of test diff --git a/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_no_opt.result b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_no_opt.result new file mode 100644 index 00000000000..4e44bd4cc73 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_no_opt.result @@ -0,0 +1,128 @@ +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 +connection master_1; +set @old_spider_bgs_mode= @@spider_bgs_mode; +set session spider_bgs_mode= 1; + +this test is for MDEV-16967 + +drop and create databases +connection master_1; +CREATE DATABASE auto_test_local; +USE auto_test_local; +connection child2_1; +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote; +USE auto_test_remote; +connection child2_1_2; +USE auto_test_remote; +connection child2_2; +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote2; +USE auto_test_remote2; +connection child2_2_2; +USE auto_test_remote2; + +create table and insert +connection child2_1; +CHILD2_1_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection child2_2; +CHILD2_2_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection master_1; +CREATE TABLE tbl_a ( +pkey int NOT NULL, +PRIMARY KEY (pkey) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1 +INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19); +INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29); + +select test 1 +connection child2_1; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection child2_2; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection master_1; +CHECKSUM TABLE tbl_a; +connection child2_1_2; +SELECT SLEEP(1); +SLEEP(1) +0 +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_2_2; +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_1; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +1 +3 +5 +7 +9 +11 +13 +15 +17 +19 +21 +23 +25 +27 +29 +connection child2_2; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +0 +2 +4 +6 +8 +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +connection master_1; +Table Checksum +auto_test_local.tbl_a NULL + +deinit +connection master_1; +DROP DATABASE IF EXISTS auto_test_local; +connection child2_1; +DROP DATABASE IF EXISTS auto_test_remote; +SET GLOBAL log_output = @old_log_output; +connection child2_2; +DROP DATABASE IF EXISTS auto_test_remote2; +SET GLOBAL log_output = @old_log_output; +connection master_1; +set session spider_bgs_mode= @old_spider_bgs_mode; +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 + +end of test diff --git a/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_quick.result b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_quick.result new file mode 100644 index 00000000000..b2c55b34130 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/r/checksum_table_parallel_quick.result @@ -0,0 +1,128 @@ +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 +connection master_1; +set @old_spider_bgs_mode= @@spider_bgs_mode; +set session spider_bgs_mode= 1; + +this test is for MDEV-16967 + +drop and create databases +connection master_1; +CREATE DATABASE auto_test_local; +USE auto_test_local; +connection child2_1; +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote; +USE auto_test_remote; +connection child2_1_2; +USE auto_test_remote; +connection child2_2; +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote2; +USE auto_test_remote2; +connection child2_2_2; +USE auto_test_remote2; + +create table and insert +connection child2_1; +CHILD2_1_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection child2_2; +CHILD2_2_CREATE_TABLES +TRUNCATE TABLE mysql.general_log; +connection master_1; +CREATE TABLE tbl_a ( +pkey int NOT NULL, +PRIMARY KEY (pkey) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1 +INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19); +INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29); + +select test 1 +connection child2_1; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection child2_2; +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; +connection master_1; +CHECKSUM TABLE tbl_a QUICK; +connection child2_1_2; +SELECT SLEEP(1); +SLEEP(1) +0 +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_2_2; +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; +argument +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' +connection child2_1; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +1 +3 +5 +7 +9 +11 +13 +15 +17 +19 +21 +23 +25 +27 +29 +connection child2_2; +UNLOCK TABLES; +SELECT pkey FROM tbl_a ORDER BY pkey; +pkey +0 +2 +4 +6 +8 +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +connection master_1; +Table Checksum +auto_test_local.tbl_a NULL + +deinit +connection master_1; +DROP DATABASE IF EXISTS auto_test_local; +connection child2_1; +DROP DATABASE IF EXISTS auto_test_remote; +SET GLOBAL log_output = @old_log_output; +connection child2_2; +DROP DATABASE IF EXISTS auto_test_remote2; +SET GLOBAL log_output = @old_log_output; +connection master_1; +set session spider_bgs_mode= @old_spider_bgs_mode; +for master_1 +for child2 +child2_1 +child2_2 +child2_3 +for child3 + +end of test diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc new file mode 100644 index 00000000000..13e5053d64c --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel.inc @@ -0,0 +1,107 @@ +--echo +--echo this test is for MDEV-16967 +--echo +--echo drop and create databases + +--connection master_1 +--disable_warnings +CREATE DATABASE auto_test_local; +USE auto_test_local; + +--connection child2_1 +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote; +USE auto_test_remote; +--connection child2_1_2 +USE auto_test_remote; + +--connection child2_2 +SET @old_log_output = @@global.log_output; +SET GLOBAL log_output = 'TABLE,FILE'; +CREATE DATABASE auto_test_remote2; +USE auto_test_remote2; +--connection child2_2_2 +USE auto_test_remote2; +--enable_warnings + +--echo +--echo create table and insert + +--connection child2_1 +--disable_query_log +echo CHILD2_1_CREATE_TABLES; +eval $CHILD2_1_CREATE_TABLES; +--enable_query_log +TRUNCATE TABLE mysql.general_log; + +--connection child2_2 +--disable_query_log +echo CHILD2_2_CREATE_TABLES; +eval $CHILD2_2_CREATE_TABLES; +--enable_query_log +TRUNCATE TABLE mysql.general_log; + +--connection master_1 +--disable_query_log +echo CREATE TABLE tbl_a ( + pkey int NOT NULL, + PRIMARY KEY (pkey) +) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1; +eval CREATE TABLE tbl_a ( + pkey int NOT NULL, + PRIMARY KEY (pkey) +) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1; +--enable_query_log +INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19); +INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29); + +--echo +--echo select test 1 + +--connection child2_1 +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; + +--connection child2_2 +TRUNCATE TABLE mysql.general_log; +LOCK TABLE tbl_a WRITE; + +--connection master_1 +send_eval $MASTER_1_CHECKSUM_TABLE; + +--connection child2_1_2 +SELECT SLEEP(1); +eval $CHILD2_1_SELECT_ARGUMENT1; + +--connection child2_2_2 +eval $CHILD2_2_SELECT_ARGUMENT1; + +--connection child2_1 +UNLOCK TABLES; +eval $CHILD2_1_SELECT_TABLES; + +--connection child2_2 +UNLOCK TABLES; +eval $CHILD2_2_SELECT_TABLES; + +--connection master_1 +reap; + +--echo +--echo deinit +--disable_warnings + +--connection master_1 +DROP DATABASE IF EXISTS auto_test_local; + +--connection child2_1 +DROP DATABASE IF EXISTS auto_test_remote; +SET GLOBAL log_output = @old_log_output; + +--connection child2_2 +DROP DATABASE IF EXISTS auto_test_remote2; +SET GLOBAL log_output = @old_log_output; + +--enable_warnings diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.cnf b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.cnf new file mode 100644 index 00000000000..e0ffb99c38e --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.cnf @@ -0,0 +1,4 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf +!include ../my_2_1.cnf +!include ../my_2_2.cnf diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.test b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.test new file mode 100644 index 00000000000..871e1e868ad --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_extended.test @@ -0,0 +1,5 @@ +--source ../include/checksum_table_parallel_extended_init.inc +--source checksum_table_parallel.inc +--source ../include/checksum_table_parallel_extended_deinit.inc +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.cnf b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.cnf new file mode 100644 index 00000000000..e0ffb99c38e --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.cnf @@ -0,0 +1,4 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf +!include ../my_2_1.cnf +!include ../my_2_2.cnf diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.test b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.test new file mode 100644 index 00000000000..0352d598df6 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_no_opt.test @@ -0,0 +1,5 @@ +--source ../include/checksum_table_parallel_no_opt_init.inc +--source checksum_table_parallel.inc +--source ../include/checksum_table_parallel_no_opt_deinit.inc +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.cnf b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.cnf new file mode 100644 index 00000000000..e0ffb99c38e --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.cnf @@ -0,0 +1,4 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf +!include ../my_2_1.cnf +!include ../my_2_2.cnf diff --git a/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.test b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.test new file mode 100644 index 00000000000..f08f782e7c0 --- /dev/null +++ b/storage/spider/mysql-test/spider/feature/t/checksum_table_parallel_quick.test @@ -0,0 +1,5 @@ +--source ../include/checksum_table_parallel_quick_init.inc +--source checksum_table_parallel.inc +--source ../include/checksum_table_parallel_quick_deinit.inc +--echo +--echo end of test diff --git a/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc b/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc index 9ec61a1cb77..0bb12d8f874 100644 --- a/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc +++ b/storage/spider/mysql-test/spider/include/checksum_table_with_quick_mode_3_init.inc @@ -21,7 +21,7 @@ let $CHILD2_1_CREATE_TABLES= let $CHILD2_1_SELECT_TABLES= SELECT pkey FROM tbl_a ORDER BY pkey; let $CHILD2_1_SELECT_ARGUMENT1= - SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'; + SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; --let $OUTPUT_CHILD_GROUP2_BACKUP= $OUTPUT_CHILD_GROUP2 --let $OUTPUT_CHILD_GROUP2= 1 --let $USE_GENERAL_LOG_BACKUP= $USE_GENERAL_LOG diff --git a/storage/spider/mysql-test/spider/include/init_spider.inc b/storage/spider/mysql-test/spider/include/init_spider.inc index 1da1ec970b5..c1167b3c37e 100644 --- a/storage/spider/mysql-test/spider/include/init_spider.inc +++ b/storage/spider/mysql-test/spider/include/init_spider.inc @@ -409,6 +409,7 @@ if (`SELECT IF($PLUGIN_VERSION = 3, 1, 0)`) check_time datetime not null default '0000-00-00 00:00:00', create_time datetime not null default '0000-00-00 00:00:00', update_time datetime not null default '0000-00-00 00:00:00', + checksum bigint unsigned default null, primary key (db_name, table_name) ) ENGINE=$ENGINE_NAME DEFAULT CHARSET=utf8 COLLATE=utf8_bin; DROP TABLE IF EXISTS mysql.spider_table_crd; diff --git a/storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result b/storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result index ee8e1f056f3..2fe86099bc2 100644 --- a/storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result +++ b/storage/spider/mysql-test/spider/r/checksum_table_with_quick_mode_3.result @@ -45,10 +45,10 @@ CHECKSUM TABLE tbl_a EXTENDED; Table Checksum auto_test_local.tbl_a 1061386331 connection child2_1; -SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'; +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %'; argument -select `pkey` from `auto_test_remote`.`tbl_a` -SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %' +checksum table `auto_test_remote`.`tbl_a` extended +SELECT argument FROM mysql.general_log WHERE argument LIKE '%checksum %' SELECT pkey FROM tbl_a ORDER BY pkey; pkey 0 diff --git a/storage/spider/scripts/install_spider.sql b/storage/spider/scripts/install_spider.sql index f52c78e496d..30c92e6c710 100644 --- a/storage/spider/scripts/install_spider.sql +++ b/storage/spider/scripts/install_spider.sql @@ -150,6 +150,7 @@ create table if not exists mysql.spider_table_sts( check_time datetime not null default '0000-00-00 00:00:00', create_time datetime not null default '0000-00-00 00:00:00', update_time datetime not null default '0000-00-00 00:00:00', + checksum bigint unsigned default null, primary key (db_name, table_name) ) engine=MyISAM default charset=utf8 collate=utf8_bin; create table if not exists mysql.spider_table_crd( @@ -408,6 +409,11 @@ begin modify table_name char(199) not null default ''; end if; + -- Fix for version 3.3.15 + call mysql.spider_fix_one_table('spider_table_sts', 'checksum', + 'alter table mysql.spider_table_sts + add column checksum bigint unsigned default null after update_time'); + -- Fix for MariaDB 10.4: Crash-Safe system tables if @server_name = 'MariaDB' and ( diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc index 9e1dbaf7f28..b1f49f4f250 100644 --- a/storage/spider/spd_conn.cc +++ b/storage/spider/spd_conn.cc @@ -2819,23 +2819,20 @@ void *spider_bg_conn_action( { switch (conn->bg_simple_action) { - case SPIDER_BG_SIMPLE_CONNECT: + case SPIDER_SIMPLE_CONNECT: conn->db_conn->bg_connect(); break; - case SPIDER_BG_SIMPLE_DISCONNECT: + case SPIDER_SIMPLE_DISCONNECT: conn->db_conn->bg_disconnect(); break; - case SPIDER_BG_SIMPLE_RECORDS: - DBUG_PRINT("info",("spider bg simple records")); + default: spider = (ha_spider*) conn->bg_target; *conn->bg_error_num = - spider->dbton_handler[conn->dbton_id]-> - show_records(conn->link_idx); - break; - default: + spider_db_simple_action(conn->bg_simple_action, + spider->dbton_handler[conn->dbton_id], conn->link_idx); break; } - conn->bg_simple_action = SPIDER_BG_SIMPLE_NO_ACTION; + conn->bg_simple_action = SPIDER_SIMPLE_NO_ACTION; if (conn->bg_caller_wait) { pthread_mutex_lock(&conn->bg_conn_sync_mutex); diff --git a/storage/spider/spd_conn.h b/storage/spider/spd_conn.h index ba4db883378..7be18f8c207 100644 --- a/storage/spider/spd_conn.h +++ b/storage/spider/spd_conn.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2008-2018 Kentoku Shiba +/* Copyright (C) 2008-2019 Kentoku Shiba + Copyright (C) 2019 MariaDB corp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,10 +18,13 @@ #define SPIDER_LOCK_MODE_SHARED 1 #define SPIDER_LOCK_MODE_EXCLUSIVE 2 -#define SPIDER_BG_SIMPLE_NO_ACTION 0 -#define SPIDER_BG_SIMPLE_CONNECT 1 -#define SPIDER_BG_SIMPLE_DISCONNECT 2 -#define SPIDER_BG_SIMPLE_RECORDS 3 +#define SPIDER_SIMPLE_NO_ACTION 0 +#define SPIDER_SIMPLE_CONNECT 1 +#define SPIDER_SIMPLE_DISCONNECT 2 +#define SPIDER_SIMPLE_RECORDS 3 +#ifdef HA_HAS_CHECKSUM_EXTENDED +#define SPIDER_SIMPLE_CHECKSUM_TABLE 4 +#endif uchar *spider_conn_get_key( SPIDER_CONN *conn, diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc index 32b63de5fea..703fbe3cf71 100644 --- a/storage/spider/spd_db_conn.cc +++ b/storage/spider/spd_db_conn.cc @@ -5684,7 +5684,38 @@ int spider_db_show_table_status( DBUG_RETURN(error_num); } -int spider_db_show_records( +int spider_db_simple_action( + uint simple_action, + spider_db_handler *db_handler, + int link_idx +) { + int error_num; + DBUG_ENTER("spider_db_simple_action"); + switch (simple_action) + { + case SPIDER_SIMPLE_RECORDS: + DBUG_PRINT("info",("spider simple records")); + error_num = db_handler->show_records( + link_idx + ); + break; +#ifdef HA_HAS_CHECKSUM_EXTENDED + case SPIDER_SIMPLE_CHECKSUM_TABLE: + DBUG_PRINT("info",("spider simple checksum_table")); + error_num = db_handler->checksum_table( + link_idx + ); + break; +#endif + default: + DBUG_ASSERT(0); + break; + } + DBUG_RETURN(error_num); +} + +int spider_db_simple_action( + uint simple_action, ha_spider *spider, int link_idx, bool pre_call @@ -5692,7 +5723,7 @@ int spider_db_show_records( int error_num; THD *thd = spider->trx->thd; SPIDER_CONN *conn; - DBUG_ENTER("spider_db_show_records"); + DBUG_ENTER("spider_db_simple_action"); if (pre_call) { if (spider_param_bgs_mode(thd, spider->share->bgs_mode)) @@ -5705,18 +5736,20 @@ int spider_db_show_records( conn = spider->conns[link_idx]; if (!(error_num = spider_create_conn_thread(conn))) { - spider_bg_conn_simple_action(conn, SPIDER_BG_SIMPLE_RECORDS, FALSE, + spider_bg_conn_simple_action(conn, simple_action, FALSE, spider, link_idx, (int *) &spider->result_list.bgs_error); } } else { conn = spider->conns[link_idx]; - error_num = spider->dbton_handler[conn->dbton_id]->show_records( + error_num = spider_db_simple_action( + simple_action, + spider->dbton_handler[conn->dbton_id], link_idx ); } } else { conn = spider->conns[link_idx]; - if (spider->use_pre_records) + if (spider->use_pre_action) { if (spider_param_bgs_mode(thd, spider->share->bgs_mode)) { @@ -5730,7 +5763,9 @@ int spider_db_show_records( error_num = 0; } } else { - error_num = spider->dbton_handler[conn->dbton_id]->show_records( + error_num = spider_db_simple_action( + simple_action, + spider->dbton_handler[conn->dbton_id], link_idx ); } @@ -5758,7 +5793,7 @@ void spider_db_set_cardinarity( { key_part = &key_info->key_part[roop_count2]; field = key_part->field; - rec_per_key = (ha_rows) share->records / + rec_per_key = (ha_rows) share->stat.records / share->cardinality[field->field_index]; if (rec_per_key > ~(ulong) 0) key_info->rec_per_key[roop_count2] = ~(ulong) 0; diff --git a/storage/spider/spd_db_conn.h b/storage/spider/spd_db_conn.h index b5b0f57a3af..e6ce926f4ee 100644 --- a/storage/spider/spd_db_conn.h +++ b/storage/spider/spd_db_conn.h @@ -697,7 +697,14 @@ int spider_db_show_table_status( uint flag ); -int spider_db_show_records( +int spider_db_simple_action( + uint simple_action, + spider_db_handler *db_handler, + int link_idx +); + +int spider_db_simple_action( + uint simple_action, ha_spider *spider, int link_idx, bool pre_call diff --git a/storage/spider/spd_db_handlersocket.cc b/storage/spider/spd_db_handlersocket.cc index 8dea7685c52..ac81525092b 100644 --- a/storage/spider/spd_db_handlersocket.cc +++ b/storage/spider/spd_db_handlersocket.cc @@ -740,15 +740,7 @@ SPIDER_DB_ROW *spider_db_handlersocket_result::fetch_row_from_tmp_table( int spider_db_handlersocket_result::fetch_table_status( int mode, - ha_rows &records, - ulong &mean_rec_length, - ulonglong &data_file_length, - ulonglong &max_data_file_length, - ulonglong &index_file_length, - ulonglong &auto_increment_value, - time_t &create_time, - time_t &update_time, - time_t &check_time + ha_statistics &stat ) { DBUG_ENTER("spider_db_handlersocket_result::fetch_table_status"); DBUG_PRINT("info",("spider this=%p", this)); @@ -5813,15 +5805,7 @@ int spider_handlersocket_handler::show_table_status( DBUG_ENTER("spider_handlersocket_show_table_status"); res.fetch_table_status( sts_mode, - share->records, - share->mean_rec_length, - share->data_file_length, - share->max_data_file_length, - share->index_file_length, - auto_increment_value, - share->create_time, - share->update_time, - share->check_time + share->stat ); if (auto_increment_value > share->lgtm_tblhnd_share->auto_increment_value) { diff --git a/storage/spider/spd_db_handlersocket.h b/storage/spider/spd_db_handlersocket.h index fce57c8153a..f94be204a70 100644 --- a/storage/spider/spd_db_handlersocket.h +++ b/storage/spider/spd_db_handlersocket.h @@ -215,15 +215,7 @@ public: ); int fetch_table_status( int mode, - ha_rows &records, - ulong &mean_rec_length, - ulonglong &data_file_length, - ulonglong &max_data_file_length, - ulonglong &index_file_length, - ulonglong &auto_increment_value, - time_t &create_time, - time_t &update_time, - time_t &check_time + ha_statistics &stat ); int fetch_table_records( int mode, diff --git a/storage/spider/spd_db_include.cc b/storage/spider/spd_db_include.cc index 2910aa97690..7f600142187 100644 --- a/storage/spider/spd_db_include.cc +++ b/storage/spider/spd_db_include.cc @@ -41,6 +41,16 @@ spider_db_result::spider_db_result( DBUG_VOID_RETURN; } +#ifdef HA_HAS_CHECKSUM_EXTENDED +int spider_db_result::fetch_table_checksum( + ha_spider *spider +) { + DBUG_ENTER("spider_db_result::fetch_table_checksum"); + DBUG_PRINT("info",("spider this=%p", this)); + DBUG_RETURN(0); +} +#endif + spider_db_conn::spider_db_conn( SPIDER_CONN *in_conn ) : conn(in_conn), dbton_id(in_conn->dbton_id) @@ -49,3 +59,20 @@ spider_db_conn::spider_db_conn( DBUG_PRINT("info",("spider this=%p", this)); DBUG_VOID_RETURN; } + +#ifdef HA_HAS_CHECKSUM_EXTENDED +bool spider_db_share::checksum_support() +{ + DBUG_ENTER("spider_db_share::checksum_support"); + DBUG_PRINT("info",("spider this=%p", this)); + DBUG_RETURN(FALSE); +} + +int spider_db_handler::checksum_table( + int link_idx +) { + DBUG_ENTER("spider_db_handler::checksum_table"); + DBUG_PRINT("info",("spider this=%p", this)); + DBUG_RETURN(0); +} +#endif diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h index 325bf80a1e3..94129d1c04f 100644 --- a/storage/spider/spd_db_include.h +++ b/storage/spider/spd_db_include.h @@ -988,20 +988,17 @@ public: ) = 0; virtual int fetch_table_status( int mode, - ha_rows &records, - ulong &mean_rec_length, - ulonglong &data_file_length, - ulonglong &max_data_file_length, - ulonglong &index_file_length, - ulonglong &auto_increment_value, - time_t &create_time, - time_t &update_time, - time_t &check_time + ha_statistics &stat ) = 0; virtual int fetch_table_records( int mode, ha_rows &records ) = 0; +#ifdef HA_HAS_CHECKSUM_EXTENDED + virtual int fetch_table_checksum( + ha_spider *spider + ); +#endif virtual int fetch_table_cardinality( int mode, TABLE *table, @@ -1276,6 +1273,9 @@ public: spider_string *str ) = 0; #endif +#ifdef HA_HAS_CHECKSUM_EXTENDED + virtual bool checksum_support(); +#endif }; class spider_db_handler @@ -1644,6 +1644,11 @@ public: virtual int show_records( int link_idx ) = 0; +#ifdef HA_HAS_CHECKSUM_EXTENDED + virtual int checksum_table( + int link_idx + ); +#endif virtual int show_last_insert_id( int link_idx, ulonglong &last_insert_id diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index 6a0aef4bafb..18e2d2acbd5 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -56,6 +56,8 @@ extern HASH spider_open_connections; extern HASH spider_ipport_conns; extern SPIDER_DBTON spider_dbton[SPIDER_DBTON_SIZE]; extern const char spider_dig_upper[]; +extern const char **spd_mysqld_unix_port; +extern uint *spd_mysqld_port; spider_db_mysql_util spider_db_mysql_utility; spider_db_mariadb_util spider_db_mariadb_utility; @@ -126,7 +128,7 @@ static const char *name_quote_str = SPIDER_SQL_NAME_QUOTE_STR; #define SPIDER_SQL_SHOW_TABLE_STATUS_STR "show table status from " #define SPIDER_SQL_SHOW_TABLE_STATUS_LEN sizeof(SPIDER_SQL_SHOW_TABLE_STATUS_STR) - 1 -#define SPIDER_SQL_SELECT_TABLES_STATUS_STR "select `table_rows`,`avg_row_length`,`data_length`,`max_data_length`,`index_length`,`auto_increment`,`create_time`,`update_time`,`check_time` from `information_schema`.`tables` where `table_schema` = " +#define SPIDER_SQL_SELECT_TABLES_STATUS_STR "select `table_rows`,`avg_row_length`,`data_length`,`max_data_length`,`index_length`,`auto_increment`,`create_time`,`update_time`,`check_time`,`checksum` from `information_schema`.`tables` where `table_schema` = " #define SPIDER_SQL_SELECT_TABLES_STATUS_LEN sizeof(SPIDER_SQL_SELECT_TABLES_STATUS_STR) - 1 #define SPIDER_SQL_SHOW_WARNINGS_STR "show warnings" #define SPIDER_SQL_SHOW_WARNINGS_LEN sizeof(SPIDER_SQL_SHOW_WARNINGS_STR) - 1 @@ -154,6 +156,15 @@ static const char *name_quote_str = SPIDER_SQL_NAME_QUOTE_STR; #define SPIDER_SQL_USING_HASH_LEN sizeof(SPIDER_SQL_USING_HASH_STR) - 1 #endif +#define SPIDER_SQL_SHOW_RECORDS_RECORDS_POS 0 +#define SPIDER_SQL_EXPLAIN_SELECT_RECORDS_POS 8 + +#ifdef HA_HAS_CHECKSUM_EXTENDED +#define SPIDER_SQL_CHECKSUM_CHECKSUM_POS 1 +#define SPIDER_SQL_CHECKSUM_TABLE_STR "checksum table " +#define SPIDER_SQL_CHECKSUM_TABLE_LEN (sizeof(SPIDER_SQL_CHECKSUM_TABLE_STR) - 1) +#endif + #define SPIDER_SQL_LIKE_STR " like " #define SPIDER_SQL_LIKE_LEN (sizeof(SPIDER_SQL_LIKE_STR) - 1) #define SPIDER_SQL_LIMIT1_STR " limit 1" @@ -787,15 +798,7 @@ SPIDER_DB_ROW *spider_db_mbase_result::fetch_row_from_tmp_table( int spider_db_mbase_result::fetch_table_status( int mode, - ha_rows &records, - ulong &mean_rec_length, - ulonglong &data_file_length, - ulonglong &max_data_file_length, - ulonglong &index_file_length, - ulonglong &auto_increment_value, - time_t &create_time, - time_t &update_time, - time_t &check_time + ha_statistics &stat ) { int error_num; MYSQL_ROW mysql_row; @@ -834,47 +837,47 @@ int spider_db_mbase_result::fetch_table_status( } if (mysql_row[4]) - records = + stat.records = (ha_rows) my_strtoll10(mysql_row[4], (char**) NULL, &error_num); else - records = (ha_rows) 0; + stat.records = (ha_rows) 0; DBUG_PRINT("info", - ("spider records=%lld", records)); + ("spider records=%lld", stat.records)); if (mysql_row[5]) - mean_rec_length = + stat.mean_rec_length = (ulong) my_strtoll10(mysql_row[5], (char**) NULL, &error_num); else - mean_rec_length = 0; + stat.mean_rec_length = 0; DBUG_PRINT("info", - ("spider mean_rec_length=%lu", mean_rec_length)); + ("spider mean_rec_length=%lu", stat.mean_rec_length)); if (mysql_row[6]) - data_file_length = + stat.data_file_length = (ulonglong) my_strtoll10(mysql_row[6], (char**) NULL, &error_num); else - data_file_length = 0; + stat.data_file_length = 0; DBUG_PRINT("info", - ("spider data_file_length=%lld", data_file_length)); + ("spider data_file_length=%lld", stat.data_file_length)); if (mysql_row[7]) - max_data_file_length = + stat.max_data_file_length = (ulonglong) my_strtoll10(mysql_row[7], (char**) NULL, &error_num); else - max_data_file_length = 0; + stat.max_data_file_length = 0; DBUG_PRINT("info", - ("spider max_data_file_length=%lld", max_data_file_length)); + ("spider max_data_file_length=%lld", stat.max_data_file_length)); if (mysql_row[8]) - index_file_length = + stat.index_file_length = (ulonglong) my_strtoll10(mysql_row[8], (char**) NULL, &error_num); else - index_file_length = 0; + stat.index_file_length = 0; DBUG_PRINT("info", - ("spider index_file_length=%lld", index_file_length)); + ("spider index_file_length=%lld", stat.index_file_length)); if (mysql_row[10]) - auto_increment_value = + stat.auto_increment_value = (ulonglong) my_strtoll10(mysql_row[10], (char**) NULL, &error_num); else - auto_increment_value = 1; + stat.auto_increment_value = 1; DBUG_PRINT("info", - ("spider auto_increment_value=%lld", auto_increment_value)); + ("spider auto_increment_value=%lld", stat.auto_increment_value)); if (mysql_row[11]) { #ifdef SPIDER_HAS_TIME_STATUS @@ -883,19 +886,19 @@ int spider_db_mbase_result::fetch_table_status( SPIDER_str_to_datetime(mysql_row[11], strlen(mysql_row[11]), &mysql_time, 0, &time_status); #ifdef MARIADB_BASE_VERSION - create_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.create_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_uint); #else - create_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.create_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_my_bool); #endif } else - create_time = (time_t) 0; + stat.create_time = (time_t) 0; #ifndef DBUG_OFF { struct tm *ts, tmp_ts; char buf[80]; - ts = localtime_r(&create_time, &tmp_ts); + ts = localtime_r(&stat.create_time, &tmp_ts); strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts); DBUG_PRINT("info",("spider create_time=%s", buf)); } @@ -908,19 +911,19 @@ int spider_db_mbase_result::fetch_table_status( SPIDER_str_to_datetime(mysql_row[12], strlen(mysql_row[12]), &mysql_time, 0, &time_status); #ifdef MARIADB_BASE_VERSION - update_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.update_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_uint); #else - update_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.update_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_my_bool); #endif } else - update_time = (time_t) 0; + stat.update_time = (time_t) 0; #ifndef DBUG_OFF { struct tm *ts, tmp_ts; char buf[80]; - ts = localtime_r(&update_time, &tmp_ts); + ts = localtime_r(&stat.update_time, &tmp_ts); strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts); DBUG_PRINT("info",("spider update_time=%s", buf)); } @@ -933,66 +936,77 @@ int spider_db_mbase_result::fetch_table_status( SPIDER_str_to_datetime(mysql_row[13], strlen(mysql_row[13]), &mysql_time, 0, &time_status); #ifdef MARIADB_BASE_VERSION - check_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.check_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_uint); #else - check_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.check_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_my_bool); #endif } else - check_time = (time_t) 0; + stat.check_time = (time_t) 0; #ifndef DBUG_OFF { struct tm *ts, tmp_ts; char buf[80]; - ts = localtime_r(&check_time, &tmp_ts); + ts = localtime_r(&stat.check_time, &tmp_ts); strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts); DBUG_PRINT("info",("spider check_time=%s", buf)); } #endif + if (mysql_row[15]) + { + stat.checksum_null = FALSE; + stat.checksum = + (ha_checksum) my_strtoll10(mysql_row[15], (char**) NULL, &error_num); + DBUG_PRINT("info", ("spider checksum=%lu", (ulong) stat.checksum)); + } else { + stat.checksum_null = TRUE; + stat.checksum = (ha_checksum) 0; + DBUG_PRINT("info", ("spider checksum is null")); + } } else { if (mysql_row[0]) - records = + stat.records = (ha_rows) my_strtoll10(mysql_row[0], (char**) NULL, &error_num); else - records = (ha_rows) 0; + stat.records = (ha_rows) 0; DBUG_PRINT("info", - ("spider records=%lld", records)); + ("spider records=%lld", stat.records)); if (mysql_row[1]) - mean_rec_length = + stat.mean_rec_length = (ulong) my_strtoll10(mysql_row[1], (char**) NULL, &error_num); else - mean_rec_length = 0; + stat.mean_rec_length = 0; DBUG_PRINT("info", - ("spider mean_rec_length=%lu", mean_rec_length)); + ("spider mean_rec_length=%lu", stat.mean_rec_length)); if (mysql_row[2]) - data_file_length = + stat.data_file_length = (ulonglong) my_strtoll10(mysql_row[2], (char**) NULL, &error_num); else - data_file_length = 0; + stat.data_file_length = 0; DBUG_PRINT("info", - ("spider data_file_length=%lld", data_file_length)); + ("spider data_file_length=%lld", stat.data_file_length)); if (mysql_row[3]) - max_data_file_length = + stat.max_data_file_length = (ulonglong) my_strtoll10(mysql_row[3], (char**) NULL, &error_num); else - max_data_file_length = 0; + stat.max_data_file_length = 0; DBUG_PRINT("info", - ("spider max_data_file_length=%lld", max_data_file_length)); + ("spider max_data_file_length=%lld", stat.max_data_file_length)); if (mysql_row[4]) - index_file_length = + stat.index_file_length = (ulonglong) my_strtoll10(mysql_row[4], (char**) NULL, &error_num); else - index_file_length = 0; + stat.index_file_length = 0; DBUG_PRINT("info", - ("spider index_file_length=%lld", index_file_length)); + ("spider index_file_length=%lld", stat.index_file_length)); if (mysql_row[5]) - auto_increment_value = + stat.auto_increment_value = (ulonglong) my_strtoll10(mysql_row[5], (char**) NULL, &error_num); else - auto_increment_value = 1; + stat.auto_increment_value = 1; DBUG_PRINT("info", - ("spider auto_increment_value=%lld", auto_increment_value)); + ("spider auto_increment_value=%lld", stat.auto_increment_value)); if (mysql_row[6]) { #ifdef SPIDER_HAS_TIME_STATUS @@ -1001,19 +1015,19 @@ int spider_db_mbase_result::fetch_table_status( SPIDER_str_to_datetime(mysql_row[6], strlen(mysql_row[6]), &mysql_time, 0, &time_status); #ifdef MARIADB_BASE_VERSION - create_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.create_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_uint); #else - create_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.create_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_my_bool); #endif } else - create_time = (time_t) 0; + stat.create_time = (time_t) 0; #ifndef DBUG_OFF { struct tm *ts, tmp_ts; char buf[80]; - ts = localtime_r(&create_time, &tmp_ts); + ts = localtime_r(&stat.create_time, &tmp_ts); strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts); DBUG_PRINT("info",("spider create_time=%s", buf)); } @@ -1026,19 +1040,19 @@ int spider_db_mbase_result::fetch_table_status( SPIDER_str_to_datetime(mysql_row[7], strlen(mysql_row[7]), &mysql_time, 0, &time_status); #ifdef MARIADB_BASE_VERSION - update_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.update_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_uint); #else - update_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.update_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_my_bool); #endif } else - update_time = (time_t) 0; + stat.update_time = (time_t) 0; #ifndef DBUG_OFF { struct tm *ts, tmp_ts; char buf[80]; - ts = localtime_r(&update_time, &tmp_ts); + ts = localtime_r(&stat.update_time, &tmp_ts); strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts); DBUG_PRINT("info",("spider update_time=%s", buf)); } @@ -1051,34 +1065,46 @@ int spider_db_mbase_result::fetch_table_status( SPIDER_str_to_datetime(mysql_row[8], strlen(mysql_row[8]), &mysql_time, 0, &time_status); #ifdef MARIADB_BASE_VERSION - check_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.check_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_uint); #else - check_time = (time_t) my_system_gmt_sec(&mysql_time, + stat.check_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_my_bool); #endif } else - check_time = (time_t) 0; + stat.check_time = (time_t) 0; #ifndef DBUG_OFF { struct tm *ts, tmp_ts; char buf[80]; - ts = localtime_r(&check_time, &tmp_ts); + ts = localtime_r(&stat.check_time, &tmp_ts); strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", ts); DBUG_PRINT("info",("spider check_time=%s", buf)); } #endif + if (mysql_row[9]) + { + stat.checksum_null = FALSE; + stat.checksum = + (ha_checksum) my_strtoll10(mysql_row[9], (char**) NULL, &error_num); + DBUG_PRINT("info", ("spider checksum=%lu", (ulong) stat.checksum)); + } else { + stat.checksum_null = TRUE; + stat.checksum = (ha_checksum) 0; + DBUG_PRINT("info", ("spider checksum is null")); + } } DBUG_RETURN(0); } -int spider_db_mbase_result::fetch_table_records( - int mode, - ha_rows &records +int spider_db_mbase_result::fetch_simple_action( + uint simple_action, + uint position, + void *param ) { int error_num; MYSQL_ROW mysql_row; - DBUG_ENTER("spider_db_mbase_result::fetch_table_records"); + DBUG_ENTER("spider_db_mbase_result::fetch_simple_action"); DBUG_PRINT("info",("spider this=%p", this)); if (!(mysql_row = mysql_fetch_row(db_result))) { @@ -1091,32 +1117,78 @@ int spider_db_mbase_result::fetch_table_records( } DBUG_RETURN(ER_QUERY_ON_FOREIGN_DATA_SOURCE); } - if (mode == 1) + if (num_fields() <= position) { - if (mysql_row[0]) - { - records = - (ha_rows) my_strtoll10(mysql_row[0], (char**) NULL, &error_num); - } else - records = (ha_rows) 0; - DBUG_PRINT("info", - ("spider records=%lld", records)); - } else { - if (num_fields() != 10) + DBUG_RETURN(ER_QUERY_ON_FOREIGN_DATA_SOURCE); + } + switch (simple_action) + { + case SPIDER_SIMPLE_RECORDS: { - DBUG_RETURN(ER_QUERY_ON_FOREIGN_DATA_SOURCE); + ha_rows *records = (ha_rows *) param; + if (mysql_row[position]) + { + *records = + (ha_rows) my_strtoll10(mysql_row[position], (char**) NULL, + &error_num); + } else { + *records = (ha_rows) 0; + } + DBUG_PRINT("info", ("spider records=%lld", *records)); + break; } - - if (mysql_row[8]) +#ifdef HA_HAS_CHECKSUM_EXTENDED + case SPIDER_SIMPLE_CHECKSUM_TABLE: { - records = - (ha_rows) my_strtoll10(mysql_row[8], (char**) NULL, &error_num); - } else - records = 0; + ha_spider *spider = (ha_spider *) param; + if (mysql_row[position]) + { + spider->checksum_val = + (ha_checksum) my_strtoll10(mysql_row[position], (char**) NULL, + &error_num); + DBUG_PRINT("info", ("spider checksum=%llu", (ulonglong)spider->checksum_val)); + spider->checksum_null = FALSE; + } else { + spider->checksum_null = TRUE; + DBUG_PRINT("info", ("spider checksum is null")); + } + break; + } +#endif + default: + DBUG_ASSERT(0); + break; } DBUG_RETURN(0); } +int spider_db_mbase_result::fetch_table_records( + int mode, + ha_rows &records +) { + DBUG_ENTER("spider_db_mbase_result::fetch_table_records"); + DBUG_PRINT("info",("spider this=%p", this)); + if (mode == 1) + { + DBUG_RETURN(fetch_simple_action(SPIDER_SIMPLE_RECORDS, + SPIDER_SQL_SHOW_RECORDS_RECORDS_POS, &records)); + } else { + DBUG_RETURN(fetch_simple_action(SPIDER_SIMPLE_RECORDS, + SPIDER_SQL_EXPLAIN_SELECT_RECORDS_POS, &records)); + } +} + +#ifdef HA_HAS_CHECKSUM_EXTENDED +int spider_db_mbase_result::fetch_table_checksum( + ha_spider *spider +) { + DBUG_ENTER("spider_db_mbase_result::fetch_table_checksum"); + DBUG_PRINT("info",("spider this=%p", this)); + DBUG_RETURN(fetch_simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE, + SPIDER_SQL_CHECKSUM_CHECKSUM_POS, spider)); +} +#endif + int spider_db_mbase_result::fetch_table_cardinality( int mode, TABLE *table, @@ -1900,6 +1972,30 @@ int spider_db_mbase::connect( conn->tgt_default_group); } + if (!spider_param_same_server_link(thd)) + { + if (!strcmp(tgt_host, my_localhost)) + { + if (!strcmp(tgt_socket, *spd_mysqld_unix_port)) + { + my_printf_error(ER_SPIDER_SAME_SERVER_LINK_NUM, + ER_SPIDER_SAME_SERVER_LINK_STR1, MYF(0), + tgt_host, tgt_socket); + DBUG_RETURN(ER_SPIDER_SAME_SERVER_LINK_NUM); + } + } else if (!strcmp(tgt_host, "127.0.0.1") || + !strcmp(tgt_host, glob_hostname)) + { + if (tgt_port == *spd_mysqld_port) + { + my_printf_error(ER_SPIDER_SAME_SERVER_LINK_NUM, + ER_SPIDER_SAME_SERVER_LINK_STR2, MYF(0), + tgt_host, tgt_port); + DBUG_RETURN(ER_SPIDER_SAME_SERVER_LINK_NUM); + } + } + } + if (connect_mutex) pthread_mutex_lock(&spider_open_conn_mutex); /* tgt_db not use */ @@ -6770,6 +6866,15 @@ int spider_mbase_share::discover_table_structure( } #endif +#ifdef HA_HAS_CHECKSUM_EXTENDED +bool spider_mbase_share::checksum_support() +{ + DBUG_ENTER("spider_mbase_share::checksum_support"); + DBUG_PRINT("info",("spider this=%p", this)); + DBUG_RETURN(TRUE); +} +#endif + spider_mbase_handler::spider_mbase_handler( ha_spider *spider, spider_mbase_share *db_share, @@ -12260,16 +12365,9 @@ int spider_mbase_handler::show_table_status( pthread_mutex_unlock(&conn->mta_conn_mutex); error_num = res->fetch_table_status( sts_mode, - share->records, - share->mean_rec_length, - share->data_file_length, - share->max_data_file_length, - share->index_file_length, - auto_increment_value, - share->create_time, - share->update_time, - share->check_time + share->stat ); + auto_increment_value = share->stat.auto_increment_value; res->free_result(); delete res; if (error_num) @@ -12394,16 +12492,9 @@ int spider_mbase_handler::show_table_status( pthread_mutex_unlock(&conn->mta_conn_mutex); error_num = res->fetch_table_status( sts_mode, - share->records, - share->mean_rec_length, - share->data_file_length, - share->max_data_file_length, - share->index_file_length, - auto_increment_value, - share->create_time, - share->update_time, - share->check_time + share->stat ); + auto_increment_value = share->stat.auto_increment_value; res->free_result(); delete res; if (error_num) @@ -12432,11 +12523,11 @@ int spider_mbase_handler::show_table_status( } if (share->static_records_for_status != -1) { - share->records = (ha_rows) share->static_records_for_status; + share->stat.records = (ha_rows) share->static_records_for_status; } if (share->static_mean_rec_length != -1) { - share->mean_rec_length = (ulong) share->static_mean_rec_length; + share->stat.mean_rec_length = (ulong) share->static_mean_rec_length; } if (auto_increment_value > share->lgtm_tblhnd_share->auto_increment_value) { @@ -12740,7 +12831,8 @@ int spider_mbase_handler::show_index( DBUG_RETURN(0); } -int spider_mbase_handler::show_records( +int spider_mbase_handler::simple_action( + uint simple_action, int link_idx ) { int error_num; @@ -12748,7 +12840,49 @@ int spider_mbase_handler::show_records( SPIDER_DB_RESULT *res; SPIDER_SHARE *share = spider->share; uint pos = spider->conn_link_idx[link_idx]; - DBUG_ENTER("spider_mbase_handler::show_records"); + spider_string *str; + DBUG_ENTER("spider_mbase_handler::simple_action"); + switch (simple_action) + { + case SPIDER_SIMPLE_RECORDS: + DBUG_PRINT("info",("spider simple records")); + str = &mysql_share->show_records[pos]; + break; +#ifdef HA_HAS_CHECKSUM_EXTENDED + case SPIDER_SIMPLE_CHECKSUM_TABLE: + DBUG_PRINT("info",("spider simple checksum_table")); + str = &spider->result_list.sqls[link_idx]; + str->length(0); + if (str->reserve( + SPIDER_SQL_CHECKSUM_TABLE_LEN + + mysql_share->db_nm_max_length + + SPIDER_SQL_DOT_LEN + + mysql_share->table_nm_max_length + + /* SPIDER_SQL_NAME_QUOTE_LEN */ 4 + + ((spider->action_flags & T_QUICK) ? SPIDER_SQL_SQL_QUICK_LEN : 0) + + ((spider->action_flags & T_EXTEND) ? SPIDER_SQL_SQL_EXTENDED_LEN : 0) + )) + { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); + } + str->q_append(SPIDER_SQL_CHECKSUM_TABLE_STR, + SPIDER_SQL_CHECKSUM_TABLE_LEN); + mysql_share->append_table_name(str, pos); + if (spider->action_flags & T_QUICK) + { + str->q_append(SPIDER_SQL_SQL_QUICK_STR, SPIDER_SQL_SQL_QUICK_LEN); + } + if (spider->action_flags & T_EXTEND) + { + str->q_append(SPIDER_SQL_SQL_EXTENDED_STR, + SPIDER_SQL_SQL_EXTENDED_LEN); + } + break; +#endif + default: + DBUG_ASSERT(0); + break; + } pthread_mutex_lock(&conn->mta_conn_mutex); SPIDER_SET_FILE_POS(&conn->mta_conn_mutex_file_pos); conn->need_mon = &spider->need_mons[link_idx]; @@ -12761,8 +12895,8 @@ int spider_mbase_handler::show_records( ( spider_db_query( conn, - mysql_share->show_records[pos].ptr(), - mysql_share->show_records[pos].length(), + str->ptr(), + str->length(), -1, &spider->need_mons[link_idx]) && (error_num = spider_db_errorno(conn)) @@ -12795,8 +12929,8 @@ int spider_mbase_handler::show_records( share); if (spider_db_query( conn, - mysql_share->show_records[pos].ptr(), - mysql_share->show_records[pos].length(), + str->ptr(), + str->length(), -1, &spider->need_mons[link_idx]) ) { @@ -12838,10 +12972,22 @@ int spider_mbase_handler::show_records( conn->mta_conn_mutex_unlock_later = FALSE; SPIDER_CLEAR_FILE_POS(&conn->mta_conn_mutex_file_pos); pthread_mutex_unlock(&conn->mta_conn_mutex); - error_num = res->fetch_table_records( - 1, - spider->table_rows - ); + switch (simple_action) + { + case SPIDER_SIMPLE_RECORDS: + DBUG_PRINT("info",("spider simple records")); + error_num = res->fetch_table_records(1, spider->table_rows); + break; +#ifdef HA_HAS_CHECKSUM_EXTENDED + case SPIDER_SIMPLE_CHECKSUM_TABLE: + DBUG_PRINT("info",("spider simple checksum_table")); + error_num = res->fetch_table_checksum(spider); + break; +#endif + default: + DBUG_ASSERT(0); + break; + } res->free_result(); delete res; if (error_num) @@ -12849,10 +12995,34 @@ int spider_mbase_handler::show_records( DBUG_PRINT("info", ("spider error_num=%d 7", error_num)); DBUG_RETURN(error_num); } + DBUG_RETURN(0); +} + +int spider_mbase_handler::show_records( + int link_idx +) { + int error_num; + DBUG_ENTER("spider_mbase_handler::show_records"); + error_num = simple_action(SPIDER_SIMPLE_RECORDS, link_idx); + if (error_num) + { + DBUG_PRINT("info", ("spider error_num=%d", error_num)); + DBUG_RETURN(error_num); + } spider->trx->direct_aggregate_count++; DBUG_RETURN(0); } +#ifdef HA_HAS_CHECKSUM_EXTENDED +int spider_mbase_handler::checksum_table( + int link_idx +) { + DBUG_ENTER("spider_mbase_handler::checksum_table"); + DBUG_RETURN(simple_action(SPIDER_SIMPLE_CHECKSUM_TABLE, link_idx)); + DBUG_RETURN(0); +} +#endif + int spider_mbase_handler::show_last_insert_id( int link_idx, ulonglong &last_insert_id diff --git a/storage/spider/spd_db_mysql.h b/storage/spider/spd_db_mysql.h index ff7ebc32bd9..49780e0fa7f 100644 --- a/storage/spider/spd_db_mysql.h +++ b/storage/spider/spd_db_mysql.h @@ -271,20 +271,22 @@ public: ); int fetch_table_status( int mode, - ha_rows &records, - ulong &mean_rec_length, - ulonglong &data_file_length, - ulonglong &max_data_file_length, - ulonglong &index_file_length, - ulonglong &auto_increment_value, - time_t &create_time, - time_t &update_time, - time_t &check_time + ha_statistics &stat + ); + int fetch_simple_action( + uint simple_action, + uint position, + void *param ); int fetch_table_records( int mode, ha_rows &records ); +#ifdef HA_HAS_CHECKSUM_EXTENDED + int fetch_table_checksum( + ha_spider *spider + ); +#endif int fetch_table_cardinality( int mode, TABLE *table, @@ -669,6 +671,9 @@ public: spider_string *str ); #endif +#ifdef HA_HAS_CHECKSUM_EXTENDED + bool checksum_support(); +#endif protected: int create_table_names_str(); void free_table_names_str(); @@ -1448,9 +1453,18 @@ public: int link_idx, int crd_mode ); + int simple_action( + uint simple_action, + int link_idx + ); int show_records( int link_idx ); +#ifdef HA_HAS_CHECKSUM_EXTENDED + int checksum_table( + int link_idx + ); +#endif int show_last_insert_id( int link_idx, ulonglong &last_insert_id diff --git a/storage/spider/spd_db_oracle.cc b/storage/spider/spd_db_oracle.cc index 1478f04d0f8..773c6b90ed9 100644 --- a/storage/spider/spd_db_oracle.cc +++ b/storage/spider/spd_db_oracle.cc @@ -927,30 +927,22 @@ SPIDER_DB_ROW *spider_db_oracle_result::fetch_row_from_tmp_table( int spider_db_oracle_result::fetch_table_status( int mode, - ha_rows &records, - ulong &mean_rec_length, - ulonglong &data_file_length, - ulonglong &max_data_file_length, - ulonglong &index_file_length, - ulonglong &auto_increment_value, - time_t &create_time, - time_t &update_time, - time_t &check_time + ha_statistics &stat ) { DBUG_ENTER("spider_db_oracle_result::fetch_table_status"); DBUG_PRINT("info",("spider this=%p", this)); /* TODO: develop later */ - records = 2; - mean_rec_length = 65535; - data_file_length = 65535; - max_data_file_length = 65535; - index_file_length = 65535; + stat.records = 2; + stat.mean_rec_length = 65535; + stat.data_file_length = 65535; + stat.max_data_file_length = 65535; + stat.index_file_length = 65535; /* auto_increment_value = 0; */ - create_time = (time_t) 0; - update_time = (time_t) 0; - check_time = (time_t) 0; + stat.create_time = (time_t) 0; + stat.update_time = (time_t) 0; + stat.check_time = (time_t) 0; DBUG_RETURN(0); } @@ -1349,7 +1341,7 @@ int spider_db_oracle::connect( this->connect_retry_interval = connect_retry_interval; if ((error_num = spider_create_conn_thread(conn))) DBUG_RETURN(error_num); - spider_bg_conn_simple_action(conn, SPIDER_BG_SIMPLE_CONNECT, TRUE, NULL, + spider_bg_conn_simple_action(conn, SPIDER_SIMPLE_CONNECT, TRUE, NULL, 0, NULL); if (stored_error_num) @@ -1440,7 +1432,7 @@ void spider_db_oracle::disconnect() DBUG_PRINT("info",("spider this=%p", this)); if (!conn->bg_init) DBUG_VOID_RETURN; - spider_bg_conn_simple_action(conn, SPIDER_BG_SIMPLE_DISCONNECT, TRUE, NULL, + spider_bg_conn_simple_action(conn, SPIDER_SIMPLE_DISCONNECT, TRUE, NULL, 0, NULL); DBUG_VOID_RETURN; } @@ -11143,15 +11135,15 @@ int spider_oracle_handler::show_table_status( if (error_num) DBUG_RETURN(error_num); */ - if (!share->records) - share->records = 10000; - share->mean_rec_length = 65535; - share->data_file_length = 65535; - share->max_data_file_length = 65535; - share->index_file_length = 65535; - share->create_time = (time_t) 0; - share->update_time = (time_t) 0; - share->check_time = (time_t) 0; + if (!share->stat.records) + share->stat.records = 10000; + share->stat.mean_rec_length = 65535; + share->stat.data_file_length = 65535; + share->stat.max_data_file_length = 65535; + share->stat.index_file_length = 65535; + share->stat.create_time = (time_t) 0; + share->stat.update_time = (time_t) 0; + share->stat.check_time = (time_t) 0; } else { pthread_mutex_lock(&conn->mta_conn_mutex); SPIDER_SET_FILE_POS(&conn->mta_conn_mutex_file_pos); @@ -11235,16 +11227,9 @@ int spider_oracle_handler::show_table_status( pthread_mutex_unlock(&conn->mta_conn_mutex); error_num = res->fetch_table_status( sts_mode, - share->records, - share->mean_rec_length, - share->data_file_length, - share->max_data_file_length, - share->index_file_length, - auto_increment_value, - share->create_time, - share->update_time, - share->check_time + share->stat ); + auto_increment_value = share->stat.auto_increment_value; res->free_result(); delete res; if (error_num) diff --git a/storage/spider/spd_db_oracle.h b/storage/spider/spd_db_oracle.h index e7e5507668d..e3f787c514e 100644 --- a/storage/spider/spd_db_oracle.h +++ b/storage/spider/spd_db_oracle.h @@ -239,15 +239,7 @@ public: ); int fetch_table_status( int mode, - ha_rows &records, - ulong &mean_rec_length, - ulonglong &data_file_length, - ulonglong &max_data_file_length, - ulonglong &index_file_length, - ulonglong &auto_increment_value, - time_t &create_time, - time_t &update_time, - time_t &check_time + ha_statistics &stat ); int fetch_table_records( int mode, diff --git a/storage/spider/spd_environ.h b/storage/spider/spd_environ.h index 42cbf812bbb..728cc7e1781 100644 --- a/storage/spider/spd_environ.h +++ b/storage/spider/spd_environ.h @@ -51,5 +51,6 @@ #define SPIDER_USE_CONST_ITEM_FOR_STRING_INT_REAL_DECIMAL_DATE_ITEM #define SPIDER_SQL_CACHE_IS_IN_LEX #define SPIDER_LIKE_FUNC_HAS_GET_NEGATED +#define HA_HAS_CHECKSUM_EXTENDED #endif #endif /* SPD_ENVIRON_INCLUDED */ diff --git a/storage/spider/spd_err.h b/storage/spider/spd_err.h index a80d903bd6e..9889fcfa7fb 100644 --- a/storage/spider/spd_err.h +++ b/storage/spider/spd_err.h @@ -124,6 +124,9 @@ #define ER_SPIDER_CON_COUNT_ERROR_STR "Too many connections between spider and remote" #define ER_SPIDER_TABLE_OPEN_TIMEOUT_NUM 12714 #define ER_SPIDER_TABLE_OPEN_TIMEOUT_STR "Table %s.%s open timeout" +#define ER_SPIDER_SAME_SERVER_LINK_NUM 12720 +#define ER_SPIDER_SAME_SERVER_LINK_STR1 "Host:%s and Socket:%s aim self server. Please change spider_same_server_link parameter if this link is required." +#define ER_SPIDER_SAME_SERVER_LINK_STR2 "Host:%s and Port:%ld aim self server. Please change spider_same_server_link parameter if this link is required." #define ER_SPIDER_COND_SKIP_NUM 12801 #define ER_SPIDER_UNKNOWN_NUM 12500 diff --git a/storage/spider/spd_include.h b/storage/spider/spd_include.h index 2886ea02ba4..df0ed93935d 100644 --- a/storage/spider/spd_include.h +++ b/storage/spider/spd_include.h @@ -13,7 +13,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ -#define SPIDER_DETAIL_VERSION "3.3.14" +#define SPIDER_DETAIL_VERSION "3.3.15" #define SPIDER_HEX_VERSION 0x0303 #if MYSQL_VERSION_ID < 50500 @@ -655,15 +655,7 @@ typedef struct st_spider_patition_share volatile bool crd_init; volatile time_t sts_get_time; volatile time_t crd_get_time; - ulonglong data_file_length; - ulonglong max_data_file_length; - ulonglong index_file_length; - ulonglong auto_increment_value; - ha_rows records; - ulong mean_rec_length; - time_t check_time; - time_t create_time; - time_t update_time; + ha_statistics stat; longlong *cardinality; /* @@ -890,17 +882,7 @@ typedef struct st_spider_share volatile bool auto_increment_init; volatile ulonglong auto_increment_lclval; */ - ulonglong data_file_length; - ulonglong max_data_file_length; - ulonglong index_file_length; -/* - ulonglong auto_increment_value; -*/ - ha_rows records; - ulong mean_rec_length; - time_t check_time; - time_t create_time; - time_t update_time; + ha_statistics stat; longlong static_records_for_status; longlong static_mean_rec_length; diff --git a/storage/spider/spd_malloc.cc b/storage/spider/spd_malloc.cc index b2bb094a38e..40b37ff4377 100644 --- a/storage/spider/spd_malloc.cc +++ b/storage/spider/spd_malloc.cc @@ -1,4 +1,5 @@ -/* Copyright (C) 2012-2017 Kentoku Shiba +/* Copyright (C) 2012-2019 Kentoku Shiba + Copyright (C) 2019 MariaDB corp This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1126,6 +1127,7 @@ void spider_string::q_append( ) { DBUG_ENTER("spider_string::q_append"); DBUG_PRINT("info",("spider this=%p", this)); + DBUG_ASSERT(str.alloced_length() >= str.length() + data_len); str.q_append(data, data_len); DBUG_VOID_RETURN; } diff --git a/storage/spider/spd_sys_table.cc b/storage/spider/spd_sys_table.cc index a148b5cd55b..07cd6bf1695 100644 --- a/storage/spider/spd_sys_table.cc +++ b/storage/spider/spd_sys_table.cc @@ -1240,28 +1240,29 @@ void spider_store_binlog_pos_gtid( void spider_store_table_sts_info( TABLE *table, - ulonglong *data_file_length, - ulonglong *max_data_file_length, - ulonglong *index_file_length, - ha_rows *records, - ulong *mean_rec_length, - time_t *check_time, - time_t *create_time, - time_t *update_time + ha_statistics *stat ) { MYSQL_TIME mysql_time; DBUG_ENTER("spider_store_table_sts_info"); - table->field[2]->store((longlong) *data_file_length, TRUE); - table->field[3]->store((longlong) *max_data_file_length, TRUE); - table->field[4]->store((longlong) *index_file_length, TRUE); - table->field[5]->store((longlong) *records, TRUE); - table->field[6]->store((longlong) *mean_rec_length, TRUE); - spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) *check_time); + table->field[2]->store((longlong) stat->data_file_length, TRUE); + table->field[3]->store((longlong) stat->max_data_file_length, TRUE); + table->field[4]->store((longlong) stat->index_file_length, TRUE); + table->field[5]->store((longlong) stat->records, TRUE); + table->field[6]->store((longlong) stat->mean_rec_length, TRUE); + spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) stat->check_time); table->field[7]->store_time(&mysql_time); - spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) *create_time); + spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) stat->create_time); table->field[8]->store_time(&mysql_time); - spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) *update_time); + spd_tz_system->gmt_sec_to_TIME(&mysql_time, (my_time_t) stat->update_time); table->field[9]->store_time(&mysql_time); + if (stat->checksum_null) + { + table->field[10]->set_null(); + table->field[10]->reset(); + } else { + table->field[10]->set_notnull(); + table->field[10]->store((longlong) stat->checksum, TRUE); + } DBUG_VOID_RETURN; } @@ -1386,14 +1387,7 @@ int spider_insert_or_update_table_sts( TABLE *table, const char *name, uint name_length, - ulonglong *data_file_length, - ulonglong *max_data_file_length, - ulonglong *index_file_length, - ha_rows *records, - ulong *mean_rec_length, - time_t *check_time, - time_t *create_time, - time_t *update_time + ha_statistics *stat ) { int error_num; char table_key[MAX_KEY_LENGTH]; @@ -1402,14 +1396,7 @@ int spider_insert_or_update_table_sts( spider_store_tables_name(table, name, name_length); spider_store_table_sts_info( table, - data_file_length, - max_data_file_length, - index_file_length, - records, - mean_rec_length, - check_time, - create_time, - update_time + stat ); if ((error_num = spider_check_sys_table_for_update_all_columns(table, table_key))) @@ -2442,14 +2429,7 @@ int spider_get_sys_tables_static_link_id( void spider_get_sys_table_sts_info( TABLE *table, - ulonglong *data_file_length, - ulonglong *max_data_file_length, - ulonglong *index_file_length, - ha_rows *records, - ulong *mean_rec_length, - time_t *check_time, - time_t *create_time, - time_t *update_time + ha_statistics *stat ) { MYSQL_TIME mysql_time; #ifdef MARIADB_BASE_VERSION @@ -2459,35 +2439,43 @@ void spider_get_sys_table_sts_info( #endif long not_used_long; DBUG_ENTER("spider_get_sys_table_sts_info"); - *data_file_length = (ulonglong) table->field[2]->val_int(); - *max_data_file_length = (ulonglong) table->field[3]->val_int(); - *index_file_length = (ulonglong) table->field[4]->val_int(); - *records = (ha_rows) table->field[5]->val_int(); - *mean_rec_length = (ulong) table->field[6]->val_int(); + stat->data_file_length = (ulonglong) table->field[2]->val_int(); + stat->max_data_file_length = (ulonglong) table->field[3]->val_int(); + stat->index_file_length = (ulonglong) table->field[4]->val_int(); + stat->records = (ha_rows) table->field[5]->val_int(); + stat->mean_rec_length = (ulong) table->field[6]->val_int(); table->field[7]->get_date(&mysql_time, SPIDER_date_mode_t(0)); #ifdef MARIADB_BASE_VERSION - *check_time = (time_t) my_system_gmt_sec(&mysql_time, + stat->check_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_uint); #else - *check_time = (time_t) my_system_gmt_sec(&mysql_time, + stat->check_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_my_bool); #endif table->field[8]->get_date(&mysql_time, SPIDER_date_mode_t(0)); #ifdef MARIADB_BASE_VERSION - *create_time = (time_t) my_system_gmt_sec(&mysql_time, + stat->create_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_uint); #else - *create_time = (time_t) my_system_gmt_sec(&mysql_time, + stat->create_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_my_bool); #endif table->field[9]->get_date(&mysql_time, SPIDER_date_mode_t(0)); #ifdef MARIADB_BASE_VERSION - *update_time = (time_t) my_system_gmt_sec(&mysql_time, + stat->update_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_uint); #else - *update_time = (time_t) my_system_gmt_sec(&mysql_time, + stat->update_time = (time_t) my_system_gmt_sec(&mysql_time, ¬_used_long, ¬_used_my_bool); #endif + if (table->field[10]->is_null()) + { + stat->checksum_null = TRUE; + stat->checksum = 0; + } else { + stat->checksum_null = FALSE; + stat->checksum = (ha_checksum) table->field[10]->val_int(); + } DBUG_VOID_RETURN; } @@ -2908,14 +2896,7 @@ int spider_sys_insert_or_update_table_sts( THD *thd, const char *name, uint name_length, - ulonglong *data_file_length, - ulonglong *max_data_file_length, - ulonglong *index_file_length, - ha_rows *records, - ulong *mean_rec_length, - time_t *check_time, - time_t *create_time, - time_t *update_time, + ha_statistics *stat, bool need_lock ) { int error_num; @@ -2938,14 +2919,7 @@ int spider_sys_insert_or_update_table_sts( table_sts, name, name_length, - data_file_length, - max_data_file_length, - index_file_length, - records, - mean_rec_length, - check_time, - create_time, - update_time + stat ))) goto error; spider_close_sys_table(thd, table_sts, &open_tables_backup, need_lock); @@ -3080,14 +3054,7 @@ int spider_sys_get_table_sts( THD *thd, const char *name, uint name_length, - ulonglong *data_file_length, - ulonglong *max_data_file_length, - ulonglong *index_file_length, - ha_rows *records, - ulong *mean_rec_length, - time_t *check_time, - time_t *create_time, - time_t *update_time, + ha_statistics *stat, bool need_lock ) { int error_num; @@ -3120,14 +3087,7 @@ int spider_sys_get_table_sts( } else { spider_get_sys_table_sts_info( table_sts, - data_file_length, - max_data_file_length, - index_file_length, - records, - mean_rec_length, - check_time, - create_time, - update_time + stat ); } diff --git a/storage/spider/spd_sys_table.h b/storage/spider/spd_sys_table.h index 9e2d54c3e28..7a28ea20010 100644 --- a/storage/spider/spd_sys_table.h +++ b/storage/spider/spd_sys_table.h @@ -289,14 +289,7 @@ void spider_store_binlog_pos_gtid( void spider_store_table_sts_info( TABLE *table, - ulonglong *data_file_length, - ulonglong *max_data_file_length, - ulonglong *index_file_length, - ha_rows *records, - ulong *mean_rec_length, - time_t *check_time, - time_t *create_time, - time_t *update_time + ha_statistics *stat ); void spider_store_table_crd_info( @@ -330,14 +323,7 @@ int spider_insert_or_update_table_sts( TABLE *table, const char *name, uint name_length, - ulonglong *data_file_length, - ulonglong *max_data_file_length, - ulonglong *index_file_length, - ha_rows *records, - ulong *mean_rec_length, - time_t *check_time, - time_t *create_time, - time_t *update_time + ha_statistics *stat ); int spider_insert_or_update_table_crd( @@ -493,14 +479,7 @@ int spider_get_sys_tables_static_link_id( void spider_get_sys_table_sts_info( TABLE *table, - ulonglong *data_file_length, - ulonglong *max_data_file_length, - ulonglong *index_file_length, - ha_rows *records, - ulong *mean_rec_length, - time_t *check_time, - time_t *create_time, - time_t *update_time + ha_statistics *stat ); void spider_get_sys_table_crd_info( @@ -564,14 +543,7 @@ int spider_sys_insert_or_update_table_sts( THD *thd, const char *name, uint name_length, - ulonglong *data_file_length, - ulonglong *max_data_file_length, - ulonglong *index_file_length, - ha_rows *records, - ulong *mean_rec_length, - time_t *check_time, - time_t *create_time, - time_t *update_time, + ha_statistics *stat, bool need_lock ); @@ -602,14 +574,7 @@ int spider_sys_get_table_sts( THD *thd, const char *name, uint name_length, - ulonglong *data_file_length, - ulonglong *max_data_file_length, - ulonglong *index_file_length, - ha_rows *records, - ulong *mean_rec_length, - time_t *check_time, - time_t *create_time, - time_t *update_time, + ha_statistics *stat, bool need_lock ); diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index fb29dc8dc04..71e5faa5ba5 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -122,6 +122,8 @@ HASH *spd_db_att_xid_cache; struct charset_info_st *spd_charset_utf8_bin; const char **spd_defaults_extra_file; const char **spd_defaults_file; +const char **spd_mysqld_unix_port; +uint *spd_mysqld_port; bool volatile *spd_abort_loop; Time_zone *spd_tz_system; extern long spider_conn_mutex_id; @@ -4378,6 +4380,9 @@ SPIDER_SHARE *spider_create_share( uchar *tmp_cardinality_upd, *tmp_table_mon_mutex_bitmap; char buf[MAX_FIELD_WIDTH], *buf_pos; char link_idx_str[SPIDER_SQL_INT_LEN]; +#ifdef HA_HAS_CHECKSUM_EXTENDED + bool checksum_support = TRUE; +#endif DBUG_ENTER("spider_create_share"); length = (uint) strlen(table_name); bitmap_size = spider_bitmap_size(table_share->fields); @@ -4536,8 +4541,24 @@ SPIDER_SHARE *spider_create_share( { goto error_init_dbton; } +#ifdef HA_HAS_CHECKSUM_EXTENDED + if ( + spider_dbton[roop_count].db_access_type == SPIDER_DB_ACCESS_TYPE_SQL && + !share->dbton_share[roop_count]->checksum_support() + ) { + checksum_support = FALSE; + } +#endif } } +#ifdef HA_HAS_CHECKSUM_EXTENDED + if (checksum_support) + { + share->additional_table_flags |= + HA_HAS_OLD_CHECKSUM | + HA_HAS_NEW_CHECKSUM; + } +#endif DBUG_RETURN(share); /* @@ -5780,14 +5801,7 @@ int spider_free_share( thd, share->lgtm_tblhnd_share->table_name, share->lgtm_tblhnd_share->table_name_length, - &share->data_file_length, - &share->max_data_file_length, - &share->index_file_length, - &share->records, - &share->mean_rec_length, - &share->check_time, - &share->create_time, - &share->update_time, + &share->stat, FALSE ); } @@ -6163,21 +6177,7 @@ void spider_copy_sts_to_pt_share( SPIDER_SHARE *share ) { DBUG_ENTER("spider_copy_sts_to_pt_share"); - memcpy(&partition_share->data_file_length, &share->data_file_length, - sizeof(ulonglong) * 4 + sizeof(ha_rows) + - sizeof(ulong) + sizeof(time_t) * 3); -/* - partition_share->data_file_length = share->data_file_length; - partition_share->max_data_file_length = share->max_data_file_length; - partition_share->index_file_length = share->index_file_length; - partition_share->auto_increment_value = - share->lgtm_tblhnd_share->auto_increment_value; - partition_share->records = share->records; - partition_share->mean_rec_length = share->mean_rec_length; - partition_share->check_time = share->check_time; - partition_share->create_time = share->create_time; - partition_share->update_time = share->update_time; -*/ + partition_share->stat = share->stat; DBUG_VOID_RETURN; } @@ -6186,23 +6186,7 @@ void spider_copy_sts_to_share( SPIDER_PARTITION_SHARE *partition_share ) { DBUG_ENTER("spider_copy_sts_to_share"); - memcpy(&share->data_file_length, &partition_share->data_file_length, - sizeof(ulonglong) * 4 + sizeof(ha_rows) + - sizeof(ulong) + sizeof(time_t) * 3); -/* - share->data_file_length = partition_share->data_file_length; - share->max_data_file_length = partition_share->max_data_file_length; - share->index_file_length = partition_share->index_file_length; - share->lgtm_tblhnd_share->auto_increment_value = - partition_share->auto_increment_value; - DBUG_PRINT("info",("spider auto_increment_value=%llu", - share->lgtm_tblhnd_share->auto_increment_value)); - share->records = partition_share->records; - share->mean_rec_length = partition_share->mean_rec_length; - share->check_time = partition_share->check_time; - share->create_time = partition_share->create_time; - share->update_time = partition_share->update_time; -*/ + share->stat = partition_share->stat; DBUG_VOID_RETURN; } @@ -6951,6 +6935,10 @@ int spider_db_init( GetProcAddress(current_module, "my_defaults_extra_file"); spd_defaults_file = (const char **) GetProcAddress(current_module, "my_defaults_file"); + spd_mysqld_unix_port = (const char **) + GetProcAddress(current_module, "?mysqld_unix_port@@3PADA"); + spd_mysqld_port = (uint *) + GetProcAddress(current_module, "?mysqld_port@@3IA"); spd_abort_loop = (bool volatile *) GetProcAddress(current_module, "?abort_loop@@3_NC"); spd_tz_system = *(Time_zone **) @@ -6977,6 +6965,8 @@ int spider_db_init( spd_charset_utf8_bin = &my_charset_utf8_bin; spd_defaults_extra_file = &my_defaults_extra_file; spd_defaults_file = &my_defaults_file; + spd_mysqld_unix_port = (const char **) &mysqld_unix_port; + spd_mysqld_port = &mysqld_port; spd_abort_loop = &abort_loop; spd_tz_system = my_tz_SYSTEM; #endif @@ -7692,10 +7682,8 @@ int spider_get_sts( if ( sts_sync == 0 ) { -#endif /* get */ get_type = 1; -#ifdef WITH_PARTITION_STORAGE_ENGINE } else if ( !share->partition_share->sts_init ) { @@ -7734,14 +7722,7 @@ int spider_get_sts( current_thd, share->lgtm_tblhnd_share->table_name, share->lgtm_tblhnd_share->table_name_length, - &share->data_file_length, - &share->max_data_file_length, - &share->index_file_length, - &share->records, - &share->mean_rec_length, - &share->check_time, - &share->create_time, - &share->update_time, + &share->stat, FALSE ); if ( @@ -7849,10 +7830,8 @@ int spider_get_crd( if ( crd_sync == 0 ) { -#endif /* get */ get_type = 1; -#ifdef WITH_PARTITION_STORAGE_ENGINE } else if ( !share->partition_share->crd_init ) { @@ -9366,7 +9345,9 @@ int spider_discover_table_structure( str.q_append(share->table_name.str, share->table_name.length); str.q_append(SPIDER_SQL_LCL_NAME_QUOTE_STR, SPIDER_SQL_LCL_NAME_QUOTE_LEN); str.q_append(SPIDER_SQL_OPEN_PAREN_STR, SPIDER_SQL_OPEN_PAREN_LEN); +#ifdef WITH_PARTITION_STORAGE_ENGINE str_len = str.length(); +#endif #ifdef SPIDER_HAS_HASH_VALUE_TYPE my_hash_value_type hash_value = my_calc_hash(&spider_open_tables, (uchar*) table_name, table_name_length); diff --git a/support-files/rpm/server-preun.sh b/support-files/rpm/server-preun.sh index 1d733a7d899..f4eb81a7f75 100644 --- a/support-files/rpm/server-preun.sh +++ b/support-files/rpm/server-preun.sh @@ -7,9 +7,9 @@ if [ $1 = 0 ] ; then fi if [ -x %{_sysconfdir}/init.d/mysql ] ; then %{_sysconfdir}/init.d/mysql stop > /dev/null - fi - if [ -x /sbin/chkconfig ] ; then - /sbin/chkconfig --del mysql > /dev/null 2>&1 + if [ -x /sbin/chkconfig ] ; then + /sbin/chkconfig --del mysql > /dev/null 2>&1 + fi fi fi diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 40fbffa57bc..16bfa72985f 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -2348,6 +2348,12 @@ static void test_ps_query_cache() "(2, 'hh', 'hh'), (1, 'ii', 'ii'), (2, 'ii', 'ii')"); myquery(rc); + rc= mysql_query(mysql, + "set @save_query_cache_type=" + "@@global.query_cache_type," + "@save_query_cache_size=" + "@@global.query_cache_size"); + myquery(rc); rc= mysql_query(lmysql, "set global query_cache_type=ON"); myquery(rc); rc= mysql_query(lmysql, "set local query_cache_type=ON"); @@ -2504,9 +2510,9 @@ static void test_ps_query_cache() if (lmysql != mysql) mysql_close(lmysql); - rc= mysql_query(mysql, "set global query_cache_size=default"); + rc= mysql_query(mysql, "set global query_cache_size=@save_query_cache_size"); myquery(rc); - rc= mysql_query(mysql, "set global query_cache_type=default"); + rc= mysql_query(mysql, "set global query_cache_type=@save_query_cache_type"); myquery(rc); } @@ -13522,6 +13528,12 @@ static void test_open_cursor_prepared_statement_query_cache() return; } + rc= mysql_query(mysql, + "set @save_query_cache_type=" + "@@global.query_cache_type," + "@save_query_cache_size=" + "@@global.query_cache_size"); + myquery(rc); rc= mysql_query(mysql, "set global query_cache_type=ON"); myquery(rc); rc= mysql_query(mysql, "set local query_cache_type=ON"); @@ -13548,9 +13560,9 @@ static void test_open_cursor_prepared_statement_query_cache() check_execute(stmt, rc); mysql_stmt_close(stmt); - rc= mysql_query(mysql, "set global query_cache_type=default"); + rc= mysql_query(mysql, "set global query_cache_type=@save_query_cache_type"); myquery(rc); - rc= mysql_query(mysql, "set global query_cache_size=default"); + rc= mysql_query(mysql, "set global query_cache_size=@save_query_cache_size"); myquery(rc); } @@ -18335,6 +18347,12 @@ static void test_bug36326() myquery(rc); rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1)"); myquery(rc); + rc= mysql_query(mysql, + "set @save_query_cache_type=" + "@@global.query_cache_type," + "@save_query_cache_size=" + "@@global.query_cache_size"); + myquery(rc); rc= mysql_query(mysql, "SET GLOBAL query_cache_type = 1"); myquery(rc); rc= mysql_query(mysql, "SET LOCAL query_cache_type = 1"); @@ -18362,8 +18380,8 @@ static void test_bug36326() DIE_UNLESS(rc == 1); rc= mysql_query(mysql, "DROP TABLE t1"); myquery(rc); - rc= mysql_query(mysql, "SET GLOBAL query_cache_size = default"); - rc= mysql_query(mysql, "SET GLOBAL query_cache_type = default"); + rc= mysql_query(mysql, "SET GLOBAL query_cache_size = @save_query_cache_size"); + rc= mysql_query(mysql, "SET GLOBAL query_cache_type = @save_query_cache_type"); myquery(rc); DBUG_VOID_RETURN; diff --git a/unittest/mysys/CMakeLists.txt b/unittest/mysys/CMakeLists.txt index f06d63d05fb..1d97340784d 100644 --- a/unittest/mysys/CMakeLists.txt +++ b/unittest/mysys/CMakeLists.txt @@ -14,10 +14,10 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA MY_ADD_TESTS(bitmap base64 my_atomic my_rdtsc lf my_malloc my_getopt dynstring - aes byte_order + byte_order LINK_LIBRARIES mysys) MY_ADD_TESTS(my_vsnprintf LINK_LIBRARIES strings mysys) - +MY_ADD_TESTS(aes LINK_LIBRARIES mysys mysys_ssl) ADD_DEFINITIONS(${SSL_DEFINES}) MY_ADD_TESTS(ma_dyncol LINK_LIBRARIES mysys) diff --git a/unittest/sql/CMakeLists.txt b/unittest/sql/CMakeLists.txt index f63dc0b2a21..a4ba1019e49 100644 --- a/unittest/sql/CMakeLists.txt +++ b/unittest/sql/CMakeLists.txt @@ -31,6 +31,6 @@ TARGET_LINK_LIBRARIES(explain_filename-t sql mytap) MY_ADD_TEST(explain_filename) ADD_EXECUTABLE(mf_iocache-t mf_iocache-t.cc ../../sql/mf_iocache_encr.cc) -TARGET_LINK_LIBRARIES(mf_iocache-t mysys mytap) +TARGET_LINK_LIBRARIES(mf_iocache-t mysys mytap mysys_ssl) ADD_DEPENDENCIES(mf_iocache-t GenError) MY_ADD_TEST(mf_iocache) |