Showing entries 37231 to 37240 of 44079
« 10 Newer Entries | 10 Older Entries »
Open source database wars: the Lumen example

I remember once asking Marten Mickos to participate on a panel - "The Battle of the Databases" - for Linuxworld a year or two back. He declined. At the time, I was mildly annoyed at his sense of camaraderie - he didn't think it was productive to try to set MySQL against Ingres against PostgreSQL. A bit later, I can appreciate his stance. Yesterday I exchanged emails with Boris Kraft, founder of the Magnolia CMS project. I regularly exchange emails/IMs with Dries Buytaert, founder of Drupal. Both are competitors in one sense, but in reality we're focused on different opportunities.... READ MORE

Unique strings in a text field

So, I want to reduce data usage of a text field, by storing unique strings separated by a delimiter. So to do so I came up with this:

Given a table


CREATE TABLE `hmm` (
`a` int(10) unsigned NOT NULL default '0',
`b` text NOT NULL,
`c` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

INSERT INTO hmm VALUES (1, 'hmm8',1) ON DUPLICATE KEY UPDATE b = IF(FIND_IN_SET('hmm8', b)>0, b, CONCAT_WS(',',b, 'hmm8')), c = c+1;

SELECT * FROM hmm;
+---+--------------------------+---+
| a | b | c |
+---+--------------------------+---+
| 1 | hmm4,hmm5,hmm6,hmm7,hmm8 | 7 |
+---+--------------------------+---+



Let's break apart the INSERT statement, if column 'a' produces a duplicate ON DUPLICATE KEY UPDATE will issue an IF statement

[Read more]
Backups don?t suck

Today, immediately after lunch, I got IO errors from my laptop hard drive (ironically while attempting a file system dump). Words to the affect of “oh gosh and bother” exiting my mouth and the decision was made to go get a new drive.

Well… one “shortcut” to the computer store later, have new HD (will travel).

Backup from previous night, xfsrestore here I come. And a good number of hours later… about 1.5million files restored.

I do wish file systems had REPEATABLE_READ though… that would be nice.

සිංහල, Sinhalese collation

If you search for Sinhala, a large fraction of the links you'll see point to something written by Harshula "hash" Jayasuriya. Sinhala is a very, very old language, but it's not very well developed on computing platforms. Its script is most often represented in Unicode, but the default Unicode collation table (DUCET) doesn't order its words ("collate") properly. Thus, MySQL didn't order it properly.

To fix that, hash recently submitted a collation implementation to MySQL, based on the Sri Lanka Standards Institution's SLS1134-pt1 document. It seems to be right, judging from our tests, but I would be much more comfortable if it were exposed to more eyeballs. The collation is on its way into the mysql-5.2 tree, and should be …

[Read more]
DBD::mysql 4.005 Released

I'm pleased to announce the release of DBD::mysql 4.005! This release contains various fixes, per Changelog:


  • Fixed mysql_warning issue < 4.1 (reminders, patches, help from ROAM, (issue 25713)
  • makerealclean patch from ROAM (issue #25714)
  • sqlstate cleanup patch from ROAM
  • Replaced all references to dbis->debug to use DBIc_TRACE_LEVEL(imp_xxh)
  • Fix to dbd_st_destroy - added back previously removed 'free everything' code which
    had been moved to dbd_st_finish, causing a crash upon freeing of bind values
    after all rows resulting from one execution of a query have been fetched. This meant
    that next attempt to execute the prepared statement would segfault. This
    work thanks to Rainer Weikusat!
  • Removed all 'FindNewTable' calls in all tests. Just use 't1' for all tests to
[Read more]
MySQL Stored Procedures problems and use practices

To be honest I'm not a big fan of Stored Procedures, At least not in the form they are currently implemented in MySQL 5.0

Only SQL as a Language Which is ancient ugly for algorithmic programming and slow. It is also forces you to use a lot of foreign constructs to "original" MySQL style - to process data via cursors, handle error via Handlers etc. If you spent last 10 years writing Stored Procedures for Oracle or DB2 it may be cool and convenient for you, but not for me

Lack of Debugging I like to be able to debug software, if not full blown debugger I'd like to have things like echo and var_dump. Due to the context of execution these are not easy though. Of course you can code a little helper Debug Storage Procedure which will log some information in MySQL table but it is not convenient enough.

Bad Parser Error Messages MySQL Parser is in general far from perfect when it …

[Read more]
Found this great memory stress tool -- called Safari

So I was surfing around Apple's website this afternoon and found this new Windows download called Safari.  Wondering what it is I downloaded and installed it.  Turns out it's a great memory stress tool.  Check out this screenie of it using nearly 300 megs on my Vista x64 system.

This is great!  I was able to see how all my other apps work in low memory situations.  As useful as that is, right before I was going to write this blog entry I discovered this wonderful app also renders web pages.  Holy cow!!  This is too much.  What are those Apple guys going to think of next?

The Twelve Days of Scale-Out: Gumtree Standardizes on MySQL Enterprise to Manage Explosive Growth

MySQL AB today announced that Gumtree.com -- one of the world?s fastest growing online community websites, and the UK?s biggest site for local community classifieds -- has selected and standardized on MySQL Enterprise to support its exponential growth and scalability requirements.

Hacking MySQL: making TRUNCATE behaviour more intuitive

This is my second article about hacking MySQL. If you are interested in this topic, you may want to read my previous Hacking MySQL: SIGNAL support (I)

The problem

If I tell you there is a function called TRUNCATE, what do you think it does? which are its arguments?

For me, the obvious behaviour would be something like:

mysql> SELECT TRUNCATE(123.45);
+--------------------+
| TRUNCATE(123.45)   |
+--------------------+
|                123 |
+--------------------+
1 row in set (0.08 sec)

But the actual behaviour is this:

mysql> SELECT TRUNCATE(123.45);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

This is because …

[Read more]
A challenge: partition a character set in MySQL

How good are your SQL and/or general coding skills? I have a specific challenge I'd like your help solving. I am not sure it's possible, but I'd love to be proven wrong.

Showing entries 37231 to 37240 of 44079
« 10 Newer Entries | 10 Older Entries »