use char instead of varchar
This commit is contained in:
parent
c90fa56507
commit
e5ede77c29
17 changed files with 31 additions and 31 deletions
2
t/Crud.t
2
t/Crud.t
|
|
@ -37,7 +37,7 @@ WebGUI::Crud->crud_createTable($session);
|
|||
my $sth = $session->db->read("describe unnamed_crud_table");
|
||||
my ($col, $type) = $sth->array();
|
||||
is($col, 'id', "structure: id name");
|
||||
is($type, 'varchar(22)', "structure: id type");
|
||||
is($type, 'char(22)', "structure: id type");
|
||||
($col, $type) = $sth->array();
|
||||
is($col, 'sequenceNumber', "structure: sequenceNumber name");
|
||||
is($type, 'int(11)', "structure: sequenceNumber type");
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ cmp_bag($everyUsers, $everyoneGroup->getUsers(), 'addUsers will not add a user t
|
|||
##Database based user membership in groups
|
||||
|
||||
$session->db->dbh->do('DROP TABLE IF EXISTS myUserTable');
|
||||
$session->db->dbh->do(q!CREATE TABLE myUserTable (userId varchar(22) binary NOT NULL default '', PRIMARY KEY(userId)) TYPE=InnoDB!);
|
||||
$session->db->dbh->do(q!CREATE TABLE myUserTable (userId CHAR(22) binary NOT NULL default '', PRIMARY KEY(userId)) TYPE=InnoDB!);
|
||||
|
||||
my $sth = $session->db->prepare('INSERT INTO myUserTable VALUES(?)');
|
||||
foreach my $mob (@mob) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ is($output, 'Group Not a Group was not found', 'Non-existant group returns an er
|
|||
|
||||
##Create a small database
|
||||
$session->db->dbh->do('DROP TABLE IF EXISTS myUserTable');
|
||||
$session->db->dbh->do(q!CREATE TABLE myUserTable (userId varchar(22) binary NOT NULL default '', PRIMARY KEY(userId)) TYPE=InnoDB!);
|
||||
$session->db->dbh->do(q!CREATE TABLE myUserTable (userId CHAR(22) binary NOT NULL default '', PRIMARY KEY(userId)) TYPE=InnoDB!);
|
||||
|
||||
##Create a bunch of users and put them in the table.
|
||||
|
||||
|
|
|
|||
4
t/SQL.t
4
t/SQL.t
|
|
@ -164,7 +164,7 @@ SKIP: {
|
|||
|
||||
skip("No InnoDB tables in this MySQL. Skipping all transaction related tests.",7) if (lc $mysqlVariables{have_innodb} ne 'yes');
|
||||
$session->db->dbh->do('DROP TABLE IF EXISTS testTable');
|
||||
$session->db->dbh->do('CREATE TABLE testTable (myIndex int(8) NOT NULL default 0, message varchar(64), PRIMARY KEY(myIndex)) TYPE=InnoDB');
|
||||
$session->db->dbh->do('CREATE TABLE testTable (myIndex int(8) NOT NULL default 0, message CHAR(64), PRIMARY KEY(myIndex)) TYPE=InnoDB');
|
||||
|
||||
my $dbh2 = WebGUI::SQL->connect($session,$session->config->get("dsn"), $session->config->get("dbuser"), $session->config->get("dbpass"));
|
||||
my ($sth, $sth2, $rc);
|
||||
|
|
@ -215,7 +215,7 @@ SKIP: {
|
|||
|
||||
}
|
||||
|
||||
$session->db->dbh->do('CREATE TABLE testTable (myIndex int(8) NOT NULL default 0, message varchar(64), myKey varchar(32), PRIMARY KEY(myIndex))');
|
||||
$session->db->dbh->do('CREATE TABLE testTable (myIndex int(8) NOT NULL default 0, message CHAR(64), myKey varchar(32), PRIMARY KEY(myIndex))');
|
||||
|
||||
my @tableData = (
|
||||
[ 0, 'zero', 'A' ],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue