Showing entries 40873 to 40882 of 44092
« 10 Newer Entries | 10 Older Entries »
Do you MySQL 5? (.0.21)

Knoppix 5.0.1 available:
It looks quite nice, although some of the packages are very up to date and others are quite old. MySQL comes with 5.0.21, so there’s probably no distribution with a more recent MySQL version at the moment.

No Markus, Ubuntu 6.06 Dapper actually comes with 5.0.21 just as well. On June 1. And with their new Casper system, the CD you download is actually a LiveCD and an Install CD all rolled into one! 5.0.22 is a security release, for what its worth…

Get In The Middle Of A Chain Reaction! Part One

After reading about recursion and stack frames, I decided that I'd re-implement a computer strategy game. This fun game has various implementations and various names, including Chain Reaction and Atom Smasher. However, few, if any, have implemented a network version with the game logic written in MySQL stored procedures.

This strategy game is addictive, hard to describe and simple to play. The board consists of a number of territories. The objective is to win all of the territory. Players gain territory by placing counters in territories, one per turn. Once a territory is claimed by a player, a competing player cannot claim the territory directly. Instead, when a player's turn causes counters to exceed the number of adjacent territories then counters are redistributed among adjacent territories and the adjacent territory is gained by the player. (In some …

[Read more]
InnoDB thread concurrency

InnoDB has a mechanism to regulate count of threads working inside InnoDB.
innodb_thread_concurrency is variable which set this count, and there are two friendly variables
innodb_thread_sleep_delay and innodb_concurrency_tickets. I'll try to explain how it works.

MySQL has pluginable architecture which divides work between mysql common code
(parser, optimizer) and storage engine. From storage engine's point of view it works how
(very simplified):
mysql calls storage engine's methods:

read_row (there are a couple of methods like read by index or sequential read or random read);
write_row;
update_row;
delete_row;

At start of each of these methods InnoDB checks count of already entered threads,
and if this count is over innodb_thread_concurrency then the thread …

[Read more]
Wrestling the Anaconda

I’ve decided to affectionally call the MySQL Workbench Product “The Anaconda”. It’s been a wrestle so far to get all the features and functionality I wanted in this product. Of course I’d much rather have seen this product at say version 0.5, or 0.6, as I would not feel as guilty towards my comments of a 1.0 product when I’m having issues. I also have great respect for Mike Zinner and this small team of GUI developers that are developing and supporting the MySQL GUI products. Nevertheless, here is my latest round of analysis of the product across various platforms.

Hardware

Machines

  1. Dell Inspiron 5150 P4 3.2GHz 1GB RAM, 80GB & 120GB HDD
  2. Generic Desktop PIII 866MHz
  3. Dell Inspiron 500 PIII 600MHz

Operating Systems

For the purposes of these tests I’m going to run multiple OS’s installed on seperate drives to attempt to isolate and reproduce …

[Read more]
In Korean...

In Korean there is no such word as "Federated". I learn this while having to help the translator here translate my slides :)

The closest word in Korean is the term "merge".

In MySQL a "merge" table though is nothing like a "federated" table.

Oy Veh!

Korea thus far...

Landed last night in Seoul and got a ride into the city with a few
others who are speaking at Linux World Korea. I have a Keynote to do
today on the State of the Dolphin (aka MySQL) at the Confernce.
Thanks to my normal lack of need to sleep I decided to go walking at
6AM to see the city. Seoul is north enough to already be light out at
that time of day so I could see everything, and at not deal with
large crowds. Across from the hotel is the Buddhist temple of
Bongeunsa, and I spent a couple of hours walking through it. Its a
pretty amazing place, the art work and detail in the temples are
impressive.

The odd point in the adventure? Having a Buddhist monk come up to me
while I was in a temple and give me what turned out to be four pounds
of steamed rice with beans baked all around it. I wasn't sure
exactly what it was till I got back to the …

[Read more]
Sudoku solver

Sudoku solver

There are probably tons of these already available, but here is a quick sudoku solver (in Perl):

#! /usr/bin/perl

# Example:
#
# echo $'      2  \n  1 9  4 \n 2 1 5  9\n3     6  \n  68 41 5\n  427 8  \n   51    \n     7 3 \n79    5  '| perl sudoku-solve.pl
#

use strict;
use warnings;

my $s = read_sudoku();

my $res= solve($s);

if($res) {
  print_sudoku($res);
  print "Got it!\n";
} else {
  print "Failed :-(\n";
}

exit 0;

sub solve {
  my ($s)= @_;

  my $res= try_solve($s);

  return $s if $res eq 'SOLVED';

  return undef if $res eq 'FAIL';

  # Make a guess, backtracking if we were wrong.
  # Try to find some field where there are only two possibilities.
  my ($a, $b);

 OUTER:
  for my $i (0..8) {
  INNER:
    for my $j (0..8) {
      next INNER if keys(%{$s->[$i][$j]}) == 1;
      if(keys(%{$s->[$i][$j]}) == 2) {
        ($a,$b)= ($i,$j);
        last OUTER;
      } elsif(!defined($a)) {
        ($a,$b)= ($i,$j);
      } …
[Read more]
Some thoughts on indexes & searching in MySQL / PHP

Using MySQL most of you will be familiar with this: searching in textfields for keywords is quite uncomfortable when using other table handler then MyISAM. If you use MyISAM, you can utilise the Fulltext-Search with MATCH … AGAINST. Otherwise you are thrown back to “simple” string comparison functions (LIKE). Not really satisfying. As this won’t [...]

InnoDB page size

As maybe you know InnoDB uses hard page size 16Kb for datafiles and for buffer pool.
However this size can be changed if you need it for your workload.

go to file innobase/include/univ.i, lines:


/* The universal page size of the database */
#define UNIV_PAGE_SIZE (2 * 8192) /* NOTE! Currently, this has to be a
power of 2 */
/* The 2-logarithm of UNIV_PAGE_SIZE: */

#define UNIV_PAGE_SIZE_SHIFT 14

UNIV_PAGE_SIZE is page size (as you see - default value 16Kb). Possible values for UNIV_PAGE_SIZE is 8K, 16K, 32K, 64K. You also have to change UNIV_PAGE_SIZE_SHIFT (according comment it must be 2-logarithm of UNIV_PAGE_SIZE).
For pagesize 8K - UNIV_PAGE_SIZE_SHIFT=13, for 32K - UNIV_PAGE_SIZE_SHIFT=15 and so on.

How I work

My work life is really fragmented at present, so I’ve decided a split approach in answer to Dave Rosenberg’s How I Work–what I have learned so far .

What is your role?
What is your computer setup?
What desktop software applications do you use daily?

CentOS 4.3
FireFox 1.5, ThunderBird 1.5, Gaim, SSH, Skype, Open Office 2.
Maybe not all of these every day, but some combination of each day –> MySQL 4.1, MySQL 5.0, MySQL 5.1, MySQL Workbench, Eclipse 3.1, J2DK 1.4.2, J2DK 5.0, Apache Tomcat 5.0.28, Apache Httpd 2.0.53, JMeter.

Presently also configuring a new laptop drive running …

[Read more]
Showing entries 40873 to 40882 of 44092
« 10 Newer Entries | 10 Older Entries »