June 20, 2013

Post: Timezone and pt-table-checksum

value of CURRENT_TIMESTAMP.  From the manual, here is how MySQL handles timezone locality with timestamp fields: Values…at the actual SQL generated by pt-table-sync when looking at rows: SELECT /*foo.bar:…different timezones and each time, the checksum will change.  However, the underlying data isn’t …

Post: How to obtain the "LES" (Last Executed Statement) from an Optimized Core Dump?

….5.25a-rel27.1/sql/sql_select.cc:312 #21 mysql_execute_command (thd=thd@…lex->value_list, 3135          lex->duplicates, 3136          lex->ignore))) 3137       { 3138  res= handle_select(thd, … cache if something changed 3141           after unlocking when changes become visible. 3142           TODO:…

Post: On Character Sets and Disappearing Tables

…rename of ‘./foobar/#sql-3c13_11′ to ‘./…VALUES (‘value_fk1_to_2′, ‘value_fk1_to_3′, ‘value_fk3_to_1′); INSERT INTO dos2 VALUES (‘value_fk1_to_2′, ‘value…INSERT INTO recovery SELECT * FROM `#sql2…MySQL won’t allow us to change an FK-referenced column from INT to SMALLINT, but it will allow us to change

Post: When is MIN(DATE) != MIN(DATE) ?

…can we learn from this? Unfortunately, setting sql_mode does not help you…changing their PK, and this is what happened: Before the move: (root@localhost) [test]> select…bizarre. On one hand, it seems like MySQL is using date windowing for… hasn’t actually changed any data in those DATETIME values, and …

Post: Updated msl (microslow) patch, installation walk-through!

… file sql/sql_cache.cc patching file sql/sql_class.cc patching file sql/sql_class.h patching file sql/sql_parse.cc patching file sql/sql_select.cc patching file sql/sql… the desired value. Can be changed at run time with both SET SESSION and SET GLOBAL. Downloads msl patch for MySQL 5.0…

Post: Can MySQL temporary tables be made safe for statement-based replication?

values(1) *************************** 5. row *************************** Log_name: mysqlselect * from test.t *************************** 6. row *************************** Log_name: mysqlMySQL, because the logging of stored procedures has changed

Post: SELECT LOCK IN SHARE MODE and FOR UPDATE

… hints in MySQL and SQL Server. In MySQL/Innodb LOCK IN SHARE MODE and SELECT FOR …SELECT statements. Here is simple example: SESSION1: mysql> begin; Query OK, 0 rows affected (0.00 sec) mysql> insert into tst valueschanged. This for example can be used to read set of the rows, compute new values

Post: MySQL Server Variables - SQL layer or Storage Engine specific.

MySQL Server has tons of variables which may be adjusted to change behavior or for performance … 100-1000+ values per single insert statement. concurrent_insert – Enables concurrent insert (while Selects are running)… thread once sorting needs to be done) SQL Layer so works for all storage engines….

Post: MySQL caching methods and tips

… results in decreased overall operational costs, so caches provide real value by avoiding using those resources. You need an efficient …information that changed since they were last populated. MySQL includes two statements that make this easier: CREATE TABLE .. SELECT and INSERT .. SELECT. These SQL

Post: Using UNION to implement loose index scan in MySQL

…+———————————-+ | 888ba838661aff00bbbce114a2a22423 | +———————————-+ 1 row in set (0.06 sec) mysql> SELECT SQL_NO_CACHE name …MySQL Optimizer and change the query so it can handle it well…. use UNION: mysql> SELECT…with just two possible values it would be …