Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

A table has 6 records, Heidi only shows 4

MBaas's profile image MBaas posted 1 month ago in General Permalink

(Disclaimer: still a newbie with HeidiSQL, so I might be missing something essential)

I'm currently developing an app that uses MariaDB. So I like to have a look at the DB while the app is doing its job. Noticed a weird phenomenon that nearly cost me the sleep at night...until I had an idea:

the app is creating several tables and adds 6 records to one of them. However, HeidiSQL only shows the first 4 records of this table. Restarting Heidi or even the PC does not change this. I almost believed Maria had not added the records (which is what cost the sleep) until I had the idea to do a SELECT after each INSERT. Clearly - the records are there! But HeidiSQL (11.2.0.6213) does not show them. (I even embedded the INSERTs into transactions to be 100% sure)

After clicking the table in the tree view and viewing in "Data"-Tab, I only see those 4 records. Filter is empty. The weirdest thing is that I tried the query SELECT COUNT(*) FROM {table}...and got 4 as well!

So...maybe my program doesn't work on the DB that HeidiSQL is showing? Nope, can't be - it is the same DB. (The whole thing is restartable from scratch, so I dropped the DB from HS, my app automatically re-created it and I followed how those 4 records were created. However, 5&6 never showed up...)

Any more info I can provide?

ansgar's profile image ansgar posted 1 month ago Permalink

Probably post a screenshot?

MBaas's profile image MBaas posted 1 month ago Permalink

Sure:

Description

The right window is the IDE that access the same DB.

ansgar's profile image ansgar posted 4 weeks ago Permalink

Ok, so there is definitely no filter, and no similar database or table name (which may cause confusion). Also, your green IDE (is that IBM/AS400 stuff?) shows the same number of rows.

So how can you be sure the 2 remaining rows are there?

Perhaps you inserted them without getting an error? Perhaps you violated the primary key (id) with 2 of these 6 rows?

MBaas's profile image MBaas posted 4 weeks ago Permalink

Aaaargh - sorry, that was stupidity. I was so careful with the screen layout that I did not pay attention to the data. That previous one was from an interrupted process as I rushed to get it done and missed the details :(( Please ignore that. Here's a better one: Description

MBaas's profile image MBaas posted 4 weeks ago Permalink

Oh, and to answer your q about the IDE: that's a Window-Environment with a "Retro"-Colour scheme ;)
It uses ODBC to access MariaDB from APL (a powerful array-oriented language)

ansgar's profile image ansgar posted 4 weeks ago Permalink

Ok, so your IDE shows a different number of rows than HeidiSQL. You should test that with a third client, e.g. the mysql command line, MySQL Workbench, or whatever.

MBaas's profile image MBaas posted 4 weeks ago Permalink

That's ... (I don't know a suitable english word for it.) Heck, I'm not even sure I know a suitable german word!

mysql commandline also shows 4 records! Don't know what to say :( I'll look into that with the IDE-guys!

Sorry for not trusting Heidi! ;)

MBaas's profile image MBaas posted 4 weeks ago Permalink

Surprisingly there actually was a plausible answer to that! Working in isolation mode, working with consistent state of data etc. are they keywords - honestly, a different world for me - but it's beginning to make sense ;)

ansgar's profile image ansgar posted 4 weeks ago Permalink

Glad you found the cause.

kalvaro's profile image kalvaro posted 4 weeks ago Permalink

Uncommitted changes?

MBaas's profile image MBaas posted 4 weeks ago Permalink

Nore, isolation challenges.

MBaas's profile image MBaas posted 4 weeks ago Permalink

*Nope

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.