Showing entries 41641 to 41650 of 44029
« 10 Newer Entries | 10 Older Entries »
MySQL Snapshot from a full disk. Tar over ssh

Have you ever tried to take a snapshot from a mysql server only to find an hour later that the box ran out of disk space when trying to create the tar ball? An easy solution is to use ssh to pipe the tar data directly to another server without it even touching the disk. For those unfamiliar with unix shells or pipes a pipe allows you to tie the output of one program to the input of another. This is most commonly used to manipulate that stream of data. For example if you want to find a specific file in a directory. In these examples cartman is server A (where the commands are ran from). Stan is server B.

cartman> ls | grep mysql-5
mysql-5.0

The | (pipe) tells the shell to direct the output of ls to the input of grep which looks for the pattern ‘mysql-5′. This same functionality can be used with the tar command. This next command would compress a file and uncompress it on itself. Of course this is pointless. Until we …

[Read more]
del.icio.us RSS Feeds

I've been using del.icio.us since 2004, and it has served me well. For those who still haven't tried it, it's basically a bookmark manager with a social twist. You can get a (nearly) real-time list of everyone's PHP bookmarks, everyone's MySQL bookmarks, my bookmarks, or the blogs I read.

At the bottom of each page, there is a convenient link to an RSS feed for that page. For example, you can get a feed of the blogs I read. There's only one problem - the feeds are limited to 30 items. That's why the list of blogs on …

[Read more]
Data Modelling

I’m a data modeller. I specialise in this, and for a number of years on large projects I’ve been able to focus on this single task within the System Development Life Cycle of software development for several months at a time. Unfortunately what depresses me the most, is I can’t get a full time position in what I’m an expert in. It’s not a specialised skill that an organisation can use on a full-time basis, unless it’s a large organisation, and quite frankly, Brisbane isn’t a market that can support the diversity of large organisations. (caveat, large organisations that are proactive in software development, not just large organisations that have significant IT requirements, but do not work proactively). This is why I can also do Software Development, Database Administration, and even System Administration. Again, I’m not good enough to fill one of these positions in a larger organisation as an expert, but I can generally hold …

[Read more]
Contributing to JMeter

As part of my using JMeter for the purpose of testing a new Transactional storage engine PBXT for MySQL, I’ve been investigating the best approach for handling transactions. Read more about earlier decisions at my earlier post Testing a new MySQL Transactional Storage Engine.

I found that the JMeter JDBC Sampler only supports SELECT and UPDATE Statements, and not calls to stored procedures. This is just one approach I’m considering taking.

Well, I guess it’s time to contribute code to an Apache Project. I’ve modified code and logged bugs before for Tomcat, but this will be my first attempt …

[Read more]
Temporary table subtleties in MySQL

Temporary tables behave very differently across various database servers. If you’re not familiar with MySQL, some things might catch you off guard. In this article I explain some subtleties of temporary tables in MySQL and explain when you might encounter problems with them. I also show you how the platform-specific features can sometimes be very useful indeed. Creating temporary tables In MySQL, creating a temporary table has exactly the same syntax as creating a regular table, with a few restrictions (no foreign keys, for example).

Once solution to triggers with Auto Increment field. How to access next auto increment value reliably?

In my earlier post I asked about how to create a trigger that can access the auto incremented value.

One solution is:


CREATE TRIGGER article_filename BEFORE INSERT ON adoppt.articles2 FOR EACH ROW SET NEW.permalink = CONCAT(NEW.permalink, "-" , ( SELECT MAX(id) FROM articles2 ) + 1 )



This however doesn't works properly if the lastest record, or the record with the highest value has been deleted after insertion.

Is there a reliable way to access the auto increment value for the next record? LAST_INSERT_ID() doesn't work if there was no insert in the current session.

--Frank

Saber rattling gets louder: Microsoft CEO Steve Ballmer hints at possibility of Microsoft litigating against Linux vendors and/or users

In an interview with Forbes, Microsoft’s CEO Steve Ballmer stops short of announcing patent litigation against “Linux”:

Well, I think there are experts who claim Linux violates our intellectual property. I’m not going to comment. But to the degree that that’s the case, of course we owe it to our shareholders to have a strategy. And when there is something interesting to say, you’ll be the first to hear it.

This is almost like announcing that there will sooner or later be an announcement of Microsoft starting patent litigation against “Linux” vendors and/or users.

By “intellectual property” he must mean patents. IP is a broad term and includes diverse rights, but it’s hard to see how Linux would infringe any trade mark rights or copyrights held by Microsoft. …

[Read more]
MySQL Users on Frappr!

Frappr is an interesting way of showing the geographic locations of people that share a common interest. It's based on Google Maps and of course there is MySQL Users Group, too!

Speaking at the MySQL Users Conference

I will be speaking at the MySQL Users Conference 2006 in Santa Clara on Wednesday the 26th of April.The topic of the session is Web Application Clustering with MySQL. Zak Greant will be co-presenting with me.

MySQL triggers - Accessing the value of auto-increment field?

I would like to set a trigger where upon inserting a new record with permalink set to "myfilename" would become "myfilename-id" where id represents the auto-incremented value of the id field. So I tried:

drop trigger article_filename;
CREATE TRIGGER article_filename BEFORE INSERT ON adoppt.articles2 FOR EACH ROW SET NEW.permalink = CONCAT(NEW.permalink, "-" , NEW.id );



However this creates a permalink of myfilename-0 as the id value was obviously not available.

So I tried changing the above to AFTER INSERT:

CREATE TRIGGER article_filename AFTER INSERT ON adoppt.articles2 FOR EACH ROW SET NEW.permalink = CONCAT(NEW.permalink, "-" , NEW.id );



and got:

#1362 - Updating of NEW row is not allowed in after trigger



So I tried

CREATE TRIGGER article_filename …

[Read more]
Showing entries 41641 to 41650 of 44029
« 10 Newer Entries | 10 Older Entries »