June 19, 2013

Post: Fixing column encoding mess in MySQL

Just had an interesting issue with an encoding mess on a column containing non-ASCII (Russian) text. The solution …(CONVERT(CONVERT(column USING binary) USING utf8) USING cp1251) WHERE id=123; This can be further simplified. After 2nd conversion the… SET column=CONVERT(CONVERT(column USING binary) USING utf8) WHERE id=123; The same trick could be applied to fix notorious…

Comment: MySQL for Hosting Providers - how do they manage ?

… seconds and they are running the same query same connection ID. Kill that connection. That should clear out the deadbeats. If…if they surpass a certain amount. mysql> show full processlist; +—–+——+———–+——+———+——+——-+———————–+ | Id | User | Host | db | Command | Time | State | Info | +—–+——+———–+——+———+——+——-+———————–+ | 281 | root… more, they already have plenty of ways to make a mess of things. The usual mistakes are caused by ignorance not…

Comment: PHP vs. BIGINT vs. float conversion caveat

… not enough and you have to use BIGINT 64-bit ids; e.g. if you are encoding additional information like the server ID into high bits of the ID. I had already written about the mess that 64-bit integers…

Post: PHP vs. BIGINT vs. float conversion caveat

… not enough and you have to use BIGINT 64-bit ids; e.g. if you are encoding additional information like the server ID into high bits of the ID. I had already written about the mess that 64-bit integers…

Comment: MySQL 5.1 Command line client improvements

… in the same query from the same table. It randomly messes up the MYI files, though (which can be repaired by… did something like this : insert into table1 (id, serial_no) select ‘asd’ as id, count(name) as serial_no from where category…

Post: MongoDB Approach to database synchronization

… master to scan its log files to find all object ids which were modified from the point slave synchronized successfully and… is no schema and when you do not have to mess with complex features like triggers or multiple storage engines.

Comment: When should you store serialized objects in the database?

… there are multiple applications their serialization is really compatible. Manually messing with serialized data is very error prone. When you typically… is true as well. If you need to store 10000 IDs retrieving single blob which holds them will be a lot…

Post: Recovering CREATE TABLE statement from .frm file

… do Innodb Recovery we often get .frm files and some mess in the Innodb tablespace from which we have to get… MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 17 Server version: 5.1.30-community-log MySQL…