Skip to content

Latest commit

 

History

History
212 lines (183 loc) · 4.29 KB

debug.md

File metadata and controls

212 lines (183 loc) · 4.29 KB

Interface::Input()

create database name1;
create database 
name1;
create      database
name1;
create database
 name1;


;

sql_itp::Create()

  • smatch is a sectionalized 'string' (its size() return 1+n, n is the number of expression in small parenthesis), when debugging with string, remember to assert its size!
  • if we want to create a filefolder, we need to use the DOS cmd. and like that of other file-functions, invocation of system(char * command) receive char * param

in_out

be careful about the param of ostream::write(const char *s, streamsize n).

create database test1;
use test1;

use test1;
create table table1(id int, name varchar(20));
insert into table1 value(1, xiaoming);
insert into table1 value(2, xiaohua);
insert into table1 value(3, xiaoli);

test1

use test1;
select name from table1;

use test1;
select * from table1;

use test1;
update table1 set name = xiaozhao
where id = 3;

use test1;
select* from table1;
delete from table1 where id > 2;
select*from table1;

test2(first full)

create database test1;
use test1;
create table table1(id int, name varchar(20));
insert into table1 value(1, xiaoming);
insert into table1 value(2, xiaohua);
insert into table1 value(3, xiaoli);
select*from table1;
select name from table1 where id > 2;
update table1 set name = xiaozhao
where id = 3;
select*from table1;
delete from table1 where name = xiaoming;
select*from table1;

test3 (excption)

use test1;
select*from table2;
update table1 set value = 1.1 where id = 1;
use test1;
insert into table1 value(1, "xiaoming");
delete from table1 where name = xiaoming;
insert into table1 value(1, 'xiaoming');
insert into table1 values(1, "xiaoming');
insert into table1 values(1, xiaoming);
use test1;
select*from table1;
update table1 set id  = 2 where name = xiaofang;
update table1 set name = 'xiaohua' where name = 'xiaofang';
create database test1;
use test1;
create table table1(id int, name varchar(20));
insert into table1 value(1, 'xiaohua');
insert into table1 value(2, "xiaoh');
insert into table1 value(2, "xiaoh");
select*from table1;
select name, id from table1;
select name id from table1;
update table1 set id = 2 where name = xiaohua;
update table1 set id = 2 where name = 'xiaohong';
update table1 set id = 3 where name = "xiaohua";
delete from table1 where name = 'xiaoh';

test4 (time_cnt & exception more)

insert into table1 value(1, "h");
use test1;
insert into table1 value(1, 'h');
select *from table1;
insert into table1 value(2, 'hh');
select*from table1;
insert into table1 values(3, "hhh");
select * from table1;
insert into table1 value(4, "hhhh");
select * from table1;
insert into table1 value(5, "hhhhh");
select * from table1;
update table1 where id >= 4 set name = 'hhhhhh';
update table1 set name = 'hhhhhh' where id >= 4;
update table1 set id = 6 where name = 'hhhhhh';
update table1 set name = 'ha' where id != 2;
select * from table1;
delete from table1 where name <= "hh";
select* from table1;

delete test:

i have a deep confusion with the initread in the select:

before start table1:

2 3
id 0 3 4 5 
name 20 hhh hhhh hhhhh
1. 
use test1;
select *from table1;
delete from table1 where name <= "hh";
delete from table1 where name <= "hh";
  • bug: the isDelete() function has not enough space, thus, when judging: wrong
  • sln: reserve to resize
2.
use test1;
select*from table1;
delete from table1 where name <= "hh";
select*from table1;
delete from table1 where name <= "hh";

3.
use test1;
delete from table1 where name <= "hh";
select*from table1;

recreate

use test1;
create table table1(id int, name varchar(20));
select*from table1;
2 0
id 0
name 20

test5

vector is a dangerous container: its push_back and size() during cases prevails

use test1;
select*from table1;
select*from table2;

insert retest

insert into table2 value(2, 'wdnmd', 'xxxxxxx');
insert into table2 value(2, 'wdnmd', 'xx');
select*from table2;

create table retest

use test1;
create table table3(id Int, name varchar(20));
create table table3(id int, name varchar);
create table table3(id int, name varchar(20));

test6

badcode test

use test1;
use test2;
use test3;
use test4;
use test4;
use test5;
use test1;