Showing entries 31976 to 31985 of 44814
« 10 Newer Entries | 10 Older Entries »
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           if (!strcmp(fptr->name, *argv)) …
[Read more]
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           if (!strcmp(fptr->name, …
[Read more]
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
Category Performance, Maintenance


Description:

This variable defines the size of each log file in a log group. While setting this variable it should be noted that combined size of all log files should be less than …

[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, 268.191 seconds, 42.4 MB/s

Ok, well… that’s completely miserable. Let’s try …

[Read more]
Solaris Cluster and Open HA Cluster are ready for MySQL 5.1

If you want high availability for MySQL databases on Solaris or Open Solaris consider Solaris Cluster / Open HA Cluster. Solaris Cluster supports all available releases for MySQ 5.1. The MySQL agent for Solaris Cluster is usable with the release candidates of MySQL 5.1, and definitely with any final release of the MySQL 5.1 enterprise server or the community server. In addition to 5.1 we support all the current versions up to 5.0.51a.

With Solaris Cluster, you can achieve high availability for the MySQL database server and other applications in the same cluster. Solaris Cluster provides you with a rich framework to orchestrate any start or restart dependencies between the MySQL database server and other applications. You can even combine master and slave databases within the same Solaris Cluster. So you can achieve highly available masters and highly available slaves.

One advantage of the MySQL acquisition is that we …

[Read more]
First attempt at using Sun xVM VirtualBox

I’ve been using VMWare for a while.  Let’s start with why I do that.

1) Some of my newer computers are dramatically more powerful and energy efficient (all around) than my older systems.  It’s simpler/cheaper/saner to virtualize many/most/all of the older machines and run them on a single physical server.  Consolidating their respective functions onto a single server would take weeks or more of my time, so this was the way to go.

2) Being able to “pack up” an entire server and “take it with me” to different servers (or laptops) makes my life and my work a lot easier.

So I decided to try Sun’s xVM VirtualBox today.  It’s leaner/meaner/maybefaster and “Open Source”, and it supports a better set of host operating systems than VMWare Server itself, so I was actually looking forward to it.

Right up until 30 seconds into it when I encountered an apparent

[Read more]
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 | 
+-----------+
1 row in set (0.00 sec)

What is that? Well, it sure does look like an INT at this point, …

[Read more]
Database virtualization, distributed caching and streaming SQL

James Kobelius writes in Network World how the need for scalable real-time business intelligence will create a convergence of technologies centered on database virtualization:
"Real-time is the most exciting new frontier in business intelligence, and virtualization will facilitate low-latency analytics more powerfully than traditional approaches. Database virtualization will enable real-time business intelligence through a policy-driven, latency-agile, distributed-caching memory grid that permeates an infrastructure at all levels.

As this new approach takes hold, it will provide a convergence architecture for diverse approaches to real-time business intelligence, such as trickle-feed extract transform load (ETL), changed-data capture (CDC), event-stream processing and data federation. Traditionally deployed as stovepipe …

[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 yourselve in the mysql database

[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 [...]

Showing entries 31976 to 31985 of 44814
« 10 Newer Entries | 10 Older Entries »