-
Dot-Org Pavilion at the Percona Live MySQL Conference
This is a cross-post from my personal blog. Are you involved with an open-source project that’s interesting to MySQL users, such as Nginx, PHPMyAdmin, Drupal, Jenkins, PHP, and so on? Percona just published the application form for dot-org groups to have a free expo hall booth in the Percona Live MySQL Conference in April. Please submit your applications now, and tell your friends about this, because a) the schedule for applying is very short, and b) space is limited.
For those of you who don’t know what this is, it’s another of the O’Reilly traditions we’re trying to continue. (We are trying very hard to make this event as close to a clone of O’Reilly’s as we can.) It’s a free table in the expo hall where people who participate in a non-commercial open source project can exhibit. I organized a Maatkit booth a few times in the past, and was always really grateful to O’Reilly for making the space available. Space in the expo hall is at a premium, but we think that these dot-org booths are even more valuable to the open-source projects and the conference attendees.
So, please tell your friends who care about open source, and ask them to tell their friends too. Let’s get some great open-source projects into the expo hall, alongside the commercial vendors!
-
North Texas MySQL Users Group Meeting set for March 12th
The March meeting of the North Texas MySQL Users Group will be March 12th from five to seven PM at the Irving office. Pizza will be provided and a special guest speaker is double checking their schedule. Come come network, gather swag, and learn more about MySQL.
Please RSVP below by leaving a comment so we can plan on a) enough pizza, b) any special pizza topping request, and c) have enough meeting space for the pizza.
Oracle Office
6031 Connection Drive
Irving, TX 75039
-
Shinguz: I prefer MySQL binary tar balls with Galera...
In my set-ups I have different MySQL versions (MySQL 5.0, 5.1, 5.5 and 5.6, Percona Server 13.1 and 24.0, MariaDB 5.2.10, 5.3.3, Galera 1.0, 1.1 and 2.0) running in parallel at the same time.
Up to now I have not found a practical way yet to do this with RPM or DEB packages. If anybody knows how to do it I am happy to hear about it.
So I love and need only binary tar balls. Installation and removal is done within seconds and no remainings are left over after a removal. To operate the whole I use myenv.
Some software providers unfortunately do not provide binary tar balls at all or not in the form I want and need them. Thus I was thinking about how to get those by extracting them from packages. Up to now I have not had the time to write this down. But today was the right time...
RPM
rpm2cpio galera-22.1.1-1.rhel5.x86_64.rpm | cpio -vidm
tar czf galera-22.1.1-1.rhel5.x86_64.tar.gz usr
rm -rf usr
Extract with:
tar xf galera-22.1.1-1.rhel5.x86_64.tar.gzDEB
ar vx galera-22.1.1-amd64.deb
mv data.tar.gz galera-22.1.1-amd64.deb.tar.gz
rm debian-binary control.tar.gz
Extract with:
tar -mxf galera-22.1.1-amd64.deb.tar.gz
The packages look quite the same in size:
-rw-r--r-- 1 oli oli 6725416 2012-02-08 13:49 galera-22.1.1-1.rhel5.x86_64.rpm
-rw-r--r-- 1 oli oli 6769606 2012-02-08 14:18 galera-22.1.1-1.rhel5.x86_64.tar.gz
-rw-r--r-- 1 oli oli 1386762 2011-12-12 17:12 galera-22.1.1-amd64.deb
-rw-r--r-- 1 oli oli 1385994 2012-02-08 14:18 galera-22.1.1-amd64.deb.tar.gz
so I assume that there is nothing lost.
The differences in size between DEB and RPM seems to come from the packaging itself:
usr_deb/lib/galera/libgalera_smm.so: ELF 64-bit (SYSV), dynamically linked, stripped
usr_rpm/lib64/galera/libgalera_smm.so: ELF 64-bit (SYSV), dynamically linked, not stripped
So nothing to worry. The programs itself worked without any problems after the first tests. So I am optimistic that this is a good workaround until I can convince the software vendor to make good binary tar balls...
-
common_schema rev. 218: QueryScript, throttling, processes, documentation
common_schema, revision 218 is released, with major new features, top one being server side scripting. Here are the highlights:
QueryScript: server side scripting is now supported by common_schema, which acts as an interpreter for QueryScript code.
Throttling for queries is now made available via the throttle() function.
Enhancements to processlist-related views, including the new slave_hosts view.
Inline documentation/help is available via the help() routine.
more...
QueryScript
common_schema makes for a QueryScript implementation for MySQL. You can run server side scripts, interpreted by common_schema, which allow for easy syntax and greater power than was otherwise previously available on the MySQL server. For example:
foreach($table, $schema, $engine: table like '%')
if ($engine = 'ndbcluster')
ALTER ONLINE TABLE :$schema.:$table REORGANIZE PARTITION;
QueryScript includes flow control, conditional branching, variables & variable expansion, script throttling and more.
Read more on common_schema's QueryScript implementation.
Query throttling
Throttling for MySQL queries was suggested by means of elaborate query manipulation. It is now reduced into a single throttle function: one can now just invoke throttle(3) on one's query, so as to make the query execute for a longer time, while taking short sleep breaks during operation, easing up the query's demand for resources.
Read more on query throttling.
Process views
The processlist_grantees view provides with more details on the running processes. slave_hosts is a new view, listing hostnames of connected slaves.
Read more on process views.
help()
The common_schema documentation is now composed of well over 100 pages, including synopsis, detailed internals discussion, notes and examples. I can't exaggerate in saying that the documentation took the vast majority of time for this code to release.
The documentation is now made available inline, from within you mysql client, via the help() routine. Want to know more about redundant (duplicate) keys and how to find them? Just type:
call help('redundant');
and see what comes out!
The entire documentation, which is available online as well as a downloadable bundle, is embedded into common_schema itself. It's rather cool.
Tests
common_schema is tested. The number of tests in common_schema is rapidly growing, and new tests are introduced for new features as well as for older ones. There is not yet full coverage for all views, but I'm working hard at it. common_schema is a robust piece of code!
Get it!
Download common_schema on the common_schema project page.
Read the documentation online, or download it as well (or call for help())
common_schema is released under the BSD license.
-
QueryScript: SQL scripting language
Introducing QueryScript: a programming language aimed for SQL scripting, seamlessly combining scripting power such as flow control & variables with standard SQL statements or RDBMS-specific commands.
QueryScript is available fro MySQL via common_schema, which adds MySQL-specific usage.
What does QueryScript look like? Here are a few code samples:
Turn a bulk DELETE operation into smaller tasks. Throttle in between.
while (DELETE FROM archive.events WHERE ts < CURDATE() LIMIT 1000)
{
throttle 2;
}
Convert all InnoDB tables in the 'sakila' database to compressed format:
foreach ($table, $schema, $engine: table in sakila)
{
if ($engine = 'InnoDB')
ALTER TABLE :$schema.:$table ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
}
Shard your data across multiple schemata:
foreach($shard: {USA, GBR, JAP, FRA})
{
CREATE DATABASE db_:$shard;
CREATE TABLE db_:$shard.city LIKE world.City;
INSERT INTO db_:$shard.city SELECT * FROM world.City WHERE CountryCode = $shard;
}
This tight integration between script and SQL, with the power of iteration, conditional statements, variables, variable expansion, throttling etc., makes QueryScript a power tool, with capabilities superseding those of stored routines, and allowing for simplified, dynamic code.
QueryScript code is interpreted. It's just a text, so it can be read from a @user_defined_variable, a table column, text file, what have you. For example:
mysql> set @script := "while (TIME(SYSDATE()) < '17:00:00') SELECT * FROM world.City WHERE id = 1 + FLOOR((RAND()*4079));";
mysql> call run(@script);
For more details, consult the QueryScript site.
If you're a MySQL user/DBA, better read the common_schema QueryScript documentation, to better understand the specific common_schema implementation and enhanced features.
common_schema, including the QueryScript interpreter, can be downloaded from the common_schema project page.
|