datagen_modify.pl

来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PL 代码 · 共 2,533 行 · 第 1/4 页

PL
2,533
字号
			$current_time = &get_next_time($current_time);			$current_year = &get_next_year($current_year);			$u_current_float = &get_next_float($u_current_float);			$s_current_float = &get_next_float($s_current_float);			$s_time = &get_next_s_time($s_time);			$s_date = &get_next_s_date($s_date);			$datetime = &get_next_datetime($s_date,$s_time);			$timestamp = &get_next_timestamp($s_date,$s_time);			print ($u_int);			#numeric (0) unsigned not null			print ("\t",$u_int);			#numeric (254) unsigned not null			print ("\t",$u_int);			#numeric (0) zerofill not null			print ("\t",$u_int);			#numeric (254) zerofill not null			print ("\t",$u_int);			#numeric (0) unsigned zerofill not null			print ("\t",$u_int);			#numeric (254) unsigned zerofill not null			print ("\t",$s_int);			#numeric (0,0) not null			print ("\t",$decimal);			#numeric (253,253) not null			print ("\t",$u_int);			#numeric (0,0) unsigned not null			print ("\t",$decimal);			#numeric (253,253) unsigned not null			print ("\t",$u_int);			#numeric (0,0) zerofill not null			print ("\t",$decimal);			#numeric (253,253) zerofill not null			print ("\t",$u_int);			#numeric (0,0) unsigned zerofill not null			print ("\t",$decimal);			#numeric (253,253) unsigned zerofill not null			print ("\t",$s_current_float);		#real not null			print ("\t",$u_current_float);		#real unsigned not null			print ("\t",$u_current_float);		#real zerofill not null			print ("\t",$u_current_float);		#real unsigned zerofill not null			print ("\t",$s_current_float);		#double not null			print ("\t",$u_current_float);		#double unsigned not null			print ("\t",$u_current_float);		#double zerofill not null			print ("\t",$u_current_float);		#double unsigned zerofill not null			print ("\t",$s_current_float);		#float			print ("\t",$u_current_float);		#float unsi	gned 			print ("\t",$u_current_float);		#float zerofill 			print ("\t",$u_current_float);		#float unsigned zerofill 			print ("\t",$s_current_float);		#float(0) 			print ("\t",$s_current_float);		#float(23) 			print ("\t",$u_current_float);		#float(0) unsigned 			print ("\t",$u_current_float);		#float(23) unsigned 			print ("\t",$u_current_float);		#float(0) zerofill 			print ("\t",$u_current_float);		#float(23) zerofill			print ("\t",$u_current_float);		#float(0) unsigned zerofill 			print ("\t",$u_current_float);		#float(23) unsigned zerofill			print ("\t",$s_current_float);		#float(24) 			print ("\t",$s_current_float);		#float(53) 			print ("\t",$u_current_float);		#float(24) unsigned 			print ("\t",$u_current_float);		#float(53) unsigned 			print ("\t",$u_current_float);		#float(24) zerofill 			print ("\t",$u_current_float);		#float(53) zerofill 			print ("\t",$u_current_float);		#float(24) unsigned zerofill 										print ("\t",$u_current_float);		#float(53) unsigned zerofill 			print ("\t",$current_date);		#date 			print ("\t",$current_time);		#time 			print ("\t",$datetime);			#datetime 			print ("\t",$timestamp);		#timestamp 			print ("\t",$current_year);		#year 			print ("\t",$current_year);		#year(3) 			print ("\t",$current_year);		#year(4) 			print ("\t",$enum);			#enum("1enum","2enum") 			print ("\t",$set);			#set("1set","2set")			print ("\t",$char_0);			#char(0) unicode## 			print ("\t",$char_90);			#char(90)##				print ("\t",$char_255);			#char(255) ascii##			print ("\t",$char_0); 			#varchar(0)##			print ("\t",$varchar_500);		#varchar(20000) binary##			print ("\t",$varchar_500);		#varchar(2000) unicode##			print ("\t",$char_100);		#char(100) unicode###			print ("\t",$bit);			#Bit(0)##				print ("\n");		}				select ($oldhandle);		close (FILE_INPUT);	}#Next Database "MyIsam"	elsif ( $ARGV[1] =~ /myisam/i )	{# Fifth Table "tb5.txt"		$file = 'myisam_tb1.txt';		open ( FILE_INPUT, ">$file");		$oldhandle = select(FILE_INPUT);			#Data type declarations		$s_int = 0;			$u_int = 0;		srand();	#Write data to file		for ($count=0; $count < $ARGV[0]; $count++)		{			$u_int++;			$char = &get_next_char($count);			$longtext = &get_next_longtext($count);			$tinytext = &get_next_tinytext($count);			$s_int = &get_next_s_int($count,$ARGV[0]);			$decimal = $count. "\." .$count;			print ($char);			#char			print ("\t",$char);			#char binary			print ("\t",$char);			#char ascii			print ("\t",$tinytext);			#tiny text unicode##			print ("\t",$tinytext);			#text			print ("\t",$longtext);			#medium text			print ("\t",$longtext);			#long text			print ("\t",$tinytext);			#tiny blob			print ("\t",$tinytext);			#blob			print ("\t",$longtext);			#medium blob			print ("\t",$longtext);			#long blob			print ("\t",$char);			#binary			print ("\t",&random(127));		#tiny int			print ("\t",&random(255));		#tiny int unsigned			print ("\t",&random(127));		#tiny int zerofill			print ("\t",&random(255));		#tiny int unsigned zerofill			print ("\t",&random(32767));		#smallint			print ("\t",&random(65535));		#smallint unsigned			print ("\t",&random(32767));		#smallint zerofill			print ("\t",&random(65535));		#smallint unsigned zerofill			print ("\t",$s_int);			#mediumint			print ("\t",$u_int);			#mediumint unsigned			print ("\t",$u_int);			#mediumint zerofill			print ("\t",$u_int);			#mediumint unsigned zerofill			print ("\t",$s_int);			#int			print ("\t",$u_int);			#int unsigned			print ("\t",$u_int);			#int zerofill			print ("\t",$u_int);			#int unsigned zerofill			print ("\t",$s_int);			#bigint			print ("\t",$u_int);			#bigint unsigned			print ("\t",$u_int);			#bigint zerofill			print ("\t",$u_int);			#bigint unsigned zerofill			print ("\t",$s_int);			#decimal not null			print ("\t",$u_int);			#decimal unsigned not null			print ("\t",$u_int);			#decimal zerofill not null			print ("\t",$u_int);			#decimal unsigned zerofill not null			print ("\t",$s_int);			#decimal(0) not null			print ("\t",$s_int);			#decimal(254) not null			print ("\t",$u_int);			#decimal (0) unsigned not null			print ("\t",$u_int);			#decimal (254) unsigned not null			print ("\t",$u_int);			#decimal(0) zerofill not null			print ("\t",$u_int);			#decimal(254) zerofill not null			print ("\t",$u_int);			#decimal (0) unsigned zerofill not null			print ("\t",$u_int);			#decimal (254) unsigned zerofill not null			print ("\t",$s_int);			#decimal (0,0) not null			print ("\t",$decimal);			#decimal(253,253) not null			print ("\t",$u_int);			#decimal (0,0) unsigned not null			print ("\t",$decimal);			#decimal (253,253) unsigned not null			print ("\t",$u_int);			#decimal(0,0) zerofill not null			print ("\t",$decimal);			#decimal(253,253) zerofill not null			print ("\t",$u_int);			#decimal (0,0) unsigned zerofill not null			print ("\t",$decimal);			#decimal (253,253) unsigned zerofill not null			print ("\t",$s_int);			#numeric not null			print ("\t",$u_int);			#numeric unsigned not null			print ("\t",$u_int);			#numeric zerofill not null			print ("\t",$u_int);			#numeric unsigned zerofill not null			print ("\t",$s_int);			#numeric(0) not null			print ("\t",$s_int);			#numeric(254) not null			print ("\n");		}		select ($oldhandle);		close (FILE_INPUT);# Sixth Table "tb6.txt"		$file = 'myisam_tb2.txt';		open ( FILE_INPUT, ">$file");		$oldhandle = select(FILE_INPUT);		$enum = 1;		$set = 1;		$s_int = 0;			$u_int = 0;		$int=0;		$s_time = "00:00:00";		$s_date = "1970-01-01";				$current_time = "838:59:59";		$current_date = "1000-01-00";		$current_year = 1901;		$u_current_float = 1.175494351e-38;		$s_current_float = -1.175494351e-38;		srand();	#Write data to file		for ($count=0; $count < $ARGV[0]; $count++)		{			$u_int++;			$char = &get_next_char($count);			$s_int = &get_next_s_int($count,$ARGV[0]);			$longtext = &get_next_longtext($count);			$tinytext = &get_next_tinytext($count);			$decimal = $count. "\." .$count;			$int = &get_next_int($int);			$enum = &get_next_enum($enum);			$set = &get_next_set($set);			$current_date = &get_next_date($current_date);			$current_time = &get_next_time($current_time);			$current_year = &get_next_year($current_year);			$u_current_float = &get_next_float($u_current_float);			$s_current_float = &get_next_float($s_current_float);			$s_time = &get_next_s_time($s_time);			$s_date = &get_next_s_date($s_date);			$datetime = &get_next_datetime($s_date,$s_time);			$timestamp = &get_next_timestamp($s_date,$s_time);			$geometry = &get_next_geometry($count);			$point = &get_next_point($count);			$linestring = &get_next_linestring($count);			$polygon = &get_next_polygon($count);			$geometry_collection = &get_next_geometry_collection($count);			$multipoint = &get_next_multipoint($count);			$multilinestring = &get_next_multilinestring($count);			$multipolygon = &get_next_multipolygon($count);			print ($u_int);			#numeric (0) unsigned			print ("\t",$u_int);			#numeric (254) unsigned			print ("\t",$u_int);			#numeric (0) zerofill			print ("\t",$u_int);			#numeric (254) zerofill			print ("\t",$u_int);			#numeric (0) unsigned zerofill			print ("\t",$u_int);			#numeric (254) unsigned zerofill			print ("\t",$s_int);			#numeric (0,0)			print ("\t",$decimal);			#numeric (253,253)			print ("\t",$u_int);			#numeric (0,0) unsigned			print ("\t",$decimal);			#numeric (253,253) unsigned			print ("\t",$u_int);			#numeric (0,0) zerofill			print ("\t",$decimal);			#numeric (253,253) zerofill			print ("\t",$u_int);			#numeric (0,0) unsigned zerofill			print ("\t",$decimal);			#numeric (253,253) unsigned zerofill			print ("\t",$s_current_float);		#real			print ("\t",$u_current_float);		#real unsigned			print ("\t",$u_current_float);		#real zerofill			print ("\t",$u_current_float);		#real unsigned zerofill			print ("\t",$s_current_float);		#double			print ("\t",$u_current_float);		#double unsigned			print ("\t",$u_current_float);		#double zerofill			print ("\t",$u_current_float);		#double unsigned zerofill			print ("\t",$s_current_float);		#float not null			print ("\t",$u_current_float);		#float unsigned not null			print ("\t",$u_current_float);		#float zerofill not null			print ("\t",$u_current_float);		#float unsigned zerofill not null			print ("\t",$s_current_float);		#float(0) not null			print ("\t",$s_current_float);		#float(23) not null			print ("\t",$u_current_float);		#float(0) unsigned not null			print ("\t",$u_current_float);		#float(23) unsigned not null			print ("\t",$u_current_float);		#float(0) zerofill not null			print ("\t",$u_current_float);		#float(23) zerofill not null			print ("\t",$u_current_float);		#float(0) unsigned zerofill not null			print ("\t",$u_current_float);		#float(23) unsigned zerofill not null			print ("\t",$s_current_float);		#float(24) not null			print ("\t",$s_current_float);		#float(53) not null			print ("\t",$u_current_float);		#float(24) unsigned not null			print ("\t",$u_current_float);		#float(53) unsigned not null			print ("\t",$u_current_float);		#float(24) zerofill not null			print ("\t",$u_current_float);		#float(53) zerofill not null			print ("\t",$u_current_float);		#float(24) unsigned zerofill not null					print ("\t",$u_current_float);		#float(53) unsigned zerofill not null			print ("\t",$current_date);		#date not null			print ("\t",$current_time);		#time not null			print ("\t",$datetime);			#datetime not null			print ("\t",$timestamp);		#timestamp not null			print ("\t",$current_year);		#year not null			print ("\t",$current_year);		#year(3) not null			print ("\t",$current_year);		#year(4) not null			print ("\t",$enum);			#enum("1enum","2enum") not null			print ("\t",$set);			#set("1set","2set") not null			print ("\t",$geometry);		#geometry not null			print ("\t",$point);			#point not null			print ("\t",$linestring);			#linestring not null			print ("\t",$polygon);			#polygon not null			print ("\t",$geometry_collection);	#geometrycollection not null			print ("\t",$multipoint);		#multipoint not null			print ("\t",$multilinestring);		#multilinestring not null			print ("\t",$multipolygon);		#multipolygon not null#geometry not null, point not null, linestring not null, polygon not null, geometrycollection not null, multipoint not null, multilinestring not null, multipolygon not null  			print ("\n");		}				select ($oldhandle);		close (FILE_INPUT);# Seventh Table "tb7.txt"		$file = 'myisam_tb3.txt';		open ( FILE_INPUT, ">$file");		$oldhandle = select(FILE_INPUT);		$u_int = 0;		srand();	#Write data to file		for ($count=0; $count < $ARGV[0]; $count++)		{			$u_int++;			$char = &get_next_char($count);			$longtext = &get_next_longtext($count);			$tinytext = &get_next_tinytext($count);			$s_int = &get_next_s_int($count,$ARGV[0]);			$decimal = $count. "\." .$count;			print ($char);			#char not null			print ("\t",$char);			#char binary not null			print ("\t",$char);			#char ascii not null			print ("\t",$tinytext);			#tinytext not null			print ("\t",$tinytext);			#text not null			print ("\t",$longtext);			#mediumtext not null			print ("\t",$longtext);			#longtext not null unicode##			print ("\t",$tinytext);			#tinyblob not null			print ("\t",$tinytext);			#blob not null			print ("\t",$longtext);			#mediumblob not null			print ("\t",$longtext);			#longblob not null			print ("\t",$char);			#binary not null			print ("\t",&random(127));		#tinyint not null			print ("\t",&random(255));		#tinyint unsigned not null			print ("\t",&random(127));		#tinyint zerofill not null			print ("\t",&random(255));		#tinyint unsigned zerofill not null			print ("\t",&random(32767));		#smallint not null			print ("\t",&random(65535));		#smallint unsigned not null			print ("\t",&random(32767));		#smallint zerofill not null			print ("\t",&random(65535));		#smallint unsigned zerofill not null			print ("\t",$s_int);			#mediumint not null			print ("\t",$u_int);			#mediumint unsigned not null

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?