Showing entries 32086 to 32095 of 44927
« 10 Newer Entries | 10 Older Entries »
MySQL Source cross-referencing with 'cscope'

IDEs like NetBeans has made life easier and more productive. 

But, you may as well use utilities like 'cscope' when all you have is a console login. Here is how you would set up MySQL sources for easy cross-referencing using 'cscope':

Build the cross-reference:

Go the MySQL sources top-level directory and build the cross-reference (-R is used to descend recursively into the directories, and -b builds the cross-references):

/home/as227057/dev-tools/mysql-5.1.25-rc" 24 $ cscope -Rb

Search for symbols, functions, etc:

$cscope` -R brings up a text based interface:

Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
Find all …
[Read more]
MySQL Source cross-referencing with 'cscope'

IDEs like NetBeans has made life easier and more productive. 

But, you may as well use utilities like 'cscope' when all you have is a console login. Here is how you would set up MySQL sources for easy cross-referencing using 'cscope':

Build the cross-reference:

Go the MySQL sources top-level directory and build the cross-reference (-R is used to descend recursively into the directories, and -b builds the cross-references):

/home/as227057/dev-tools/mysql-5.1.25-rc" 24 $ cscope -Rb

Search for symbols, functions, etc:

$cscope` -R brings up a text based interface:

Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
Find all …
[Read more]
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….

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]
Showing entries 32086 to 32095 of 44927
« 10 Newer Entries | 10 Older Entries »