CREATE DEFINER=`root`@`%` FUNCTION `sp_cn`(n_LowerMoney decimal(15,2)) RETURNS varchar(200) CHARSET utf8
begin
Declare v_LowerStr VARCHAR(200) ;
Declare v_UpperPart VARCHAR(200) ;
Declare v_UpperStr VARCHAR(200) ;
Declare i_I int ;
set v_LowerStr = LTRIM(RTRIM(ROUND(n_LowerMoney,2 ) ) ) ;
set i_I = 1 ;
set v_UpperStr = '' ;
while ( i_I <=char_length(v_LowerStr ) ) do
set v_UpperPart = CONCAT( case substring(v_LowerStr,char_length(v_LowerStr) - i_I + 1,1 )
WHEN '.' THEN 'Ôª'
WHEN '0' THEN 'Áã'
WHEN '1' THEN 'Ò¼'
WHEN '2' THEN '·¡'
WHEN '3' THEN 'Èþ'
WHEN '4' THEN 'ËÁ'
WHEN '5' THEN 'Îé'
WHEN '6' THEN '½'
WHEN '7' THEN 'Æâ'
WHEN '8' THEN '°Æ'
WHEN '9' THEN '¾Á'
END,
case i_I
WHEN 1 THEN '·Ö'
WHEN 2 THEN '½Ç'
WHEN 3 THEN ''
WHEN 4 THEN ''
WHEN 5 THEN 'ʰ'
WHEN 6 THEN '°Û'
WHEN 7 THEN 'Ǫ'
WHEN 8 THEN 'Íò'
WHEN 9 THEN 'ʰ'
WHEN 10 THEN '°Û'
WHEN 11 THEN 'Ǫ'
WHEN 12 THEN 'ÒÚ'
WHEN 13 THEN 'ʰ'
WHEN 14 THEN '°Û'
WHEN 15 THEN 'Ǫ'
......
This section is a “How-To
” that describes the basics
for how to plan, install, configure, and run a MySQL Cluster.
Whereas the examples in
Chapter 3, MySQL Cluster Configuration
provide more in-depth
information on a variety of clustering options and configuration,
the result of following the guidelines and procedures outlined here
should be a usable MySQL Cluster which meets the
minimum
requirements for availability and
safeguarding of data.
This section covers hardware and software requirements; networking
issues; installation of MySQL Cluster; configuration issues;
starting, stopping, and restarting the cluster; loading of a sample
database; and performing queries.
Basic assumptions.
This How-To
makes the following
assumptions:
The cluster is to be set up with four nodes, each on a separate
host, and each with a fixed network address on a ty ......
½ñÔçÊÕµ½ÁËMySQLµÄÓʼþ£¬È«ÎÄÈçÏ£º
Ç×°®µÄÕü¾ÈMySQLµÄÖйúÇ©ÃûÖ§³ÖÕߣ¬
Å·ÃË¿ÉÄÜÎÞ·¨Õü¾ÈMySQL,ÖйúºÍ¶íÂÞ˹¿ÉÄÜÊÇÕü¾ÈMySQLµÄÏ£ÍûÖ®ËùÔÚ¡£ÖйúÓµÓÐÇ¿´ó¡¢¶ÀÁ¢ÒÔ¼°×ÔÐŵķ´Â¢¶ÏÖ÷¹Ü»ú¹Ø£¬Òò´Ë£¬ÎÒ±¾ÈËÔÚ´ËÇëÇóÄúµÄ°ïÖú¡£¶ÔÓÚÄúÔÚhttp://www.helpmysql.org/ru/petitionµÄÇ©Ãû£¬ÎÒÃÇÉî±í¸Ðл¡£Èç¹û¿ÉÒԵϰ£¬ÎÒÃÇÐèÒªÄúµÄ½øÒ»²½°ïÖú£º
£¨1£©ÉÌÎñ²¿·´Â¢¶Ï¾Öhttp://fldj.mofcom.gov.cn/index.shtmlÊDz¢¹º·´Â¢¶ÏÉó²éµÄÖ÷¹Ü»ú¹Ø£¬°üÀ¨±¾´Î¶Ô¼×¹ÇÎÄÊÕ¹ºÌ«Ñô΢µç×ӵķ´Â¢¶ÏÉó²é¡£Èç¹ûÄúÕýÔÚʹÓÃMySQL£¬ÄúµÄÒâ¼û½«¶ÔÓÚÉÌÎñ²¿·´Â¢¶Ï¾ÖµÄÉó²é·Ç³£ÖØÒª¡£ÎÒÃDz»ÄÜÏêϸµÄָʾÄú¸ÃÈçºÎÈçºÎ¶ÔÖ÷¹Ü»ú¹Ø·´Ó³Çé¿ö£¬ÒòΪÕâÊDz»Í×µ±µÄ¡£µ«ÊÇÎÒÃÇÈÏΪ£¬Èç¹ûÄúÄܸæËßÖ÷¹Ü»ú¹ØÄúµÄ¹«Ë¾ÈçºÎʹÓÃMySQL£¨Ê²Ã´ÏîÄ¿£¬Ê²Ã´¹æÄ£¡¢Êý¾ÝÁ÷Á¿ÒÔ¼°Ê¹ÓÃÕßÊýÁ¿µÈ£©ÒÔ¼°ÄúÈÏΪ¼×¹ÇÎÄÊÕ¹ºMySQLÖ®ºó»á²úÉúʲôÑùµÄÓ°Ï죬½«»á·Ç³£ÓÐÓá£Èç¹ûÄúÖªµÀMySQLÊǰº¹óµÄ¼×¹ÇÎÄÊý¾Ý¿âµÄÃâ·ÑÌæ´úÆ·£¬¾ÙÀýÏòÉÌÎñ²¿·´Â¢¶Ï¾Ö˵Ã÷½«»áºÜÓаïÖú¡£ÌرðÊÇ£¬ÄúÖªµÀ»òʹÓÃMySQL×÷Ϊ³ïÂ룬»òÉù³Æ½«Ê¹ÓÃMySQL£¬ÒÔ´ËÒªÇó¼×¹ÇÎÄÊý¾Ý¿â½µµÍ¼Û¸ñµÄÇé¿ö£¬ÇëÒ»¶¨ÏòÉÌÎñ²¿ËµÃ÷¡£ÎÒÃÇÏ£ÍûÄúÄÜÖ±½ÓдПøÉÌÎñ²¿·´Â¢¶Ï¾Ö£¬´«Õæ010-65198998¡£¼øÓÚÊ ......
·þÎñÆ÷ÒµÎñÀàÐÍ¶Ô±È ÐÔÄÜÆ¿¾±
DB I/O´ÅÅÌ
ת·¢·þÎñÆ÷ Íø¿¨PPS
¶¯Ì¬WEBǰ̨ CPU
¾²Ì¬WEBǰ̨ Íø¿¨ £¨Á÷Á¿£©
ACIDÔÔò
MYSQL ÒýÇæ
MYISAM ±íËø µÍ²¢·¢Ê¹Óà ·Ç´ØINDEX
INNODB ÐÐËø ¸ß²¢·¢Ê¹Óà ´ØINDEX
½¨±í£º
MYISAM
°´»ñÈ¡µÄÖµÒ»¸ö¸ö´´½¨£¬²»»á½øÐÐÅÅÐò¡£Èç 1£¬aa;13,aa;11,aa ÊäÈ룬ÔÚÊý¾Ý±íÖÐΪ1£¬aa;13,aa;11,aaÈýÌõ¼Ç¼
INNODB
½øÐÐÅÅÐòºó´´½¨¡£Èç 1£¬aa;13,aa;11,aa ÊäÈ룬ÔÚÊý¾Ý±íÖÐΪ1£¬aa;11,aa£¬13,aaÈýÌõ¼Ç¼
ÔÒòÊÇʲô£¿·Ç´ØINDEX¹ØÏµ
²éѯ
IDÊÇINDEX
MYISAM
select count(*) from xxx; ¿ì
ÒòΪÊÇͳ¼ÆÁ¿Áí´æÒ»¸ö ......
PHPеÄÁ¬½ÓMySQL·½·¨mysqli
1. ¿ªÆôPHPµÄAPIÖ§³Ö
£¨1£©Ê×ÏÈÐÞ¸ÄÄúµÄphp.iniµÄÅäÖÃÎļþ¡£
²éÕÒÏÂÃæµÄÓï¾ä£º
;extension=php_mysqli.dll
½«ÆäÐÞ¸ÄΪ£º
extension=php_mysqli.dll
£¨2£©ÖØÐÂÆô¶¯Apache/IIS£¬¼´¿É¡£
£¨3£©ËµÃ÷£ºPHPÐèÒªµ¥¶ÀµÄÎļþÀ´Ö§³ÖÕâ¸öÀ©Õ¹¿â£¬Ò»°ãÔÚPHPĿ¼ÏµÄextĿ¼ÀïÄÜÕÒµ½php_mysqli.dllÎļþ£¨PHP <=
5.0.2 ÖÐÊÇ
libmysqli.dll£©£¬µ±È»£¬ÔÚPHPµÄÅäÖÃÎļþµ±ÖÐÒªÓÐÕýÈ·Ö¸ÏòextµÄÐÅÏ¢£¨extension_dir£©¡£¼ÙÈôÄúµÄPHPûÓÐÕâ¸öÎļþ£¬Äú
¿ÉÒÔÈ¥ÏÂÔØPHP5µÄÔ´Âë°ü¡£ÁíÍ⣬Õâ¸öAPIÀ©Õ¹£¬Ö»ÄÜÔÚPHP5ÒÔÉϰ汾ʹÓá£ÆäËü¾ßÌåÐÅÏ¢£¬Çë¿´ÏÂÃæ¡£
2. mysqliÉí·ÝÖ¤
mysqliÊÇ“MySQL, Improved”µÄËõд£¬¸ÃÀ©Õ¹½öÊÊÓÃÓÚPHP 5¡£ËüÄÜÓÃÓÚMySQL
4.1.1ºÍ¸ü¸ß°æ±¾¡£¸ÃÀ©Õ¹Íêȫ֧³ÖMySQL
5.1ÖвÉÓõļø¶¨ÐÒ飬Ҳ֧³ÖÔ¤´¦ÀíÓï¾äºÍ¶àÓï¾äAPI¡£´ËÍ⣬¸ÃÀ©Õ¹»¹ÌṩÁËÏȽøµÄ¡¢ÃæÏò¶ÔÏóµÄ±à³Ì½Ó¿Ú¡£ÔÚhttp://php.net/mysqli
ÉÏ£¬¿ÉÕÒµ½¹ØÓÚmysqliÀ©Õ¹µÄÎĵµ¡£ÔÚhttp://www.zend.com/php5/articles/php5-mysqli.php ......
PHPеÄÁ¬½ÓMySQL·½·¨mysqli
1. ¿ªÆôPHPµÄAPIÖ§³Ö
£¨1£©Ê×ÏÈÐÞ¸ÄÄúµÄphp.iniµÄÅäÖÃÎļþ¡£
²éÕÒÏÂÃæµÄÓï¾ä£º
;extension=php_mysqli.dll
½«ÆäÐÞ¸ÄΪ£º
extension=php_mysqli.dll
£¨2£©ÖØÐÂÆô¶¯Apache/IIS£¬¼´¿É¡£
£¨3£©ËµÃ÷£ºPHPÐèÒªµ¥¶ÀµÄÎļþÀ´Ö§³ÖÕâ¸öÀ©Õ¹¿â£¬Ò»°ãÔÚPHPĿ¼ÏµÄextĿ¼ÀïÄÜÕÒµ½php_mysqli.dllÎļþ£¨PHP <=
5.0.2 ÖÐÊÇ
libmysqli.dll£©£¬µ±È»£¬ÔÚPHPµÄÅäÖÃÎļþµ±ÖÐÒªÓÐÕýÈ·Ö¸ÏòextµÄÐÅÏ¢£¨extension_dir£©¡£¼ÙÈôÄúµÄPHPûÓÐÕâ¸öÎļþ£¬Äú
¿ÉÒÔÈ¥ÏÂÔØPHP5µÄÔ´Âë°ü¡£ÁíÍ⣬Õâ¸öAPIÀ©Õ¹£¬Ö»ÄÜÔÚPHP5ÒÔÉϰ汾ʹÓá£ÆäËü¾ßÌåÐÅÏ¢£¬Çë¿´ÏÂÃæ¡£
2. mysqliÉí·ÝÖ¤
mysqliÊÇ“MySQL, Improved”µÄËõд£¬¸ÃÀ©Õ¹½öÊÊÓÃÓÚPHP 5¡£ËüÄÜÓÃÓÚMySQL
4.1.1ºÍ¸ü¸ß°æ±¾¡£¸ÃÀ©Õ¹Íêȫ֧³ÖMySQL
5.1ÖвÉÓõļø¶¨ÐÒ飬Ҳ֧³ÖÔ¤´¦ÀíÓï¾äºÍ¶àÓï¾äAPI¡£´ËÍ⣬¸ÃÀ©Õ¹»¹ÌṩÁËÏȽøµÄ¡¢ÃæÏò¶ÔÏóµÄ±à³Ì½Ó¿Ú¡£ÔÚhttp://php.net/mysqli
ÉÏ£¬¿ÉÕÒµ½¹ØÓÚmysqliÀ©Õ¹µÄÎĵµ¡£ÔÚhttp://www.zend.com/php5/articles/php5-mysqli.php ......
package com.google.i_sales.service.data;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import jxl.WorkbookSettings;
import jxl.read.biff.BiffException;
import org.extremecomponents.table.limit.Limit;
import org.hibernate.Criteria;
import org.hibernate.JDBCException;
import org.hibernate.criterion.CriteriaSpecification;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projection;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
import org.hibernate.impl.CriteriaImpl;
import org.springframework.util.Assert;
import org.springside.core.dao.HibernateEntityDao;
import org.springside.core.dao.support.Page;
import org.sprin ......
package com.google.i_sales.service.data;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import jxl.WorkbookSettings;
import jxl.read.biff.BiffException;
import org.extremecomponents.table.limit.Limit;
import org.hibernate.Criteria;
import org.hibernate.JDBCException;
import org.hibernate.criterion.CriteriaSpecification;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Projection;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
import org.hibernate.impl.CriteriaImpl;
import org.springframework.util.Assert;
import org.springside.core.dao.HibernateEntityDao;
import org.springside.core.dao.support.Page;
import org.sprin ......