Reputation
11,148
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
1 12 30
Newest
 innodb
Impact
~643k people reached

Jan
9
answered How do I report progress of a long running transaction in MySQL?
Jan
9
comment Check for table lock in conditional statement
@clickstefan I don't know why they designed some of the SHOW statements the way they did and didn't put the same things in information_schema. If you or someone you know is proficient in C, it's actually possible to create a custom storage engine in MySQL that could expose this information via an SQL interface, as a queryable table. I've contemplated writing one for SHOW SLAVE STATUS but haven't gotten around to it (and you can discover some attributes about the slave status from information_schema.processlist).
Jan
9
comment Check for table lock in conditional statement
@clickstefan there are some other possibilities, like the innodb_trx table in information_schema or even the processlist table that could potentially give you programmatically accessible and useful information when deciding to proceed, but you don't want to be overly aggressive in querying them because some information_schema queries can be relatively resource-intensive.
Jan
8
comment Check for table lock in conditional statement
@ypercube thanks. And thanks, again. :) Among other things, I find this very useful with recurring jobs in the event scheduler. If another thread holds my lock I know the previous run of the event is still going, so I shouldn't proceed. I use a simple wrapper procedure that I call get_lock_or_die() that returns if the lock is yours, or throws a fatal error with SIGNAL SQLSTATE 45000 ... otherwise. Errors thrown inside scheduled events go to the MySQL error log, so as a side effect, I get a log entry to let me know the previous execution of the scheduled event ran longer than it should.
Jan
8
answered Check for table lock in conditional statement
Jan
8
answered Local MySQL instance running extremely slow compared to remote version
Jan
8
answered Is it possble to replicate MySQL server on Azure virtual machines
Jan
8
comment Check for table lock in conditional statement
This seems like potentially a bit of XY. What are you actually trying to accomplish with this? You can't do it directly, of course, but depending on the motivation, there might be a viable alternative. Also, what version of MySQL Server?
Jan
8
comment MySQL explain query: Using temporary table vs more rows examined
Remember, when trying to compare performance between variant queries, you need to use SELECT SQL_NO_CACHE so that you get a better sense of how long the server actually takes to process them. 0.00 sec seems pretty low.
Jan
8
comment Can MySql cause a Windows server to shutdown unexpectedly?
I am extremely skeptical that MySQL Server is causing Windows to completely shut down without leaving a trace. If it is, then Windows Server is an even worse platform than I already suspected. The more likely explanation is that the hosting provider doesn't understand the nature of the problem... therefore, according to them, there is no problem.
Jan
6
comment Database design what are your thoughts
en.m.wikipedia.org/wiki/Object-relational_impedance_mismatch is where you should start reading about why not to try this. If it doesn't keep you busy, then contemplate how you'd handle the discrepancies between release families of just one rdbms, and then think about what subset of which SQL standard you'll support, since you can't be fully cross-platform unless every target platform has a way to do everything you want to try to support through your abstraction interface.
Jan
2
answered mysql replication master 5.5 slave 5.1 error on create database
Jan
2
revised Foreign key set to cascading but fails to update - why?
blockquote quotation from documentation
Jan
1
comment mysql multi-source replication to single slave from Debian repo's?
CHANGE MASTER ... FOR CHANNEL and START SLAVE ... FOR CHANNEL would both be statements executed at the slave. The channels seem to be only arbitrary text labels for replication configuration, and only used on and meaningful at the slave, but if you encounter something that contradicts that, feel free to ask.
Jan
1
comment When try to do Mysqldump Backup from console then getting such as error
There is no issue related to connection -- well, yes, there is. Error 10061 is absolutely an issue related to the connection. Either your my.ini has spurious or inconsistent configuration in the [client] or [mysqldump] vs. the [mysql] section, or you are passing an argument to mysql (when you start the command line client) that you also need to pass to mysqldump, such as host or port.
Jan
1
comment Is that create table statement correct?
TRUNCATE TABLE year_2014;
Jan
1
answered mysql multi-source replication to single slave from Debian repo's?
Jan
1
comment Foreign key set to cascading but fails to update - why?
What did you try to update? Update an "id" to be a different (unused) value?
Jan
1
answered OOM in mysql-percona
Dec
31
comment When try to do Mysqldump Backup from console then getting such as error
Is MySQL Server running on the standard port, 3306? Adding --port=3306 (or another port number, if you changed it) may help. Error 10061 means there is no service listening on the port where the connection is trying go ("connection refused.")