Use first class callables
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Merge pull request #18203 from kamil-tekiela/first-class-callable
Use first class callables
Translated using Weblate (Ukrainian)
Currently translated at 99.0% (3301 of 3334 strings)
[CI skip]
Translation: phpMyAdmin/5.0 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-0/uk/ Signed-off-by: Максим Крикуненко mxxmus@meta.ua
Translated using Weblate (Ukrainian)
Currently translated at 99.1% (3304 of 3334 strings)
[CI skip]
Translation: phpMyAdmin/5.0 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-0/uk/ Signed-off-by: Максим Крикуненко mxxmus@meta.ua
Translated using Weblate (Polish)
Currently translated at 100.0% (3334 of 3334 strings)
[CI skip]
Translation: phpMyAdmin/5.0 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-0/pl/ Signed-off-by: Kozioł Marcin koziol.martin@gmail.com
Fix syntax error for PHP 5
Fixes #17305 Fixes #17306
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Fix hide_connection_errors being undefined when a controluser is set
Fixes #17307 Closes #17304
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Add CI workflow for PHPUnit tests
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Fix DatabaseInterfaceTest::testGetConnectionParams
tests
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Add coding standard check
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Fix CoreTest failing tests
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Fix iconv failing test
(cherry picked from commit 9b6cb9ce7dc3178267eca1e08b99b8ac2e431f85)
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Skip git-revision and network groups for PHP 5.5 tests
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Fix tests for PHP 7.4
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Merge pull request #17310 from mauriciofauth/ci-workflow-4.9
Add CI workflow for PHPUnit tests
Prepare for version 4.9.9
Signed-off-by: Isaac Bennetch bennetch@gmail.com
Adding composer lock for 4.9.9
Signed-off-by: Isaac Bennetch bennetch@gmail.com
Removing composer.lock
Signed-off-by: Isaac Bennetch bennetch@gmail.com
Fix broken pagination links in the navigation sidebar
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Merge pull request #17323 from mauriciofauth/nav-pagination-4.9
[4.9] Fix broken pagination links in the navigation sidebar
Add ChangeLog entry for #17308
[ci skip]
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Translated using Weblate (Korean)
Currently translated at 81.5% (2698 of 3309 strings)
[CI skip]
Translation: phpMyAdmin/4.9 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/4-9/ko/ Signed-off-by: Yonjae Lee yjyj93@gmail.com
Translated using Weblate (Portuguese)
Currently translated at 97.7% (3349 of 3427 strings)
[ci skip]
Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/pt/ Signed-off-by: ssantos ssantos@web.de
Translated using Weblate (Polish)
Currently translated at 45.9% (1573 of 3427 strings)
[ci skip]
Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/pl/ Signed-off-by: Kuba Niewiarowski jakub@niewiarowski.it
Fix a bug with numerical table name
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Accept table with name 0 in getTablesFull
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Merge pull request #18261 from kamil-tekiela/tableStatus-with-numerical-table
Fix a bug with numerical table name
Optimize export of many tables
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Fix getTablesFull() and related tests
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Translated using Weblate (Dutch)
Currently translated at 100.0% (3427 of 3427 strings)
[ci skip]
Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/nl/ Signed-off-by: Herman Peeren herman@yepr.nl
Fix empty appearance settings
Signed-off-by: Liviu-Mihail Concioiu liviu.concioiu@gmail.com
Translated using Weblate (Dutch)
Currently translated at 100.0% (3427 of 3427 strings)
[ci skip]
Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/nl/ Signed-off-by: Herman Peeren herman@yepr.nl
Merge pull request #18268 from liviuconcioiu/appearence
Fix empty Appearance settings
Merge pull request #18262 from kamil-tekiela/Fix-bug-and-optimize-export
Optimize export of many tables
Don't parse SQL if no tracking is in progress
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (3427 of 3427 strings)
[ci skip]
Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/pt_BR/ Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Merge #18280 - Ref #18249 - Don't parse SQL if no tracking is in progress
Pull-request: #18280 Ref: #18249
Signed-off-by: William Desportes williamdes@wdes.fr
Translated using Weblate (Bulgarian)
Currently translated at 63.6% (2181 of 3427 strings)
[ci skip]
Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/bg/ Signed-off-by: 109247019824 stoyan@gmx.com
Translated using Weblate (Polish)
Currently translated at 47.1% (1616 of 3427 strings)
[ci skip]
Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/pl/ Signed-off-by: Marcin Gil mg@artigo.pl
Fix for handle large number of tables in a single database (more than 10k)
getTablesFull was taking too much time, because MySQL do not have a real table where it stores all tables information. So when it runs a query like select * from information_schema.TABLES ORDER BY Name limit 250 offset 0, MySQL has to read information about all tables to build his in memory table, then sort it by name, and then return 250 first tables. But reading information about one table takes time, and that's why the query is very slow when you have a lot of tables. Note that the problem is the same with 'SHOW TABLE STATUS'.
So, in order to speed up this query, we have to limit it to a small list of tables, as it, MySQL has to read table information only for few tables. Note that SHOW TABLES is not that long, even with a large amount of tables.
The idea here is to use the result of SHOW TABLES query, to apply paging on this table list, and then to run the query on information_schema.TABLES only on tables we want.
Signed-off-by: Nicolas Hervouet github@pico12.fr
Merge pull request #17718 from PicoI2/handle-large-number-of-tables-in-database-qa52
Fix for handle large number of tables in a single database (based on QA_5_2)
Add ChangeLog entry for #17702
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Add readonly for DisplayParts
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Create DeleteLinkEnum
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Merge pull request #18286 from kamil-tekiela/Add-readonly-for-DisplayParts
Add readonly and enum for DisplayParts
Remove the _overrides key of the ConfigFile::$cfgDb
It's always empty. It was introduced by 5c658310aab02837d47305f73ccaffe5fd43f397 and its last usage was removed by 2a8962aa95ba5f8b11439bfe3e9ecc88decb2c88
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Merge pull request #18284 from MauricioFauth/config-overrides
Remove the _overrides key of the ConfigFile::$cfgDb
Translated using Weblate (Polish)
Currently translated at 94.2% (3248 of 3445 strings)
[ci skip]
Translation: phpMyAdmin/Development Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/pl/ Signed-off-by: Marcin Gil mg@artigo.pl
Translated using Weblate (Bulgarian)
Currently translated at 61.5% (2122 of 3445 strings)
[ci skip]
Translation: phpMyAdmin/Development Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/bg/ Signed-off-by: 109247019824 stoyan@gmx.com
Refactor getBulkLinks
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Add @psalm-return
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Merge pull request #18285 from kamil-tekiela/refactor-getBulkLinks
Refactor getBulkLinks()
Remove templates/server/select/server_options.twig
Merges it with the templates/server/select/index.twig template.
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Merge config.values.php with ConfigFile class
This file is only used by the ConfigFile class, so makes sense to this information to be inside the class.
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (3445 of 3445 strings)
[ci skip]
Translation: phpMyAdmin/Development Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/pt_BR/ Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Merge pull request #18282 from MauricioFauth/config-values
Merge config.values.php with ConfigFile class
Create the PhpMyAdmin\Replication namespace
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Translated using Weblate (Turkish)
Currently translated at 100.0% (3445 of 3445 strings)
[ci skip]
Translation: phpMyAdmin/Development Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/tr/ Signed-off-by: Burak Yavuz hitowerdigit@hotmail.com
Translated using Weblate (Dutch)
Currently translated at 100.0% (3445 of 3445 strings)
[ci skip]
Translation: phpMyAdmin/Development Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/nl/ Signed-off-by: dingo thirteen dingo13@d404.nl
Translated using Weblate (Slovenian)
Currently translated at 100.0% (3445 of 3445 strings)
[ci skip]
Translation: phpMyAdmin/Development Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/sl/ Signed-off-by: Domen mitenem@outlook.com
@kamil-tekiela Thank you for the great work! BTW, this PR will also fix the issues with import of large tables/databases.
In my case, opening a database with 250 tables (50% performance increase) and importing a table (25 MB in size and 25000 rows), before this PR it took 4 minutes and 30 seconds. Now it takes 30 seconds!
Fix #18275
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Fix #18277
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Fix error in normalization
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Fix #18278
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Fix some type errors
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Merge pull request #18279 from kamil-tekiela/fix-param-issues
Fix param type issues
Add the extraOptionsButton ID to the Extra options button
This helps with the e2e tests
Signed-off-by: Maurício Meneghini Fauth mauricio@fauth.dev
Good catch ! Can you make a fix for this to not hit the tracker if it's not needed because like you said there is nothing tracked ?
I think @kamil-tekiela is the right person to do this fix, if he wants, since already knows about the code :).
Tracker::isActive()
is used in a few places, including https://github.com/phpmyadmin/phpmyadmin/blob/5e0caaf099522b7f5ccc35af045bc2ea8e71922e/libraries/classes/Controllers/Database/StructureController.php#L528
Probably is best to make the change in that function...
Looks like infinite recursion in Xdebug (or iconv). What if you disable that extension?
If I disable Xdebug, it doesn't crash.
PHP crashes on Windows. It happened when doing some code changes on phpMyAdmin.
Faulting application name: php-cgi.exe, version: 8.2.4.0, time stamp: 0x6410b4e0
Faulting module name: php8.dll, version: 8.2.4.0, time stamp: 0x6410bb50
Exception code: 0xc00000fd
Fault offset: 0x00000000003dadd7
Faulting process id: 0x7670
Faulting application start time: 0x01d95ae4f53195be
Faulting application path: z:\nginx\php\php-cgi.exe
Faulting module path: z:\nginx\php\php8.dll
Report Id: 06e842d7-e826-4189-8bd3-8161f900fe11
Faulting package full name:
Faulting package-relative application ID:
DebugDiag Analysis Report:
php-cgi.exe_230320_053451_MultipleRules.zip
PHP 8.2.4
Windows 10
I can't reproduce this one.
Try and click on show all. I've seen it does the same.
https://user-images.githubusercontent.com/25424343/226172963-867d3ab0-dd13-4c5a-b344-21c1054ea5b9.mp4
UPDATE test SET WHERE
doesn't show any error.
Some VIEW type tables do not open.
Steps to reproduce the behavior:
actor_info
tableTable should open.
https://user-images.githubusercontent.com/25424343/226156419-2507f3e0-249f-44e6-b31d-22ac97bbcbd2.mp4
TypeError: PhpMyAdmin\Linter::findLineNumberAndColumn(): Argument #2 ($pos) must be of type int, null given, called in /home/demo/.pma-demo/master/libraries/classes/Linter.php on line 148
Steps to reproduce the behavior:
SELECT * FROM
- with spaceNo error should happen.
https://user-images.githubusercontent.com/25424343/226150648-ceaed3a4-591c-4e49-b52c-b2ea922576d0.mp4
on update CURRENT_TIMESTAMP
doesn't show as default on attributes select.
Steps to reproduce the behavior:
on update CURRENT_TIMESTAMP
on update CURRENT_TIMESTAMP
should be selected as default, if this attribute is present for that column.
https://user-images.githubusercontent.com/25424343/226150476-c5b86263-89a0-4550-8f4b-2a770453d6bb.mp4
TypeError: PhpMyAdmin\Index::hasColumn(): Argument #1 ($column) must be of type string, int given, called in /home/demo/.pma-demo/master/libraries/classes/DatabaseInterface.php on line 915
Column name doesn't allow single numbers.
Steps to reproduce the behavior:
Columns should allow single numbers.
https://user-images.githubusercontent.com/25424343/226150240-c487b81e-4d37-4fab-8a08-410efb078391.mp4
Create Tracking namespace
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Remove unused params
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Refactor logic for getting Tracking status
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Remove getSqlResultForSelectableTables
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Remove last public use of Tracker::isTracked
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Use TableName instead of string
Signed-off-by: Kamil Tekiela tekiela246@gmail.com
Translated using Weblate (Dutch)
Currently translated at 100.0% (3441 of 3441 strings)
[ci skip]
Translation: phpMyAdmin/Development Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/nl/ Signed-off-by: Herman Peeren herman@yepr.nl
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (3441 of 3441 strings)
[ci skip]
Translation: phpMyAdmin/Development Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/zh_Hans/ Signed-off-by: n0tr00t hosted.weblate.org@n0tr00t.eu.org
Merge pull request #18259 from kamil-tekiela/Tracking
Refactor and optimize Tracking
This PR fixes the bugs that didn't allow a column to be moved. One issue with a column that hasn't a comment, and the other when a column is None.
Fixes #18232