Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 480

Wrong values for SELECT * FROM 'XXX' in 2 different PHPmyadmin Versions

$
0
0

even after several hours of investigation i can't solve a big problem regarding different counts for table rows in PHPmyadmin. The shop on the old server is online, working. Our shop system never deletes products when sold - it set them inactive. The new server is non productive.

Old Server:MySQL Server-Version: 10.3.39-MariaDB-0+deb10u2 - Debian 10PHPmyadmin 5.0.4deb2~bpo10+1Apache/2.4.59 (Debian)DB-Client Version: libmysql - mysqlnd 5.0.12-devPHP-Extensions: mysqli curl mbstringPHP-Version: 7.3

New server:MySQL Server-Version: 10.11.6-MariaDB-0+deb12u1 - Debian 12PHPmyadmin 5.2.1deb1Apache/2.4.59 (Debian)DB-Client Version: libmysql - mysqlnd 8.2.20PHP-Extensions: mysqli curl mbstring sodiumPHP-Version: 8.2.20

I did an shell db export/import from the old server to the new server in an empty DB:

mysqldump -u user -p database > dump.sqlmysql -u user -p database < dump.sql

All looking smooth on the first try, last table written, 1,4gb written in about 30s.

But the when i go to SELECT * FROM products the count of rows in the new DB is about 150 less than in the old one. I exported multiple times. I imported multiple times. Always the same count.

So i came back to the old rule "if something doesn't work the IT way you'd like it to work: do it different.".

I exported the table products from the old server via PHPmyadmin SQL.zip export.SELECT * from products, old server: 156.616I imported the file into the new servers db (for sure after deleting old table products)SELECT * from products, new server: 158.020 - the same count as on the overview page.

AS far as i understand the row counts on the tables overview in PHPmyadmin is always an "about" value.But SELECT * from products should always deliver the correct numbers, right?

I went multiple times to operations > analyze tables on old and new server, which should flush the cache and recalculate values. I get different counts most times. Analyze always resulted in an "OK"

Old server 157.114 / 157.398 / 158.107 / 157.398

New Server 157.453 / 157.027 / 157.027 / 158.020

So i did an csv export of the old and new table. Absolutely no differences. But quite a hard way to compare the integrity of a DB migration with 293 tables and 1.4gb.

Any idea why PHPmyadmin is always counting wrong?

We did delete sold products once to save space. products.products_id is AUTO INCREMENT NOT NULL. Shouldn't cause the problem, right?

CheersFrank


Viewing all articles
Browse latest Browse all 480

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>