Showing entries 37496 to 37505 of 44810
« 10 Newer Entries | 10 Older Entries »
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]
My Blog is moving!

I'm moving my blog from http://gnu.inter.it/blogs/ilcorra/archives/cat_mysqlen.html to http://blog.pandiani.com

My new MySQL related XML feed is http://blog.pandiani.com/category/mysqlen/feed

Please update your links

Thanks

Complete set (an alternative solution)

Scott Noyes wrote about a question frequently asked in for instance the freenode #mysql channel: given a table with students and answers, which students have answered all of a certain set of questions.

While his solutions are interesting, they do indulge a bit. And I'm not even referring to the fact that he uses obscure string and bit functions... he can do that if he wants to ;-) But it's a relatively simple problem that just does not need such (potentially inefficient) constructs.

For starters, it'd be good to have a WHERE clause, because even if there are many more questions in the table, you only need the As and Bs. You never want to use the HAVING as a replacement for WHERE, because having chucks away already retrieved rows from the result set, while WHERE limits what is retrieved in the first place.

Also, while it's very good to …

[Read more]
My Computer in 2012

As we get close to the 1.0 release of our opentaps Open Source ERP + CRM system, I've been trying very hard to think about what future versions will do.

The immediate future is pretty easy to see: we have a good system for bringing together processes and data in a company. We can easily extend it to meet the needs more of more companies and industries. We'll also be adding tools for data analysis.

But what should opentaps 4.0 do? And how should it do it?

This is hard for me to see right now, but I could envision how future computers in general should work, so I'm going to jot down a few notes to help me think later:

In 2012, my computer is the size of a credit card. I'll take it with me wherever I go and turn it on either using a scan of my eye or my thumb. It comes with no monitor and no keyboard, but once turned on, it will project a …

[Read more]
Trust the docs, except when they are wrong

I've been getting quite a few reports that my 5.0 and 5.1 installers don't work on Vista.  The reports all say that near the end of the install, it errors out with an error code of 2869. 

As a side note, I have yet to have an MSI error code that had a description that I  understood.  The description is almost always something like 'The transaction failed to start'.  These descriptions don't tell me anything.  But I digress.

This 2869 issue was hard to reproduce and very random.  After some work I found a 32 bit Vista machine that showed the problem.  With some trial and error and installutil style debugging I discovered that the problem was in my custom installer class.  Inside the MySql.Data assembly, we have a custom installer class that does two things.  First it adds the assembly to the system's machine.config file and then it adds a couple of performance counters.  …

[Read more]
5.1.20 Gotcha - The MySQL Error Log

While using the latest MySQL 5.1.20 yesterday I came across another situation that was not expected as with previous editions of MySQL. The background is experimenting with DRBD. When I configured MySQL to startup with a /etc/my.cnf file with data on a DRBD partition I got a failed startup error message with mysqld_safe.

$ bin/mysqld_safe &
[1] 12615
070720 10:10:42 mysqld_safe Starting mysqld daemon with databases from /drbd/data
070720 10:10:42 mysqld_safe mysqld from pid file /drbd/data/newyork.localdomain.pid ended

Ok. Well this happens so I went to the data directory to look for `hostname`.err.

$ cd /drbd/data
$ ls -l

What the! There is no error log. Then the discussion started about this. Apparently mysqld_safe now uses syslog (e.g. /var/log/messages) for logging messages. Ok, but where is the line between mysqld_safe and mysqld. …

[Read more]
Busy Week Ahead

The next couple days are gonna be a busy time here @ Zimbra.

July 22 - Ubuntu Live :: Collaboration in an Open World
"This session will explore the current problems with enterprise email, how the community can help fix it, how to leverage open source in mobilizing corporate email, and what's in store for the future of email."

http://www.ubuntulive.com/cs/ubuntu/view/e_sess/13492
Speaker: J.J. Zhuang, Server Architect


July 26 - The AJAX Experience :: Taking Large Browser-based Applications Offline
"How Zimbra managed to integrate several open source projects, including Tomcat, Jetty, Jakarta, MySQL and Firefox, to create an architecture for offline Ajax applications. "

[Read more]
Who builds this stuff?

No matter what system you run there are areas that just don't make any sense.  I love Visual Studio and will argue with anyone that it's the best way to develop traditional platform applications.  That being said, it's help system is quite ridiculous.

You would think that a company that is so focused on developer productivity would make it trivial to integrate third-party documentation.  The pages of the documentation are all just HTML files.  Each documentation package might contain some indexes but on the whole it's just HTML.  Here's an idea.  Just make the help format a zip archive and inside this zip you layout the HTML in whatever tree structure you like.  Include whatever scripts, CSS, or binary content you like.  Any top level pages that should not appear in the TOC can be listed in some .exclude file.  There can be a file that lists the name to file indexes.  All of this could then …

[Read more]
Showing entries 37496 to 37505 of 44810
« 10 Newer Entries | 10 Older Entries »