Showing entries 33496 to 33505 of 44799
« 10 Newer Entries | 10 Older Entries »
Splitting flush logs command

Last week I was working with a client that rediscovered a bug where setting expire_logs_days and issuing a flush logs causes the server to crash. It’s MySQL Bug #17733 if you want to have a look. Seeing MySQL crash was enough inspiration to fix something that I and others have wanted to fix in MySQL for years.

Currently a flush logs command tries to flush all of the following logs in order:

  • General Log
  • Slow Query Log
  • Binary Log
  • Relay Log
  • Store Engine Logs (If available)
  • Error Log

The reason I wanted to fix this is because my client was issuing a flush logs to rotate the error log on a server with no replication. The crash was caused by replication. With individual flush logs it’s less likely for this to happen again in the future. People can simply issue a query for the …

[Read more]
Instructions for adding a new Unicode collation
Instructions for adding a new Unicode collation
By Alexander Barkov and Peter Gulutzan
Copyright (c) 2007 by MySQL AB
All rights reserved
[ Previously published as a note on a bug report.]
MySQL offers 42 built-in collations (sets of rules
for comparison and sorting) for the Unicode character
sets utf8 and ucs2. But you can add your own.

We will describe here how to add Vietnamese Unicode
collations. This is intended as an example, so
that you can try out all the steps and then modify
based on your own rules for some other language.
We chose Vietnamse because many people asked for it
via our "Feature Request" option in bugs.mysql.com,
http://bugs.mysql.com/bug.php?id=4745.

There are two ways to add a new collation:
* Change the source code. This is the trickier way,
but it's the only way for pre-August-2007 versions.
* Change the LDML "markup" file. This hasn't been
tested much, but it's simpler, it requires no
recompilation. (LDML stands for …
[Read more]
Some bash aliases to speed up daily tasks
# Enable some colors
alias ls="ls -G"
# Gimme details and size in KB, MB or GB, I'm not good reading bytes
alias l="ls -lh"

# SSH aliases
alias moe="ssh moe.warp.es"
# I always misspelled that one 
alias mow=moe
alias ebox="ssh root@ebox"
alias amedias="ssh amedias.org"
alias rssh="ssh -l root"

# Git alias
ci="git ci" # Formerly svn ci
# Jump to github from repository
alias github="git config -l | grep 'remote.origin.url' | sed -n \
's/remote.origin.url=git@github.com:\(.*\)\/\(.*\).git/https:\/\/github.com\/\1\/\2/p' \
| xargs open"

# MySQL
alias myserver="sudo /usr/local/mysql/support-files/mysql.server"

# Start webserver on localhost:8000 sharing current directory
alias webshare='python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"'

# Rails server
alias ss="./script/server"
alias sss="screen ./script/server"
alias sr="screen -r"
My materialized view stored procedures for MySQL have been OKed for release.

AdBrite has signed off the release of my materialized view maintenance stored procedures under the GPL. LGPL is also an option, and I'm curious as to which you feel is more appropriate for a set of stored procedures that are never rendered into bytecode, or technically linked with other source. Is GPL acceptable or is LGPL more appropriate?

I am waiting on the approval of a sourceforge project to release the source code. Over the weekend I put together a series of web pages for the project, which I plan to call 'Flexviews for MySQL' which will also be hosted on sourceforge.

Using Sphinx for Non-Fulltext Queries

How often do you think about the reasons why your favorite RDBMS sucks? Last few months I was doing this quite often and yes, my favorite RDBMS is MySQL. The reason why I was thinking so because one of my recent tasks at Scribd was fixing scalability problems in documents browsing.

The problem with browsing was pretty simple to describe and as hard to fix - we have large data set which consists of a few tables with many fields with really bad selectivity (flag fields like is_deleted, is_private, etc; file_type, language_id , category_id and others). As the result of this situation it becomes really hard (if possible at all) to display documents lists like “most popular 1-10 pages PDF documents in Italian language from the category “Business” (of course, non-deleted, …

[Read more]
The Week Before

The end of May - such a lovely time of the year and a bit of a hell for each and every student. But this year it is completely different for me in the way I was selected for GSoC (omg still cannot believe I was). Anyway it is exactly one week left before the coding for GSoC 2008 starts. The right time to analyze what has been done so far and what should be done during the summer.
The first step that I took the day I was selected I started reading the MySQL documentation. No way! I let myself to relax and enjoy the life for a few days. And after that the work on the project started. And there are few things that i just have to point out. The most important one is when you start hacking into something large and new for you is a proper documentation. From this point of view MySQL documentation is just a perfect example of how things should be done. You can find almost everything related to MySQL server under …

[Read more]
More MySQL idiocy, or "Why does INFORMATION_SCHEMA fail to show information about TEMPORARY tables?"

This problem is "documented" in two bugs:
http://bugs.mysql.com/bug.php?id=36073
http://bugs.mysql.com/bug.php?id=20001

Why in the world is this just a "documentation fix"? There have been a number of occasions when I've tried to write generic stored procedures that might want to analyze information about temporary tables. For instance, given a SELECT statement, I want to determine what datatypes each select clause produces. A fairly straightforward way to do this might be to run a "create temporary table xyz as (SELECT ... LIMIT 0), to produce an empty temporary table to analyze. This doesn't work however, because there isn't any information on xyz in the information schema! Worse, SHOW statements don't work as a PREPARED STATEMENT so there isn't any way to determine this information in …

[Read more]
Where is 1.3?

I know many of you may be wondering why Cool Stack 1.3 isn't out yet, so I thought I'd post an update on where we are with the release. When I first started talking about this, I was hoping to get the release out in early May. But several things have colluded to cause a delay.

  1. We took on a lot for this release. Although just looking at the proposal, it may seem like a simple matter to just update the versions of the various components, underneath the hood, we decided to do a lot more streamlining of the build and packaging process.  Since so many version updates were involved, that also meant more legal approvals.
  2. We have a more formal QA process for this release (and for future releases). The good news is that this means we will have a more quality release, but the bad news is that it now takes more time as we have to …
[Read more]
Technical Podcasts I Listen To

There are a few podcasts I tend to listen to as I have time. Since I work with a wide range of technologies, I've tried to group them together into a semblance of order. There are a few others I am evaluating, but since I haven't listened to a large enough body of work, I'll refrain from listing them at this time. If there's one you think is particularly valuable or interesting that I don't have listed, please leave it in the comments.

.NET

.NET Rocks - http://www.dotnetrocks.com/

This is one of the best done podcasts out there and they cover anything and everything related to Microsoft .NET. That's a broad brush of most anything that interacts with Microsoft technologies. This one runs twice a week and is about an hour each podcast, but if you can spare the time, it's worth the listen.

Plumbers @ Work - …

[Read more]
Variable's Day Out #12: innodb_flush_method

Properties:

Applicable To InnoDB on Unix like OS
Server Startup Option --innodb_flush_method=<value>
Scope Global
Dynamic No
Possible Values enum(O_DSYNC, O_DIRECT, <<none>> )
Default Value <<none>>
Category Performance

Description:

This variable changes the way InnoDB open files and flush data to disk and is should be considered as very important for InnoDB performance. By default, InnoDB uses …

[Read more]
Showing entries 33496 to 33505 of 44799
« 10 Newer Entries | 10 Older Entries »