I got news from the MySQL people that my LOAD XML contribution is
added to release 5.2. Check the manual page.
The aim of the contribution is to simplify reading of XML data
into a MySQL database. The LOAD XML command supports three
different xml formats:
- field values as attributes
- field values as tags
- the format produced by the mysql -x command, with the field
name as an attribute and field value as a tag
If the LOAD XML command finds a matching field in the target
table, the value is inserted, otherwise it is ignored. If you
have used the LOAD DATA command (most of us have) you should
recognize much of the functionality, LOAD XML works much the same
way.
Zack Urlocker wrote an article today on InfoWorld titled Serving Two Markets where he comments on Matt Asay’s The open-source community’s double standard on MySQL (which is a piece of work itself) and says:
Part of the issue is that often discussions about the business of open source is seen as a “zero sum game” between community users and paying customers, meaning that in order for one group to benefit, the other group must lose. To me this polarizes the discussion in an unhealthy way.
I have to admit, I haven’t seen it that way at all. And I don’t see why anyone would. When RedHat split into …
[Read more]A
One of the challenges open source companies have is that you serve two distinct markets: your customers as well as non-paying community users. Paradoxically, the non-paying users can be the most vocal and demanding. Matt Asay blogs about this as the "Open Source Community's Double Standard on MySQL." I had not thought about it quite the way Matt has framed the discussion, but his observations ring true to me. Part of the issue is that often discussions about the business of open source is seen as a "zero sum game" between community users and paying customers, meaning that in order... READ MORE
Hi everyone,
this is my first blog entry and my maiden language is french, so,
it is not as easy as it should be. Also, I will never pretend
being a good writer so, be warned. I joined MySQL earlier in July
as a senior consultant and I have created this blog at the
suggestion of Ronald Bradford, a senior consultant on the same
team as I am. I am just back from vacation and I currently flying
to Cupertino CA for a performance tuning and high availability
course. I am rather new to MySQL so I hope to learn a lot,
especially from the performance tuning part. What I really like
from MySQL is the scalability it allows, I don’t know any other
generally available database that allows a similar scaling.
I spend my last week of vacation doing camping with my wife and three daughters at the Oka national park camping near Montreal. It’s a very nice camping in a mature forest maid of large pines and oak trees. I have to say, there are some …
[Read more]Recently I’ve been making more modifications to the MySQL source. Part of making modifications is testing them. For years I’ve been curious why there are both tests and mysql-test sub directories in the source tarballs. Arjen Lentz tells me that tests is old and that mysql-test is the current testing framework. This makes sense since the manual testing pages are all about mysql-test.
Are there plans to clean up the remnants of the old testing framework? What else is there in the tarball that’s outdated and needs to be removed?
Are you getting ready for MySQL 5.1? You should. I know that it's taken a
long way from alpha to beta, but now it is really close to GA.
Really. There is no way it's going to stay beta forever. Very
soon someone in the high management will realize that all the
outstanding bugs were fixed, and MySQL 5.1 is ready for prime
time.
And then, you will have to get used to it. Meaning that there a
lot of stuff that is so attractive, that you will want to explore
the manual in search of guidance.
Let me give you a preview of what's there for you.
- Partitioning
- Better start reading some theory on this stuff. If you have performance problems with huge loads of …
So, if anybody is crazy enough to grab patches from the commits@lists.mysql.com list and try and use them… you may have run into this problem (which I do every few weeks/months): new files aren’t created. That’s right kids, BitKeeper (or at least the post-commit hook that mails out the patches) produces patch files where new files are in a completely different format than GNU patch expects. Not even BK can import these patches (bk import -temail or -tpatch just don’t do it).
So… I present this script - unfuck_bk_patches.pl which once run across a patch that includes new files, allows you to apply it using patch (or, for example, quilt).
I release it under the “sworn at software license”… which means you’re allowed to do anything you want with it as long as at some point you have sworn at computer software for being crappy.
For code segement:
while (fp {
#if defined(__i386__) || defined(__x86_64__)
uchar** new_fp = (uchar**)*fp;
fprintf(stderr, "%p\n", frame_count == sigreturn_frame_count
?
*(fp + SIGRETURN_FRAME_OFFSET) : *(fp + 1));
#endif /* defined(__386__) || defined(__x86_64__) */
fp = new_fp;
++frame_count;
}
As suggested by Paul,
if it is a signal frame, its frame OFFSET is different.
It is defined by SIGRETURN_FRAME_OFFSET.
Since we are going to print stacktrace inside a normal function,
we don't need consider this.
Here, fp (frame pointer) is EBP (Extend Base Pointer) of this
caller. Its content *fp is the EBP of its caller.
That's why we can trace to the stack frame of callers by
using
new_fp = *fp;
The return address of the callee is next to EBP. In this code
segment,
we print *(fp + 1) to …
This is one of those things that seemed extremely difficult and
cumbersome, but turned out to be trivially simple, and relatively
painless. Here is the case:
Using PHP to generate XML documents from a MySQL Database
I am working with a MySQL database storing lots human readable text.
The text takes the form of semi-structured, well-formed XML. This particular
XML-format is based on a very small set of elements borrowed from
HTML and is used mostly for semantic markup of the text.
The XML fragments are fairly small, and not represent an end
product. They are part of a larger unit: ultimately, they are a
part of some document. The final document is not stored as a
whole, because it is conceived and maintained on the level of its
parts: all these individual XML fragments logically form distinct
units.
…