“it is as if the sync job was able to cope correctly with records inserted after the start”
Probably! When it displays the no. of rows it executes SELECT COUNT(*) after that the sync starts: it will calculate checksums on 'blocks' of rows. Next it will sync what differences are found in taht 'block' and proceed to the next block. In the meantime new rows may be added at the end. They will be found when the job reaches so far.
By executing the sync job at shorter intervals there will be less rows that differ and the calculation and the sync will be much faster.
Could you try creating a 'static copy' the table and sync that one?
Could you provide a test case? Without an idea of what data those 'tokens' are it is hard to guess?
How long does the sync job run? Is it possible to block connections for other users/clients doing inserts/updates when testing? I think that actually the sync is OK when it is 'planned' but 'out of date' when finished (due to inserts on thein job-time). But the reporting is confusing then!
Also the sja.log may provide a little more information. Please check!
The problem is there are some queries which we are not passing through the reconnect wrapper! (You will find 2 different connection modules in the code) One query that does not always is 'show create table' in certain contexts.
The 'non-reconnecting' connection module is shared with the SJA. And it seems t o be used somewhere where it should not. Please give a little more time!
1) Most of that stuff will require access to the file system. We do not have this when connecting with the C-API from a remote host. I also think that some of it will work with MyISAM tables only.
Also what phpMyAdmin does and looks depends on the version and configuration.
2) True. We should use the help tables of the MySQL database itself. This QB does very well in my opinion! It is a matter of time and priority.
3) We will need to move the 'apply' button to the 'first' dialogue screen. All additions, changes and deletes could then be queued and performed in one ALTER statement. Nice proposal. I think we never observed that ourselves!
I reproduced this (SQLyopg 6.16 RC and MySQL 5.0.51a)
“To reproduce, execute as root in the MySQL server:
SET GLOBAL wait_timeout=5
(my addition: connect with a new conenction to establish that changed server varaibale for the conenction)
– then add a line in a table. Wait 10 seconds, modify a value then click anywhere else or use tab/up/down to auto-save the changed value.
– The “mysql has gone away” error pops up.”
But I think we are talking about two different types of 'connection getting lost'!
1)
What you are talking about is the situation where the server *deliberately* terminates a connection because of this setting. My guess is that we do not 'get' or 'discover' any signal that connection is lost. I also think you are right about the coding details for this situation!
2)
What reconnect we do is that if connection gets lost due to *some accidential error on the line* we will connect by creating a new server process/thread. That you can verify by connecting to a remoter server, disconnect the network cable (or turning off the access point , stop the webserver (with HTTP tunnellling) etc. etc) , execute something (you will get some error of course – which one depends), reconnect the cable, execute again and you will get results. This is in particular usefull with tunnelling. It is very common for instance with HTTP tunnelling that the webserver interrupts the connection. Also with SSH the connection may be lsot between PLINK and SSHD or between SSHD and MySQL (but this situation with SSH we will handle in 6.2). But it is not only useful with tunnelling – with internet lines of poor quality (lots of them are!) and cheap hosting *some accidential error on the line* happens frequently. I also think that your solution will not solve this!
We have not had focus on the 'wait_timeout setting' .. but on all types of connection errors!
@Fuzzy .. you (and everyone) are welcome to comment on that. But I write this mostly for our development team!