May 26, 2012

Post: Recover BLOB fields

… depending on maximum field size. The highest bit of the offset is 1 if the field is stored in external pages (i.e. long BLOB field) NULL fields…… To upload the table back you should utilize UNHEX function: mysql> LOAD DATA INFILE ‘/path/to/datafile’ REPLACE INTO TABLE FIELDS TERMINATED BY ‘\t…

Post: Ultimate MySQL variable and status reference list

the amazing MySQL manual, especially the option and variable reference table. But just as frequently, I want to look up blog posts on… Com_show_fieldsblogpercona.commanual Com_show_function_codeblogpercona.commanual Com_show_function_statusblogpercona.commanual Com_show_grantsblogpercona.commanual …

Post: Upgrading MySQL

… DECIMAL field got whole another meaning in MySQL 5.0 MySQL generally …the earliest MySQL version and still get same result. The more exotic or complicated functionality is thethe code which runs on it may not run well on production until it is upgraded. In case fixing code to run on different MySQL

Post: MySQL EXPLAIN limits and errors.

…(selects in FROM clause) are used. MySQL will execute these subselects on explain to provide plan for …for example BLOB fields can’t work with in memory temporary table. The other thing – since MySQL 4.1 …sec. No info about functions cost Since MySQL 5.0 you may use user functions in your query which…

Post: Checking for a live database connection considered harmful

the code should be rewritten something like this: functionthe connection is active typically involves a call to the ‘ping’ or ‘statistics’ command at the MySQLthe lab, and even in the field

Post: Innodb row size limitation

…. Use the COMPRESS/UNCOMPRESS functions This is also relatively simple to implement, though that depends on where in your code you use this fields… can limit the changes to your application if you choose XML as format and you use MySQL‘s built in functions for handling…/functions directly on the individual fields you want to store. It also forces you to read/write more data at once, while one of the

Comment: How to check MySQL Config files

themysql_test.php” page returns something similiar to: ID: 1 Name: John after run on broser: Fatal error: Call to undefined function mysql

Post: INSERT ON DUPLICATE KEY UPDATE and summary counters.

…()) on duplicate key update hits=hits+1; This example actually shows one more neat feature of MySQL – inet_aton and inet_ntoa functions which can convert IP address strings to integers and back. This allows to save on field length significantly by using 4 bytes instead of 15 The third feature this example takes advantage of is TIMESTAMP field. By…

Post: Percona Server 5.1.50-rel12.1

… available for download. Functionality Added or Changed Percona Server 5.1.50-rel12.1 is now based on MySQL 5.1.50. New Features Added: innodb_lru_dump_restore – Implemented automatic dumping of the buffer pool at… #625066 – Fixed a problem handling end-of-line in BLOB fields in the MySQL client. (Sasha Pachev) Bug #640924 – Fixed a crash caused…

Comment: MySQL VIEW as performance troublemaker

the process of importing the content of a pre-existing mysql db into Drupal, but the table and fieldthe new (Drupal) table and field names to the old ones, so that our HUGE perl library can continue to function