Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Previous 30 Newer Entries Showing entries 31 to 54

Displaying posts with tag: Tech (reset)

Hibernate Query Cache: A Dirty Little Secret
Employee +0 Vote Up -0Vote Down

You Mean, Memory Is Not Infinite?

We're working hard getting MySQL Enterprise Monitor 2.0, featuring Query Analyzer (http://www.mysql.com/trials/enterprise), ready for release. As part of that, we started really ramping up the number of MySQL servers reporting in query data to see how we could scale. Not surprising (to me, anyway), the first efforts did not go so well. My old friend OutOfMemoryError reared its ugly head once again.

Query Cache -- It's More Than Just Results!

We're big (ab)users of hibernate query caching, and more importantly to us the natural id optimized query cache. Firing up the profiler, I was not shocked to see that the
  [Read more...]
MySQL and the Missing Rows
Employee +0 Vote Up -0Vote Down
I was doing some multi-threaded, multi-transactional testing for the backend of the MySQL Enterprise Monitor. I came across a weird failure, where it appeared I was able to successfully insert a row, and then (in the same transaction), a select from the same table did not return any rows.

Consider the following transactions:


mysql> create table t1 (id integer primary key auto_increment, name varchar(32) unique) engine=innodb;

a> begin;

b> begin;
b> select * from t1;

a> insert into t1 values(null, 'oldag');

