Yahoo's MySQL Partition Manager is Open Source

1 comment
The guys at Yahoo released their partition management script on github:
At Yahoo, we manage a massive number of MySQL databases spread across multiple data centers.
We have thousands of databases and each database has many partitioned tables. In order to efficiently create and maintain partitions we developed a partition manager which automatically manages these for you with minimal pre configuration.
You can check out the original anoucement at the MySQL@Yahoo blog and the code at its github repo.

1 comment :

Post a Comment

MySQL Bug #79497: Full text indexes and aggregate functions

No comments
Playing around with the Employees sample database and full text search on MySQL, I found a weird bug. After creating a full text targeting a column on a table, a "select distinct" query to retrieve the range of values returns an empty set.
So if you initially perform the following query, the outcome comes with 7 rows:
mysql> select distinct title from titles;
| title              |
| Senior Engineer    |
| Staff              |
| Engineer           |
| Senior Staff       |
| Assistant Engineer |
| Technique Leader   |
| Manager            |
7 rows in set (0.38 sec)
If you create a fulltext index on the titles table, over the title column:
mysql> alter table titles add fulltext index `title` (`title`);
Query OK, 0 rows affected (14.65 sec)
Records: 0  Duplicates: 0  Warnings: 0
Issue the same query again:
mysql> select distinct title from titles;
Empty set (0.00 sec)
So, apparently our records are gone? Repeat the query, but with COUNT:
mysql> select count(distinct title) from titles;
| count(distinct title) |
|                     7 |
1 row in set (0.24 sec)
The records are not gone, they justo won't appear with the DISTINCT aggregate function. If you drop the FT index, the query returns the correct result set.
If dropping the index is not an option, you can workaround this bug, repeating the query with UCASE:
mysql> select distinct(ucase(title)) from titles;
| (ucase(title))     |
| STAFF              |
| ENGINEER           |
| SENIOR STAFF       |
| MANAGER            |
7 rows in set (0.44 sec)
This bug is already reported at MySQL Bugs. It's #79497. It appears to be an upstream issue, reproducible on current 5.6 and 5.7.

No comments :

Post a Comment