Home |  FAQ |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français
Showing entries 1 to 10 of 12258 Next 10 Older Entries
Employee Adding new test cases to 'mysql_client_test.c'

I had posted some notes on the MySQL test framework in my earlier post at http://blogs.sun.com/amitsaha/entry/the_mysql_test_framework

'mysql_client_test.c' which lives in the 'tests/' directory uses the MySQL C API to write various client side tests to be executed on the server. In this post, I will show how you can add your own test(s) to this file.

Why would you want to do that?

Adding your tests to this file enables you take advantage of the existing test framework to run your tests.

How does 'mysql_client_test.c' execute the tests?

In the main( ) function, this code snippet selects the tests to be run:

 for ( ; *argv ; argv++)
  18054       {
  18055         for (fptr= my_tests; fptr->name; fptr++)
  18056         {
  18057
  [Read More...]
Employee when the problem is likely a bug in the linker?

Windows FAIL.

It has been suggested the current thing I’m trying to fix is actually a bug in the Microsoft linker…. and I’m quite willing to believe that.

I wonder if I can expense rehab if this Windows port leads to a drinking problem….

Variable's Day Out #16: innodb_log_file_size
Properties: 

Applicable To InnoDB
Server Startup Option --innodb_log_file_size=<value>
Scope Global
Dynamic Yes
Possible Values Integer: Range: 1M - 4G
<1M will be adjusted to 1M
Default Value 5M

  [Read More...]
Sustained IO on EBS == No Bueno

I have a small EC2 instance running with a 25GB EBS volume attached. It has a database on it that I need to manipulate by doing things like dropping indexes and creating new ones. This is on rather large (multi-GB, millions of rows) tables. After running one DROP INDEX operation that ran all day without finishing, I killed it and tried to see what was going on. Here’s the results of the first 10 minutes of testing:

-bash-3.2# dd if=/dev/zero of=/vol/128.txt bs=128k count=1000
1000+0 records in
1000+0 records out
131072000 bytes (131 MB) copied, 0.818328 seconds, 160 MB/s

This looks great. I’d love to get 160MB/s all the time. But wait! There’s more!

-bash-3.2# dd if=/dev/zero of=/vol/128.txt bs=128k count=100000
dd: writing `/vol/128.txt': No space left on device
86729+0 records in
86728+0 records out
11367641088 bytes (11 GB) copied,
  [Read More...]
Patch for mutex contention statistics is ready
Code and details are here.

Use it for performance debugging rather rather than for performance. It may not make the server run faster, but it can show you where there are problems in the server code and you can fix those problems or report them to others.

The patch is for MySQL 5.1.26 and builds on x86_64 servers running Linux 2.6. It might not build elsewhere.
What Data Type is Returned by a Mathematical Function?

Or, “Missing information in the MySQL Manual”.

Just earlier today, I was using POW(), which I’ve grown quite fond of, simply because it makes life easier. I prefer using it like SELECT 512*POW(1024,2) to find out the number of bytes to put in a variable, for example.

First, let’s take a look at the POW function:

Name: 'POW'
Description:
Syntax:
POW(X,Y)

Returns the value of X raised to the power of Y.

Okay, so it gives us a value; but what about the data type? Let’s take 512*POW(1024,2) as an example.

5067 (blogs) > SELECT 512*POW(1024,2) AS example;
+-----------+
| example   |
+-----------+
| 536870912
  [Read More...]
The Dangers of Having status fields
Having a status column is very common in databases today. It can be used to denote a user status: CREATE TABLE IF NOT EXISTS `user` ( `user_id` int(10) unsigned NOT NULL auto_increment, `email` varchar(32) NOT NULL, `pw_hash` char(40) NOT NULL COLLATE latin1_general_cs, `status` enum('PENDING', 'ACTIVE', 'DISABLED') default 'PENDING', `date_created` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`user_id`), UNIQUE KEY `idx_email` (`email`) ); or user-uploaded [...]
Open source awareness in Egypt?
Although the awareness of open source appears low, the lack of Internet-based apps poses an opportunity to bolster open source penetration READ MORE

Zabbix 1.5.4 Woes

I was trying to check out the new Zabbix beta's when I ran into a couple of problems. Mostly missing dependencies but also some bugs.

The big troubles start when trying to install the frontent.
It seems like php code shipped in the last release might well work when you are upgrading but it fails when you are doing a fresh install. As I never got a Setup Wizard.

The clue is to get the most recent code from their SVN repo svn co svn://svn.zabbix.com/trunk , that actually allows you to run the setup wizard.

If you are installing the latest RPM's they are also not really requiring all the dependencies you need to run the frontend.

yum/apt-get install php-bcmath php-pear

Will get you a step further.

Another thing is the new password policy.. it seems the Admin/blank is gone.
I have no clue what the new password is but you are encouraged to set it


  [Read More...]
Employee MySQL Workbench 5.1 Alpha for Linux in Less Than 30 Days

A lot of people have been waiting for this a long time - so I am very happy to announce that we will publish the first Alpha that runs natively on Linux end of September. We will release generic binaries and the 5.1 source tarball including everything that is needed to build yourself.

This will not be a feature-complete beta release yet, but we are trying to get the basic functionality working so everybody can start modeling right away. We spent most of the last few months working on updating the Back-End implementation to use the GRTv4 and to prepare our platform-independent mForms. I expect the actual Front-End port to make good progress.

Let me share two screenshots I just made on Ubuntu, our Linux distro of choice. The first one shows the MySQL Model page. The Sakila demo model has been loaded.

  [Read More...]
Showing entries 1 to 10 of 12258 Next 10 Older Entries