b> insert into t1 values(null, 'oldag) on duplicate key update id=LAST_INSERT_ID(id);
(b blocks)

a> commit;

(b is released)
...
Query OK, 0 rows affected (0.00 sec)
b> select * from t1;
Empty set (0.00 sec)
























  [Read more...]
Mysql Error
+0 Vote Up -0Vote Down

I was running an import script today taken from a mysqldump from another user, when I saw an error that looked like this:

ERROR 1005 (HY000) at line 123: Cant create table
 (errno: 150)

This is caused by a mysqldump or export process exporting tables in alphabetical order and not in the order in which they rely on one another. My tables had foreign keys which fail on import if the other table doesn't exist when you create the table with the key. In this case I was only importing six or eight tables so I simply opened the script in a text editor and re-ordered the import blocks. On a bigger scale a more technical solution might be required!

Lorna is an independent web development consultant, writer and trainer, open source project lead and community evangelist. This post was originally published at LornaJane

Hibernate: Cache Queries the Natural Id Way
Employee +0 Vote Up -0Vote Down
I work on the MySQL Enterprise Tools (http://www.mysql.com/products/enterprise/monitor.html) team, formerly of MySQL and now with Sun Microsystems. The 2.0 version of the Enterprise Monitor is well under way. As part of this, the Java server backend has been refactored to utilize Spring and Hibernate. Honestly, I didn't know either one of those technologies before starting this project. Oh, what a fun road it has been...

A big draw for using an off-the-shelf ORM was so that we didn't have to write our own (kind of bad and slightly wrong -- those darn transactions) caching implementations for the custom one-off ORM that existed previously. A lot of our internal meta-model is very static, so clearly caching

  [Read more...]
Certified MySQL 5.1 Cluster Administrator
+0 Vote Up -0Vote Down
Yesterday I passed the CMCDEV exam.

I only used the study guide (previous entry) and the official manual to prepare for the exam.

The study guide is a good preparation for the exam.(Thanks to Roland Bouman and all other people involved with the book. The only minor issue with the book is that it didn't feel finished. Images which should've been printed in high quality and some phrases about a CD which is absent (All listed/fixed in the errata)

I filed a few bug reports while studying. (patched included :) )

So now let's wait for MySQL 5.1 to become GA.
FOSDEM
+0 Vote Up -0Vote Down
MySQL 5.1 Cluster Certification Study Guide
+0 Vote Up -0Vote Down
Today I received the "MySQL 5.1 Cluster Certification Study Guide".

I will compare this book to the "MySQL 5.0 Certification Study Guide" from MySQL Press. This is the book I used to study for the MCDEV (Certified Developer) and MCDBA (Certified DBA) exams.

The MySQL study guide was published by MySQL Press which is a cooperation with a n old-school publisher.

The MySQL cluster study guide  is published by Lulu.com which is an online on-demand publisher.

Lulu.com Cons:
1. The print quality is worse.
2. The paper is less white.
3. The layout is more compact. The margins are really small.

Lulu.com Pros:
1. On-demand print. This will make updated versions possible.
2. The book is smaller














  [Read more...]
My MySQL wishlist
+0 Vote Up -0Vote Down
This is my personal whishlist for MySQL.

Please let me know if I'm wrong or if there is a workaround for any of these items.

1. Per user and/or per database quota
Would very useful in setups for shared hosting. This would also prevent one database from bringing down the whole server. Separate tablespaces on different mountpoint can ease the pain, but I consider that a nasty hack.

2. External authentication
I've seen numerous scripts which fetch the authentication info from ldap, a file, another database or some other authentication store. This should be integrated into mysql. The mysql grant tables should be pluggable so it is possible to write a custom authentication plugin. We already have plugable engines and function (UDF) so this shouldn't be that hard is it?

3. Database locator
So you've got hundreds of servers.... and a multitude of databases.










  [Read more...]
Good luck, MySQL!
+0 Vote Up -0Vote Down

BusinessWeek reports MySQL continuing with their IPO preparations. As a long-time user (about ten years now), and almost as long-time customer (in many companies, obviously currently and most significantly Sulake and Habbo), I wish you guys the best of luck on that road. Don't lose your sight of the ballgame while doing that -- we need you to continue to do better with the product itself while the distractions of investor communications will be great.

I'm sure we can all name a few nuisances in every software product we use, and I certainly have a few of those of the MySQL database, but what I really admire the guys for is their approach to innovating in the sales and

  [Read more...]
What is the Next Big Thing? (longish)
+0 Vote Up -0Vote Down

In a decade, on-demand virtualized utility computing will be an invisible utility, part of the vital infrastructure of the technological economy.

People will mostly have forgotten what an enormous pain in the ass provisioning computation was today. Today, we don't truly feel that pain, because it seems "normal", everyone has to suffer it together.

The situation right now is, if you have a delivery van, you have to make your own gasoline. And you have to hire and pay for your own mechanics. Seems stupid, doesn't it? It's amazing that there are any delivery vans at all …

Think of the internet itself, what it did to telecoms.

Twenty-five years ago, if you wanted a high speed data connection to a computer in San Francisco, it was a pain. You'd have to come up with a pile of money, and wait a couple of months, at best. Hardware would be dedicated and provisioned, and

  [Read more...]
Someone's patented the Yellow Pages, of all things...
+0 Vote Up -0Vote Down
In the mid-90s, at the very starting edge of the dotcom boom, I was the lead tech guy behind a project, we put a nationwide yellow pages database on the web, ypol.com.

At the time, nobody else had done it, but we were sure that many other people had had the same idea. And since it's rare for someone to care about finding a plumber or locksmith in another state in the middle of the night, of course I had location based searches from the start.

It was, in fact, my first real encounter with using Oracle, Sybase, and using Perl to interface to a DB. (This was before Perl5, so there was no DBI module, so it was all oraperl.)


It looks like someone has actually patented the idea of location based searches on a online yellow pages database, has put together an investor-based lawsuit machine, and has fired the first salvo by suing Verizon.

I'm pretty damn sure my old YPOL project is prior art. I'm even willing to testify on that point...
XPath Variables in MySQL 5.1.20
Employee +0 Vote Up -0Vote Down

A few days ago, Alexander Barkov pushed some changes to the MySQL 5.1 tree that I’ve been waiting to see for some time — variable support for XPath functions used with ExtractValue() and UpdateXML(). (This was a fix for Bug #26518, BTW.) This will be available in MySQL 5.1.20 (or grab the MySQL 5.1 source from bkbits and build it yourself, if you just can’t wait).

Two slightly different notations are supported, depending on the context, and what sort of checking you want done on the values:

  • If you don’t want or need type checking, prefix the variable name with $@, like this: $@myvar. However, if you do this,
  •   [Read more...]
    Business Scripting Languages or SAP?s marketing talk + Stanford HCI mashup
    +0 Vote Up -0Vote Down

    The after lunch talk on Business Scripting Languages, by Asuman Suenbuel and Murray Spork was something I found very hard to stay awake in. In fact, I think so did many others, some of whom walked out of the room.

    The first half of the talk was filled with SAP marketing spiel, something I think should sincerely stay away from conferences that are tech-oriented. When you hear a word like “SOA”, you already know you’re in the wrong talk. Greg the architect video (link courtesy Leslie Wu), now that was funny. Saving grace, and they do mention the movies are not from SAP. Figures. SOA is like a clothes wardrobe was the other video, with some somewhat hot looking girl - sure, again,

      [Read more...]
    International PHP Cluster Disk Data Article
    Employee +0 Vote Up -0Vote Down

    I’ve had an introductory article to MySQL Cluster 5.1 Disk Data published in the September 2006 issue of International PHP Magazine.

    If you’re using Cluster or you’re interested in doing so, and you’ve not yet tried out MySQL 5.1, you’ll find that disk data storage makes MySQL Cluster more flexible, scalable, and cheaper to run than MySQL 4.1 and 5.0 Cluster. In the article, I’ve outlined some reasons why this is so. The article covers the basics of creating disk-based Cluster tables, and discusses some Disk Data do’s and dont’s. There’s also some info about some other improvements to

      [Read more...]
    More Fables of the Reconstruction
    Employee +0 Vote Up -0Vote Down

    Some people might have lives, but I have a webserver.

    I think I’ve now upgraded just about everything (software-wise) that’s upgradable on this machine:

    • Apache 1.3.33 -> 1.3.37 (Thanks for hiding the win32 binaries under “Archives” when the *nix version is out in plain view, guys)
    • PHP 5.0.3 -> 5.1.4 (This required ditching my old php.ini file and doing a new one from scratch)
    • MySQL 5.1.8 -> 5.1.11 (Dead easy, even on Windows - yea, TEAM!)
    • Perl 5.8.7 -> 5.8.8
    • Python 2.3.2 -> 2.4.3
    • Tcl 8.4.12 -> 8.5.0
    • BlogCMS .3.4.6 -> WordPress 2.0.4 (The RSS feed was broken, I was getting tired of seeing my posts quoted elsewhere sans formatting, and every time I tried messing with the code, it just got worse)
    • Singapore 0.9.11 -> 0.10.0
      [Read more...]
    SP for Using Quarters with Partitioning
    Employee +0 Vote Up -0Vote Down
    I'm working on an article with Peter G. about MySQL partitioning that should be on dev.mysql.com next week sometime (assuming that I pull my finger out and get my bits finished soon). I started working on an example that partitions based on years and quarters and very quickly realised that if you use QUARTER() as part of of the partitioning expression, then that table is going to have all the high-speed performance of the average garden slug.I won't give away everything here (otherwise you'd have no reason to go read the article), but I will say that using TO_DAYS() instead of QUARTER() is part of the solution, and that I came up with a utility of sorts to help in creating such tables. Here's the stored procedure: DELIMITER |CREATE PROCEDURE qdays ( IN y1 INT, IN q1 INT, IN y2 INT,  [Read more...]
    SP for Using Quarters with Partitioning
    Employee +0 Vote Up -0Vote Down
    I'm working on an article with Peter G. about MySQL partitioning that should be on dev.mysql.com next week sometime (assuming that I pull my finger out and get my bits finished soon). I started working on an example that partitions based on years and quarters and very quickly realised that if you use QUARTER() as part of of the partitioning expression, then that table is going to have all the high-speed performance of the average garden slug.I won't give away everything here (otherwise you'd have no reason to go read the article), but I will say that using TO_DAYS() instead of QUARTER() is part of the solution, and that I came up with a utility of sorts to help in creating such tables. Here's the stored procedure: DELIMITER |CREATE PROCEDURE qdays ( IN y1 INT, IN q1 INT, IN y2 INT, IN q2 INT )  [Read more...]
    MySQL Partitioning != MySQL Cluster (and other things it ain't)
    Employee +0 Vote Up -0Vote Down
    Someone at work pointed out a rather interesting blog entry that purports to dump on MySQL Partitioning in a rather big way.In my opinion, he raises one valid point, but as for the rest of what he says, he's either misguided or misinformed. Except where he's Just Plain Wrong. Why? Let me give some reasons... He seems to be confusing Partitioning with Cluster. NDB Cluster does use partitioning (and has done so since before it was part of MySQL), but in 5.1 it's possible to use partitioning with most other storage engines, no Cluster necessary. (This is what's actually "new" about it in 5.1.) Whether he's talking about Cluster or about Partitioning (it's not clear which is the case), his contention that every box ... contains the whole database is simply wrong. He is correct in saying that you can't add or drop Cluster nodes online. This is being  [Read more...]
    MySQL Partitioning != MySQL Cluster (and other things it ain't)
    Employee +0 Vote Up -0Vote Down
    Someone at work pointed out a rather interesting blog entry that purports to dump on MySQL Partitioning in a rather big way.In my opinion, he raises one valid point, but as for the rest of what he says, he's either misguided or misinformed. Except where he's Just Plain Wrong. Why? Let me give some reasons... He seems to be confusing Partitioning with Cluster. NDB Cluster does use partitioning (and has done so since before it was part of MySQL), but in 5.1 it's possible to use partitioning with most other storage engines, no Cluster necessary. (This is what's actually "new" about it in 5.1.) Whether he's talking about Cluster or about Partitioning (it's not clear which is the case), his contention that every box ... contains the whole database is simply wrong. He is correct in saying that you can't add or drop Cluster nodes online. This is being worked on. I can't say whether it'll  [Read more...]
    Apache Annoyance
    Employee +0 Vote Up -0Vote Down
    (The following applies to Apache 1.3. I've no idea whether it's still true in Apache 2 or not. Some of you will probably react to that news like I do to someone who's still not upgraded to MySQL 5.0, but there you are.) Ever been in a situation where you want all the files in a directory listed, even if one of them's named index.html (or whatever default you've specified as the default DirectoryIndex)? I banged my head against my monitor several times before I finally figured this one out. It's one of those things that's apparently too obvious to be mentioned in the Apache documentation, so I'll put it here: AllowOverride Indexes Options +Indexes DirectoryIndex /
    Apache Annoyance
    Employee +0 Vote Up -0Vote Down
    (The following applies to Apache 1.3. I've no idea whether it's still true in Apache 2 or not. Some of you will probably react to that news like I do to someone who's still not upgraded to MySQL 5.0, but there you are.) Ever been in a situation where you want all the files in a directory listed, even if one of them's named index.html (or whatever default you've specified as the default DirectoryIndex)? I banged my head against my monitor several times before I finally figured this one out. It's one of those things that's apparently too obvious to be mentioned in the Apache documentation, so I'll put it here: AllowOverride Indexes Options +Indexes DirectoryIndex /
    Jon's First bash Hack
    Employee +0 Vote Up -0Vote Down
    A friend recently gave me a used copy of O'Reilly's Learning the bash Shell, 2nd ed. which I've been perusing a bit here and there, not really with the objective of learning all there is to know about bash in one swell foop, but rather to have bits of it lurking about in the back of my head for future reference. One of those bits came in handy a couple of days ago. As part of my job, I need to compile new builds of MySQL from the sources pretty frequently, and when I file a bug report, I like to be able to include the date the version I used was built. I mean, it's not like I can't do something like ls -l ~/bin/mysql/bin/mysql | cut -d' ' -f7 to get the file creation date for the client binary, but I thought it would be cool to have it in the MySQL version string so I didn't have to exit mysql or switch to another shell. I already knew that MySQL can be built using a --with-server-suffix  [Read more...]
    Jon's First bash Hack
    Employee +0 Vote Up -0Vote Down
    A friend recently gave me a used copy of O'Reilly's Learning the bash Shell, 2nd ed. which I've been perusing a bit here and there, not really with the objective of learning all there is to know about bash in one swell foop, but rather to have bits of it lurking about in the back of my head for future reference. One of those bits came in handy a couple of days ago. As part of my job, I need to compile new builds of MySQL from the sources pretty frequently, and when I file a bug report, I like to be able to include the date the version I used was built. I mean, it's not like I can't do something like ls -l ~/bin/mysql/bin/mysql | cut -d' ' -f7 to get the file creation date for the client binary, but I thought it would be cool to have it in the MySQL version string so I didn't have to exit mysql or switch to another shell. I already knew that MySQL can be built using a --with-server-suffix option that adds an arbitrary  [Read more...]
    HTMLtags
    Employee +0 Vote Up -0Vote Down
    My friend Ron from the Brisbane MySQL Meetup is cooking up a new project that uses MySQL's new Sakila sample database. It's a tag-based Java/JSP framework called HTMLtags. If you're into Java, you might want to check this out. If you like it - and especially if you'd like to lend a hand with development - drop Ron a line. I'm sure he'd appreciate it! (I'd volunteer, but what I don't know about Java would fill a library.) BTW, Ron and I, along with Australia's newest MySQL AB employee, are also starting to cook up a new Open-Source-y Something, but it's still a secret for now.
    Previous 30 Newer Entries Showing entries 31 to 54

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.