Showing entries 27491 to 27500 of 44919
« 10 Newer Entries | 10 Older Entries »
Bug When Compiling MySQL 5.1 From Source

I just filed a very annoying bug when trying to compile with plugin engines using the 5.1.xx source tarball.

Description

I am trying to test SphinxSE as a plugin instead of getting it statically linked and came across an annoying bug. When using the configure --with-plugins option only once, the engine is statically linked. When using it twice, the first engine is created as a plugin, and the 2nd one is linked statically. Here are a couple of examples:./configure –prefix=/usr/local/mysql-5.1.33 –with-plugins=innobase –with-plugins=sphinx

plugin_innobase_shared_target='ha_innodb.la'   <-- plugin
plugin_innobase_static_target=''
plugin_sphinx_shared_target=''
plugin_sphinx_static_target='libsphinx.a'       <-- static
./configure --prefix=/usr/local/mysql-5.1.33 --with-plugins=sphinx …
[Read more]
Show Me the Money!…Monetizing Open Source

OK, you’ve released your open source product and built a huge userbase. Now your shareholders/investors are pressing you to monetize that userbase. How do you do it? There are many ways to monetize open source. For simplicity, let’s segment the revenue sources according to who is paying:

Users :
Your users probably downloaded your product for free. Some are willing to pay for certified/approved distributions, maintenance, updates, support and more. Because open source turns your product and services into commodities, you will need to leverage your brand, and the expertise that it embodies, to maintain premium pricing.

Another good revenue source is certified education. If you’ve built a large userbase, businesses clearly see value in your product. As a result, employees and job-seekers will enhance their personal value and marketability if they are certified experts with your product. Assemble copyrighted educational …

[Read more]
Get the error return value in a variable

One missing feature in our stored procedures and functions is that, if there’s an exception (error), you don’t know the error number or sqlstate or error message. The plan is there, of course, WL#2111 Stored Procedures: Implement GET DIAGNOSTICS but I haven’t ticked the architecture review box, and the best prospect for a volunteer is busy with performance schema work.

However, there is a way to get this in the next MySQL 5.4 (which is called mysql-next on launchpad and which will almost certainly become the September milestone). Use RESIGNAL.

For space reasons I’m only going to illustrate how to do this to find out the SQLSTATE. I think bright souls will realize it’s simple, though tedious, to extend this so you can get the error number too.

I …

[Read more]
Trivial MySQL Variable of the Day

Today’s trivial MySQL system variable:

old_alter_table

The interesting bit is that this is a system variable, and shows up in SHOW GLOBAL VARIABLES, but is not documented on the Server System Variables manual page.

Instead, it is documented on the manual page for Server options.

Unfortunately, that documentation is very sparse. It tells us:

old-alter-table is an option that can be set in an option file (such as /etc/my.cnf)

old_alter_table is the name of the variable.

And….that’s it. It is neither a system nor status variable, there is no scope, and no entry for whether or not it is dynamic. These last 2 are baffling, though they show up in other variables in the …

[Read more]
Show Me the Money!…Monetizing Open Source

OK, you’ve released your open source product and built a huge userbase. Now your shareholders/investors are pressing you to monetize that userbase. How do you do it? There are many ways to monetize open source. For simplicity, let’s segment the revenue sources according to who is paying:

Users :
Your users probably downloaded your product for free. Some are willing to pay for certified/approved distributions, maintenance, updates, support and more. Because open source turns your product and services into commodities, you will need to leverage your brand, and the expertise that it embodies, to maintain premium pricing.

Another good revenue source is certified education. If you’ve built a large userbase, businesses clearly see value in your product. As a result, employees and job-seekers will enhance their personal value and marketability if they are certified experts with your product. Assemble copyrighted educational …

[Read more]
MySQL - initcap function

Sometime back I was looking for a built-in initcap/ucfirst function in MySQL but unfortunately couldn't find such string functions so decided to write my own.. thanks to the MySQL community member who corrected the bug in my function & posted it back.


DELIMITER $$

DROP FUNCTION IF EXISTS `test`.`initcap`$$

CREATE FUNCTION `initcap`(x char(30)) RETURNS char(30) CHARSET utf8
BEGIN
SET @str='';
SET @l_str='';
WHILE x REGEXP ' ' DO
SELECT SUBSTRING_INDEX(x, ' ', 1) INTO @l_str;
SELECT SUBSTRING(x, LOCATE(' ', x)+1) INTO x;
SELECT CONCAT(@str, ' ', CONCAT(UPPER(SUBSTRING(@l_str,1,1)),LOWER(SUBSTRING(@l_str,2)))) INTO @str;
END WHILE;
RETURN LTRIM(CONCAT(@str, ' ', CONCAT(UPPER(SUBSTRING(x,1,1)),LOWER(SUBSTRING(x,2)))));
END$$

DELIMITER ;


Usage:

select initcap('umesh kumar …

[Read more]
Diving into the Depths of Drupal with DTrace

I recently presented DTrace at Sun's CommunityONE event. My presentation was focused on observing drupal using DTrace. You can see a replay of the presentation here. You can get the presentation here as well.

If you are an AMP (Apache MySQL PHP) stack user on Solaris/OpenSolaris you can benefit from DTrace. Here is a D-Script that will print the load distribution on your system. Think of it as "AMP-top" if you may! This was tested on OpenSolaris 2009.06

#!/usr/sbin/dtrace -qs

BEGIN
{ …
[Read more]
Creating a simple Cluster on a single LINUX host

It isn’t necessarily immediately obvious how to set up a Cluster on LINUX; this post attempts to show how to get a simple Cluster up and running. For simplicity, all of the nodes will run on a single host – a subsequent post will take the subsequent steps of moving some of them to a second host. As with my Windows post the Cluster will contain the following nodes:

  • 1 Management node (ndb_mgmd)
  • 2 Data nodes (ndbd)
  • 3 MySQL Server (API) nodes (mysqld)

Downloading and installing

Browse to the MySQL Cluster LINUX download page at mysql.com and download the correct version (32 or 64 bit) and store it in the desired directory (in my case, /home/billy/mysql) and then extract and …

[Read more]
iptables trick to limit concurrent tcp connections

This is sort of a self-documenting post, and a self-support group about ill-behaved tomcat apps. Sometimes, you have multiple nodes accesing your MySQL server (or any kind of server, for that matter) concurrently. Eventually, software in one or more of these nodes might do nasty things (you know who you are buddy:)) MySQL provides a … Continue reading iptables trick to limit concurrent tcp connections →

Related posts:

  1. Using MySQL Proxy to benchmark query performance By transparently sitting between client and server on each request,...

YARPP powered by AdBistroPowered by

Of Oracle API's, array interface and bind variables

As we know, the MySQL prepared statements API leaves a bit to be desired, although there is a fair amount of progress. With MySQL, using the "normal" API or the prepared statement API usually doesn't have that much different in terms of performance.

When you use Oracle though, things are different. There is no separate "prepared statement" API, there is just on interface, which has a lot of functions and structures, and isn't the easiest to use, because of the complexity, but it IS very functional and performant.

If we look at the low-level Oracle interface, there used to be three of them:

  • Oracle Call Interface (OCI) - This is the the interface that is most complex, but also most functional. It is a C level interface along the lines of the MySQL C API, i.e. you still pass SQL statements, it's not a file level interface of some kind. This is also the interface that is used to build Oracle Data …
[Read more]
Showing entries 27491 to 27500 of 44919
« 10 Newer Entries | 10 Older Entries »