Showing entries 29026 to 29035 of 44073
« 10 Newer Entries | 10 Older Entries »
Some Tricks used by the Linux kernel

Linux kernel uses a number of advanced keywords, macros, and extensions to C language. Here is a description of some of these keywords, macros and extensions that I found troublesome to understand and had to investigate a little bit in order to understand them.

I have used kernel versions 2.4.18 or 2.6.0 for this tutorial.

maximum number of columns (hard limit)

#define MAX_FIELDS 4096 /* Limit in the .frm file */

I should be able to remove this limitation soon. Although if you come anywhere near it, you probably have already lost (and written your own engine).

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]
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]
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]
Showing entries 29026 to 29035 of 44073
« 10 Newer Entries | 10 Older Entries »