ERROR 1114: The table ‘big_table_a’ is full

在新闻组上看到的关于mysql cluster的问题:

[@more@]

At us is 1 MGM node and 4 DB nodes! 
Each of 5 computers have 1Gb operative memory! 
We have created 3 SQL a file (everyone on 900Mb) 
each of which has consisted of 10 000 000 lines 

insert into big_table_a set a1='213123', a2='123123', a3='213124', 
a4='234234';
insert into big_table_a set a1='213123', a2='978433', a3='234234', 
a4='2535623';
............................

Through API node we have started this SQL a script with the help of a 
command 

source data1.sql;
source data2.sql;
source data3.sql;

When in a database already has entered the name more than 
14 000 000 lines MySQL Cluster has given out the following mistake: 

ERROR 1114: The table 'big_table_a' is full

回复:

If your big_table has a primary key it will be using up your index_memory in
a short time.
Also, you may want to disconnect/reconnect while inserting all the data.
To understand what your memory is used for you should read:
http://dev.mysql.com/doc/mysql/en/MySQL_Cluster_DB_Definition.html
(datamemory and index memory part). 

Generally 1gig of memory is not a lot. I have the same setup but with 2gigs
of ram in each machine and I have experienced the same problems.

What datatypes are the columns in your table?
You can calculate the amount of memory that your table takes up and find out
if you have enough space.

mysql cluster安装笔记

经过两天的配置安装翻阅文档,终于成功的配置了两台装有mysql的机器为cluster,总结要点如下:

1.db节点不需要启动mgm服务
2.db节点的my.cnf需要额外加上ndb-connectstring参数,指向mgm服务器
3.可以用mgm服务器的ndb_mgm程序观察各节点的状态,方法: echo show | /usr/local/mysql/bin/ndb_mgm
4.config.ini的NoOfReplicas参数指明了每个db组的节点数,如果设置为2,则每组的db节点数为2,mgm服务器自动顺序分配组
5.每个db组至少要有一个db节点连通,否则整个cluster会停机
6.db节点启动ndbd时候,要指定connect-string到mgm服务器
7.db节点的启动步骤: a.启动ndbd b.启动mysql服务
8.mgm节点的启动步骤: a.启动ndb_mgmd b:启动ndbd c:启动mysql服务
9.建表时需要指明engine=ndbcluster,才会利用cluster功能储存;普通的建表方式仍然支持.

这里是之前看的安装步骤,但是有些错误的说

[@more@]

使用action script viewer 4反编译swf文件

步骤如下:

1.用asv打开.swf文件

2.选择export rebuild data (jsfl)

3.到导出目录用flash mx 2004新建一个fla文件,将所有的.swf,.mp3…导入到库,完成后另存为rebuild.fla

4.双击rebuild.jsfl进行反编译

5.保存,收工

[@more@]

phpCodeBeautiful与editplus结合改进

有人提议使用phpCodeBeautiful的命令行,看这里:超链接地址http://club.phpe.net/index.php?act=ST&f=2&t=3701

在此基础上俺进行了修改,适合自己使用:

pcb.bat

代码片段:


set phpcb_path="F:Program FilesphpCB"
%phpcb_path%phpCB.exe -space-after-if -space-after-switch -space-after-while -space-before-start-angle-bracket -space-after-end-angle-bracket -glue-amperscore -change-shell-comment-to-double-slashes-comment -force-large-php-code-tag -force-true-false-null-contant-lowercase --comment-rendering-style PEAR -align-equal-statements-to-fixed-pos -indent-with-tab -optimize-eol -align-equal-statements --padding-char-count 1 %1 > %TEMP%phpcbTemp.php
move /Y %TEMP%phpcbTemp.php %1

利用xampp将apache和tomcat整合

xampp可以将apache+php+mysql+phpmyadmin一次性自动安装完成,很适合快速搭建测试服务器.它也提供了tomcat的插件,可以很快的搭建jsp开发环境.

以俺在winxp安装为例:
1.在http://www.apachefriends.org/en/xampp-windows.html下载XAMPP,推荐下载EXE (7-zip) 打包的xampp,这个个头比较小,部署的时候也比较灵活.
2.在同一页面下载tomcat插件,同样选择7-zip
3.解压xampp的压缩包到你指定的目录,例如d:xampp
4.运行setup_xampp.bat,至此,xampp安装完成
5.解压tomcat插件到xampp目录,运行setup_java.bat即可将tomcat插件安装完毕

现在一个php+jsp的快速开发环境已经搭建好了.

附上tomcat的配置(详细信息见Readme):
Tomcat Server Home = .xampptomcat
Tomcat URL = http://localhost:8080
Tomcat Doc Root = .xampptomcatwebapps

JSP example Root = .xampptomcatwebappsjsp-examples
JSP example URL = http://localhost/jsp-examples/

Servlets example Root = .xampptomcatwebappsservlets-examples
Servlets example URL = http://localhost/servlets-examples/

Mod_jk java Root = .xampptomcatweppappsjava
Mod_jk java URL = http://localhost/java/

倘若你想建立更多的映射,那么就需要自行修改.xamppapacheconfworkers2.properties文件

[@more@]

好久没玩flash

抓紧时间操练了一把,用下面代码作了一个粉简单的坦克控制:)

[actionscript]
class Move extends MovieClip {

private var speed = 3;
private var xMin = 0;
private var yMin = 0;
private var xMax = 400;
private var yMax = 400;

public function onLoad(){
Key.addListener(this);
this.xMin += this._width/2;
this.xMax -= this._width/2;
this.yMin += this._height/2;
this.yMax -= this._height/2;
}

public function onEnterFrame(){
if( this._x < this.xMin ){ this._x = this.xMin; } if( this._x > this.xMax ){
this._x = this.xMax;
}
if( this._y < this.yMin ){ this._y = this.yMin; } if( this._y > this.yMax ){
this._y = this.yMax;
}
}

public function setSpeed(speed:Number){
this.speed = speed;
}

public function onKeyDown(){
switch(Key.getCode()){
case 83: // s
this._rotation = 180;
this._y += this.speed;
break;

case 65: // a
this._rotation = -90;
this._x -= this.speed;
break;

case 68: // d
this._rotation = 90;
this._x += this.speed;
break;

case 87: // w
this._rotation = 0;
this._y -= this.speed;
}
}

private function onRelease(){
trace(’test’);
}
}

[/actionscript]