Showing entries 37481 to 37490 of 44802
« 10 Newer Entries | 10 Older Entries »
MySQL cluster and all dump 1000

So, I had written a while back: “We currently have a DataMemory of 4GB and IndexMemory of 2GB. Based on the crude methods we have to monitor it, I think we are at about 40% capacity.” Boy, I was wrong.

After that post, I started looking at this more in detail because we were considering buying more RAM “just in case”. I figured out how to use the super secret command “all dump 1000″. The command is not documented in the MySQL documentation that I could find. I did find it in the NDB API documentation before writing this post however. Not sure why I could not find it before.

For those that still don’t know how to use it, simply type “all dump 1000″ from your management console. Then check your cluster log files …

[Read more]
New version of XAMPP 1.6.3 for Windows and Linux

The Apache Friends team is proud again to announce a new version of XAMPP for Linux and Windows. The new version of XAMPP includes fresh, green and up-to-date versions of: PHP (5.2.3) and MySQL (5.0.45). In case of Linux we also upgraded phpMyAdmin to the recent 2.10.3.

To all beta testers: Thanks so much for all your hard work!

Get XAMPP 1.6.3 here

Stuff done, Off to Portland...
Harry Potter novel read
Backlog of expense reports done
Backpack packed (including new Nokia N800 toy)

Off to Portland, where I will be at OSCON all week. I'm giving a talk on Thursday:
Extending MySQL, Swiss Army Knife Approach
Jan's Law

I hereby declare what from now on shall be known as “Jan's Law”:

Whenever a discussion about storage systems arises, the proximity of discussing the amounts of adult content that fits onto such systems reaches one.

How to get a Western Digital MyBook Pro Edition II to boot an Intel Mac

I bought a WD MyBook Pro II for my storage and backup needs. The 2x500GB RAID 1 setup provides enough space and safety for me. It is also faster than the internal 2.5" hard drive of my Intel Mac Mini and since Macs can be booted from Firewire drives I thought it'd be a good idea to do just that.

I went to install a fresh copy of MacOS X onto the new drive. The installer happily proceeded and upon reboot, well, the Mini didn't reboot into the new system. The old installation came up. Easy, I thought, just set the correct Startup Volume in the Preferences. No Go.

Luckily, when holding the alt-key while starting up, a Mac shows all available volumes to start OS X from. Relieved, I chose the MyBook volume. A couple of seconds into the startup sequence, the …

[Read more]
OLAP Paradise - WITH ROLLUP

Though this is an age old concept, but after seeing the ignorance factor of many regarding this, I thought of writing a bit about it. ROLLUP is a GROUP BY modifier that adds extra rows to the output which contain summary data. At each level of aggregation the aggregated column is filled with a NULL value.

Let's see a small example. I know the values are too small for the data presented, but just to keep it readable.

   1: mysql> CREATE TABLE `rollup_1` (
   2:   `url` varchar(255) DEFAULT NULL,
   3:   `year` int(11) DEFAULT NULL,
   4:   `country` char(2) DEFAULT NULL,
   5:   `visit` int(11) DEFAULT NULL
   6: ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
   7: Query OK, 0 rows affected (0.01 sec)
   8:  
   9: mysql> SELECT * FROM rollup_1;
  10: +----------------------+------+---------+-------+
  11: | url                  | year | …
[Read more]
print_stacktrace in mysql source code

Mysql AB provides print_stacktrace function inside stacktrace.c.
void print_stacktrace(gptr stack_bottom, ulong thread_stack)

mysqld.cc calls it when segfault happens:
print_stacktrace(thd ? (gptr) thd->thread_stack : (gptr) 0,
thread_stack);

Its basic idea of print_stacktrace is

1. first get current frame pointer fp

take __i386__ for example, fp is
Extended Base Pointer (ebp)

#ifdef __i386__
__asm __volatile__ ("movl %%ebp,%0"
:"=r"(fp)
:"r"(fp));
#endif


+---------+------------------+
| EBP - 4 | local variables |
| EBP | callees EBP |
| EBP + 4 | ret-addr |
| EBP + 8 | parameters |
+---------+------------------+

2. transverse the stack to print the call stack info
/* We are 1 frame above signal frame with NPTL and 2 frames above …

[Read more]
use backtrace to get call stack information (GNU C library)

We can use GNU C lib backtrace functions to get call stack on Linux OS.
int backtrace (void **buffer, int size)
char ** backtrace_symbols (void *const *buffer, int size)
header file:
execinfo.h
in order to get the symbols, we need pass -rdynamic to gcc.
-rdynamic will
pass the flag -export-dynamic to the ELF linker, on targets that support it. This instructs the linker to add all symbols, not only used ones, to the dynamic symbol table.

Limitation: it only works when backtrace is provided in GNU C. It does not work on Mac.


Compile: gcc -o mytrace mytrace.c -rdynamic

Example Result:
Obtained 6 stack frames.
./mytrace(print_trace+0x14) [0x8048724]
./mytrace(dummy_function+0xb) [0x80487b7]
./mytrace(dummy_function_1+0xb) [0x80487a7]
./mytrace(main+0xb) [0x80487c7] …

[Read more]
MySQL replication notes 1: replicating all databases

A couple of weeks ago, a friend asked about replication on MySQL 4.1.7. I’ve worked with replication in the past, just a quick and dirty job on MySQL 5, and soon forgot about it. This time, I wanted to do it on MySQL 4, and make sure I take good notes for my own benefit. If it can help somebody else, all the better. The official documentation is here. It took a little time to wade through it.

The process below is used to replicate all databases on the master to the slave(s). I will talk about replicating only certain selected databases in a future post.

1. At the master server, check if binary logging is on. Use show variables like ‘%bin%’ to check if binary logging is on or not. If it is not on, turn it on by adding log-bin under [mysqld] section in …

[Read more]
Presenting at OSCON 2007

I'll be heading to OSCON 2007 on Tuesday. Unfortunately, my stay will be short as I already have to head back to California on Wednesday evening but I am still looking forward to meeting as many open-source enthusiasts as possible. Our partner MySQL and us (Zend) are hosting a reception together for our friends and users which I'm very much looking forward to. With an overwhelming overlap in our communities I'm sure it'll make for many interesting discussions.

On Wednesday I'll be giving two talks back to back. The first is on Rich Internet Applications & PHP where I'll talk about the state of Ajax + PHP, show a small demo with Zend Framework and talk about some of the things we've got cooking.

After a short break, I'll be giving a talk on security. My goal for that talk is to take a completely different angle on security than what …

[Read more]
Showing entries 37481 to 37490 of 44802
« 10 Newer Entries | 10 Older Entries »