Showing entries 29063 to 29072 of 44106
« 10 Newer Entries | 10 Older Entries »
MySQL AES Encryption Compatability

So what happens if you want to use the mysql functions AES_ENCRYPT / AES_DECRYPT to handle data encryption, but you might also need to write a tool that takes the encrypted data and accesses or updates it outside of the database? This operation can be hit or miss depending on your library's implementation of how it handles the encryption key passed to the actual encryption function. There is no standard on how this is handled.

AES only defines that it accepts an encryption key of AES_KEY_LENGTH/8 bytes. So for 128 bit encyption you need to give it a 16 byte key.

In mysql you can do:
AES_ENCRYPT('mykey','here is a string to encrypt');

But we just passed it a 5 character string, where does the 16 byte key come from? This is the part that can differ between libraries. MySQL takes your string and converts it like this:

static int my_aes_create_key(KEYINSTANCE *aes_key,
enum …

[Read more]
Fix for Debian/InnoDB Problem

Baron was just writing about problems with the Debian init scripts. The basic problem boils down to /etc/mysql/debian-start running mysqlcheck on every table.

Kolbe Kolbe and Harrison Fisk pointed this  out to me last February, and as a result I re-wrote the debian-start.inc script to only operate on MyISAM tables. Additionally, the default config was changed to turn on the myisam-recover option, so even for the MyISAM tables, all we do is touch the table to get MySQL to recover it if needed. (Which I promise you, you really want if you're modifying MyISAM tables on a production server. Don't do that, really, but that's another issue.) The new process essentiall looks like this:

for table in `select TABLE_NAME from information_schema.TABLES where ENGINE='MyISAM'":
  select count(*) into …
[Read more]
Windows PowerShell command line shell execution policies

Microsoft Windows PowerShell command line shell and scripting language helps IT professionals achieve greater control and productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to more easily control system administration and accelerate automation.

How to set permissions to run PowerShell Scripts?

Microsoft Windows PowerShell command line shell and scripting language helps IT professionals achieve greater control and productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to more easily control system administration and accelerate automation.

Innodb data types mapped to mysql data types

Today, I found the function in Innodb which maps Mysql data types to innodb data types. It is get_innobase_type_from_mysql_type which is located in the file ha_innodb.cc. The function takes an input parameter of type Field from mysql classes. This filed is then analyzed to set an output function paremeter that indicates whether the field is signed or unsigned and then the return value of the function is a macro integer code. The codes are defined in data0type.h as follows:

/*-------------------------------------------*/
/* The 'MAIN TYPE' of a column */
#define DATA_VARCHAR 1
#define DATA_CHAR 2
#define DATA_FIXBINARY 3
#define DATA_BINARY 4
#define DATA_BLOB 5
#define DATA_INT 6
#define DATA_SYS_CHILD 7
#define DATA_SYS 8
#define DATA_FLOAT 9
#define DATA_DOUBLE 10
#define DATA_DECIMAL 11
#define DATA_VARMYSQL 12
#define DATA_MYSQL …

[Read more]
Schedule this Event: MySQL Meetup in Boston

Yes please, schedule this event in your calendar or heck set up an event in your MySQL 5.1 server ;) (yeah yeah, stupid joke). I'll be in Boston next week, Wednesday, February 4th, talking to the MySQL Meetup which will be held at MIT. The topic on hand will be the MySQL 5.1 Event Scheduler. Please come down, I'd love to meet you and talk to you, whether it's about the MySQL Event Scheduler or anything else about MySQL (or PHP or whatever other knowledge that is hidden in my mind).

Here are the details:

Wednesday February 4th - MySQL Meetup - Conference Room 298 in building E40 (Red brick building) The main conference room is right in front of the Elevators on the second floor.  Come by around 6:45-7pm. As I understand it the room is booked until 9pm.

Thanks greatly to …

[Read more]
Mozilla Foundation Report for 2009 Week 4

This is Zak Greant's weekly report on his activities for the Mozilla Foundation from January 19th to 25th, 2009.

Wading through heaps of Mozilla email and feeds last week paid off this week. Instead of worrying about what I hadn't read or wondering where I was duplicating other's work, I was able to focus on program development with most of my effort going into developing the Mozilla Social Movement Program Concept, working on the Mozilla Manifesto Stories experiment and catching up with my peers. At 54 hours, the week was a bit long but I was glad to be able to focus. …

[Read more]
Logging all the queries with MySQL 5.0

With MySQL 5.1, getting and analyzing all the queries hitting the database is very easy even if you don’t have access to the MySQL enterprise Monitor.  You can either activate the general log or, my favourite option, activate the slow query log with a sub millisecond long query time. Long query time below one second is an option introduced in MySQL 5.1. In order to catch all the queries, you will also need to disable the query cache.  The main advantages of the slow query log over the general log is that you have access to more information like the query time, the lock time, the number of rows examined and the number of rows sent back.  All the options surrounding the slow query log in MySQL 5.1 are dynamic so it is easy to turn the logging ON and OFF.  Once you have the queries, tools, like mysqlsla, can be used to anlyzed the queries and group them by type.

All these tips are nice if you are using MySQL 5.1 but what if …

[Read more]
Experimenting with Write Set Replication

During the past year, we have been developing a write set replication system for MySQL/innodb engine, called Galera. Now, our project has reached milestone where we can run benchmarks to get performance metrics and also give out releases for public evaluation. In this blog, I'll give a short introduction to Galera and related projects.

Some Technology
Galera is generic multi-master synchronous replication system, which replicates transaction write sets at the commit time and resolves conflicts by comparing keys in write sets. Replication happens through group communication system, which (among other tasks) defines the order of committing transactions in the cluster. The write sets can carry original SQL statements or for best performance: row based replication events, available in MySQL 5.1 and onwards.

Galera replication method leaves the actual SQL statement processing to happen uninterrupted, and quite close …

[Read more]
Comparisons, Mark's blog on global mutexes

It is not hard to agree with a statement about No new global mutexes!. This has been something we have been preaching since day one when Drizzle was started. I have lost count on how many we have been able to get rid of along the way.

Looking through his blog entry I thought I would comment a bit on some of his points in context for Drizzle:

LOCK_mdl We never had this lock in the first place. It must have been added in the last year. I suspect this is some sort of meta-data lock. If we had a good MVCC in-memory engine sitting around I suspect you could get rid of this lock and similar cache locks (Drizzle's design doesn't currently require this sort of shared information, but we are looking for an in-memory style engine for when we do).

[Read more]
Showing entries 29063 to 29072 of 44106
« 10 Newer Entries | 10 Older Entries »