Showing entries 33316 to 33325 of 44871
« 10 Newer Entries | 10 Older Entries »
How to concatenate strings in a mysqltest testcase

Hi Magnus, is there a way to concatenate strings in a mysqltest?
=================================================================


Yes, you can "easily" create more dynamic strings using let and a while loop. For example like this:


let $c= 254;
let $str= t255;

while ($c)
{
let $str= t$c,$str;
dec $c;
}
echo $str;



This will printout t1, t2, t3, ... t255.


You can then use the $str variable in an eval
to CREATE TABLE, VIEW or SELECT


eval CREATE TABLE t0 (a INT) ENGINE=MERGE UNION($str);
Memo: Binary Logging of MySQL from the viewpoint of storage engine
  • two formats: statement-based and row-based
    • can be mixed
    • 5.1 supports both
  • statent-based logs record UPDATE,INSERT,DELETE queries
  • row-based logs store internal buffers passed to `handler' class
  • storage engines may declare HA_HAS_OWN_BINLOGGING and write to binlog directly
    • however, it becomes impossible to log multitable updates
    • what happens if the storage engine supports transaction?
  • handling of auto_increment
    • when using statement-based logs, lock for auto_increment value should be held until a query completes
    • when using row-based logs, an auto_increment column can be updated and stored to log one row by row by directly updating ``uchar record[]''

For myself, since …

[Read more]
replicants

I found myself with some spare time the other day and decided that my current mysql backup strategy is not the best in the world. The mysql server is a virtual machine in a Brisbane datacenter and it's backed up via a script that calls mysqldump on each installed database and dumps the content to (compressed) files. These files then get sucked down via rdiff-backup.

This is fine in principle, but does mean it's possible for me to lose 24 hours worth of data due to an accidental '--; DROP table students.

A more ideal way would be for the remote sql server to replicate to a local one, on which I can run mysqldump more often without affecting web site performance. (Replication would replicate the DROP table statement too.. :-)

With a bit of a confluence of attending three days of OpenQuery mysql training and needing to regenerate all ssl keys, I thought I should …

[Read more]
replicants

I found myself with some spare time the other day and decided that my current mysql backup strategy is not the best in the world. The mysql server is a virtual machine in a Brisbane datacenter and it's backed up via a script that calls mysqldump on each installed database and dumps the content to (compressed) files. These files then get sucked down via rdiff-backup.

This is fine in principle, but does mean it's possible for me to lose 24 hours worth of data due to an accidental '--; DROP table students.

A more ideal way would be for the remote sql server to replicate to a local one, on which I can run mysqldump more often without affecting web site performance. (Replication would replicate the DROP table statement too.. :-)

With a bit of a confluence of attending three days of OpenQuery mysql training and needing to regenerate all ssl keys, I thought I should …

[Read more]
Confusing MySQL Replication Error Message

I already wrote about some MySQL Error Messages which are confusing, here is one more:

PLAIN TEXT SQL:

  1. 080603 20:53:10 [Note] Slave: connected TO master 'repl@host.com:3306',replication resumed IN log 'master-bin.003676' at position 444286437
  2. 080603 20:53:10 [Note] Slave: received end packet FROM server, apparent master shutdown:
  3. 080603 20:53:10 [Note] Slave I/O thread: Failed reading log event, reconnecting TO retry, log 'master-bin.003676' position 444292333
  4. 080603 20:53:10 [Note] Slave: connected TO master 'repl@host.com:3306',replication resumed IN log 'master-bin.003676' at position 444292333
  5. 080603 20:53:10 [Note] Slave: received end packet FROM server, apparent master shutdown:
  6. 080603 20:53:10 [Note] Slave I/O thread: Failed reading …
[Read more]
What Does Open Source Mean?

At last night’s event, a lot of the questions were really implicitly asking, “Is open source better? Why?”

The first answer everyone comes up with is that it’s free, and that’s better.

However, that is neither necessary nor sufficient to deem it “better”.

If MySQL did exactly the same tasks Oracle did, but was free, there’s still a huge amount of money involved when migrating. Merely staffing the migration costs a lot of money.

Companies using open source technologies because they are free are (probably) making the right software choice for the wrong reason.

Firstly, open source does not have to be free — MySQL proves that. Their Enterprise source code is free to paying customers (and whoever paying customers distribute to, but that is not the issue).

Secondly, open source’s benefits far outweigh mere license costs, though the license cost is definitely the most tangible …

[Read more]
MySQL Focuses on Community

Post Summary: An apology with a lesson.

When Steve Curry contacted me just after the MySQL Conference and Expo asking me if I’d be interested in a community roundtable, I was excited. Not just because Steve Curry brought me an inflatable pink dolphin after I squee‘d that I needed one, although I never forget when someone does me a favor.

However, a few weeks ago it seemed like the event was more of a PR gathering than a community roundtable. I was disappointed, and told Steve as much.

And then, one of two things happened:

1) My concerns were brought up, discussed and folks decided a roundtable involving community was a good idea;
or
2) I had come up with two different pictures of the event in my mind, based on my expectations of “community roundtable” at first and “event with businesses and PR, to include …

[Read more]
Horizontal Scaling with HiveDB

At the MySQL Conference & Expo 2008, Britt Crawford and Justin McCarthy, both from Cafepress.com, gave us a very interesting talk on scaling with HiveDB. I took a few notes (pasted below), their slides are online (warning: 6.1MB PDF), and if you’re after their abstract its available as well.

I also took a video of them (refer to Slide 12, for the IRC conversation):

The quick notes:

  • OLTP optimised (as it serves cafepress.com)
  • Cannot lock tables, or take it offline
  • Constant response time is more important than low latency (little slower query is ok, just not exponentially …
[Read more]
Competence reversed: sales vs technical

Just ran into the weirdest case... a client was outsourcing some of its sysadmin stuff, and in this instance their task was to set up a couple of new servers which were going to run MySQL, hence my involvement. So I was present at a meeting where this company was represented by two very capable people - they were clearly technically very clued in.

All good so far. But the actual work done by the company was... bad. 32-bit OS install on 64-bit hardware, not providing documentation on some specific setup aspects, that kind of "fun". Cause? The people I met were actually sales, and not the same as those involved in the execution of the plans. The result is a rather curious and sad story, where sales is for once more competent than technicals in the same company. Oh dear!

Open Source - The Foundation of Civilization

Almost 2 years ago, in How Open Do You Have To Be To Be Open Source? I wrote:

Google and Yahoo! are not rich because they have secrets. They are rich because they started with secrets, but I believe they could safely let their secrets out with very little loss of revenue.

Matt Asay’s recent post Google’s slow transformation into an open, transparent company made me dig up that post, which by many standards is old in terms of time, but it’s only now that some of this change is actually happening.

Matt ponders,

It remains to be seen what, if anything, Google will actually open, but I trust its track record on living up to its word more than Microsoft’s, which also went through a flurry of …

[Read more]
Showing entries 33316 to 33325 of 44871
« 10 Newer Entries | 10 Older Entries »