…insert may corrupt data pt-heartbeat –utc –check always returns 0 pt-query-digest 2.2 prints unwanted… the wrong variable name in verbose mode when –function is used And more The first two bugs…. A new –recursion-method was added to pt-table-checksum: cluster. This method attempts to auto-discover…
Post: Percona Toolkit 2.2.2 released; bug fixes include pt-heartbeat & pt-archiver
Post: Stored Function to generate Sequences
… function seq(seq_name char (20)) returns int begin update seq set val=last_insert_id(val+1) where name=seq_name; return… you of course could have them using different tables. I use MyISAM tables here which allows to use such sequences in transactions…. This way of using this function allows you to “inject” the value to be returned next time this function is called. Sometimes people…
Post: Statement based replication with Stored Functions, Triggers and Events
… will stop with an error. Example: mysql> CREATE FUNCTION this_year() RETURNS INT DETERMINISTIC RETURN YEAR(CURDATE()); mysql> insert into t VALUES(this… behaviour of stored procedures and functions are completely different. If our stored procedure write data to our tables the queries inside the… insert multiple values and we have gaps? Example: Imagine the table has this values on the auto incremental column: 1,2…
Post: Memory allocation in Stored Function
… in table with 10mil+ rows, and, as the manipulation was non-trivial, I decided this task is good to try Stored Function. Function… to look deeply – let’s try simple table (experiments with MySQL 5.0.45) CREATE TABLE `testf` ( `id` int(11) NOT NULL….00 sec) and simple function I’ve found in MySQL manual: CREATE FUNCTION hello (s CHAR(20)) RETURNS CHAR(50) RETURN CONCAT(‘Hello, ‘,s…
Post: Returning to InnoDB scalability
…’m again returning to InnoDB scalability and related bug #15815 as it hurts… problem: On 4-CPU box 1 thread executes full-table scan select query for 8 sec, but with 4 …block_get / block_release functions which aquire/release the block related to the current row. And the problem functions block_get / …
Post: Paul McCullagh answers your questions about PBXT
… to be rebuilt, which can be done by REPAIR TABLE. The table data page size does not require a rebuild because… acquires and holds a row-level lock for each row returned by the SELECT. These locks are all stored in RAM…. The affect is that the init function returns quickly, but the first queries that access PBXT tables may hang waiting for recovery to…
Post: GROUP_CONCAT useful GROUP BY extension
… useful extention to the GROUP BY operation: function GROUP_CONCAT: GROUP_CONCAT(expr) – This function returns a string result with the concatenated non…? For example to get PHP array without looping inside PHP: Table: CREATE TABLE services ( id INT UNSIGNED NOT NULL, client_id INT…
Post: MySQL opening .frm even when table is in table definition cache
… 5.5 you can find in sql/datadict.cc a function named dd_frm_type(). In MySQL 5.1, for some… generic table type (I think, I haven’t gone back into the deep history of the FRM file format to confirm) return… in the server: DROP TABLE RENAME TABLE DROP VIEW open table filling INFORMATION_SCHEMA tables (I think it is actually the TABLES table, but didn’t…
Post: MySQL Slow query log in the table
… is possible, with exception of TRUNCATE query. Which just recreates table which should be fast. Interesting enough however what would happen…. The other handly feature would be the function which returns as as SET list of tables which query is using. This would allow for example to find all queries touching given table…
Comment: Using UNION to implement loose index scan in MySQL
Thanks, helped me to optimize query with agregate function on table with multiple key: table: Create table tabData ( channel_id Int NOT NULL, date… where id_virtual_channel in (1, 2, 3) optimized – query returns immediately: select min(m) from ( select min(date_time) as…

