Archive

Posts Tagged ‘new features in mysql 6.0’

New features in MySQL 6.0 - Part I

April 6th, 2009

The following features have been or are expected to be added to MySQL 6.0:

mysqlSupport for additional Unicode character sets: utf16, utf32, and 4-byte utf8. These character sets support supplementary Unicode characters; that is, characters outside the Basic Multilingual Plane (BMP).

BACKUP and RESTORE operation In release 6.0, you can perform backup operation which can include the tables for different storage engines and backup image will still be consistent. for example you dont have to worry about the storage engines you’re using. BACKUP DATABASE aves the data in a consistent backup image with respect to its “validity point.

The validity point combines the backup to the binary log. Restoring a backup can be combined with use of the binary log to accomplish point-in-time recovery. For example If the restore operation is done because data loss has occurred after the backup was made (that is, after the validity point), restored databases can be brought up to the time of data loss by executing the data changes in the binary log between the times when the backup was made and when the data loss occurred.

Performance tuning for faster subqueries and joins, including batched index access of table rows for sequences of disjoint ranges by the MyISAM and InnoDB storage engines.

Enhancements to XML functionality; The command LOAD XML reads data from an xml file into a table and vice versa.

LOAD XML syntax:

LOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE ‘file_name
[REPLACE | IGNORE]
INTO TABLE [db_name.]tbl_name
[CHARACTER SET charset_name]
[ROWS IDENTIFIED BY '<tagname>']
[IGNORE number [LINES | ROWS]]
[(column_or_user_var,...)]

The file_name must be given as a literal string. The tagname in the optional ROWS IDENTIFIED BY clause must also be given as a literal string, and must be surrounded by angle brackets(< and >).

To illustrate how this statement is used, suppose that we have a table created as follows:

USE myDb;

CREATE TABLE employee(
    employee_id INT NOT NULL PRIMARY KEY,
    fname VARCHAR(40) NULL,
    lname VARCHAR(40) NULL,
    created TIMESTAMP
);

Suppose further that this table is initially empty.

Now suppose we have a simple XML file employee.xml, whose contents are as shown here:

<?xml version="1.0"?>
<list>
  <employee employee_id="1" fname="Pekka" lname="Nousiainen"/>
  <employee employee_id="2" fname="Jonas" lname="Oreland"/>
  <employee employee_id="3">
    <fname>Mikael</fname>
    <lname>Ronström</lname>
  </employee>
  <employee employee_id="4">
     <fname>Lars</fname><lname>Thalmann</lname>
  </employee>
</list>

To import the data in employee.xml file into employee table, you can use following statement:

mysql> LOAD XML LOCAL INFILE ‘employee.xml’
->   INTO TABLE employee
->   ROWS IDENTIFIED BY ‘<employee>’;

The ROWS IDENTIFIED BY ‘<employee>’ clause means that each <employee> element in the XML file is considered equivalent to a row in the table into which the data is to be imported.

Now to export the data from table to xml file, use the following command:

mysql –xml -e ‘SELECT * FROM employee’ > employee.xml

The Falcon Storage Engine is deliberately for use within high-volume web serving environment and/or other environment that requires high performance, while still supporting the transactional and logging functionality required in this environment.

Support for extended comments for tables, columns, and indexes.

RESET SLAVE makes the slave forget its replication position in the master’s binary logs. This statement is meant to be used for a clean start: It deletes the master.info and relay-log.info files, all the relay logs, and starts a new relay log.

Summary

I hope you have enjoyed this article. I will be writing next part of this series by next week. Please check back my online journal for the interesting tips and articles about MySql and other latest technologies like Flex 3.0, Java/J2EE,ect.

Source : MySQL Official Site

S.Chandru MySQL , , , , ,