Closed akshayi1 closed 9 years ago
For this, I tried to do:
ColumnDef.java
public static ColumnDef build(String tableName, String name, String encoding, String type, int pos, boolean signed, String enumValues[]) {
type = unalias_type(type);
switch(type) {
case "tinyint":
case "smallint":
case "mediumint":
case "bit":
case "int":
return new IntColumnDef(tableName, name, type, pos, signed);
....
....
....
static private String unalias_type(String type) {
switch(type) {
case "bool":
case "boolean":
case "bit":
return "bit";
case "int1":
return "tinyint";
case "int2":
return "smallint";
case "int3":
return "mediumint";
case "int4":
case "integer":
return "int";
case "int8":
return "bigint";
default:
return type;
}
}
IntColumnDef.java
public boolean matchesMysqlType(int type) {
switch(this.bits) {
case 1:
return type == MySQLConstants.TYPE_BIT;
case 8:
return type == MySQLConstants.TYPE_TINY;
case 16:
return type == MySQLConstants.TYPE_SHORT;
case 24:
return type == MySQLConstants.TYPE_INT24;
case 32:
return type == MySQLConstants.TYPE_LONG;
default:
return false;
}
}
private final static int bitsFromType(String type) {
switch(type) {
case "bit":
return 1;
case "tinyint":
return 8;
case "smallint":
return 16;
case "mediumint":
return 24;
case "int":
return 32;
default:
return 0;
}
}
I tried a few combinations of the same - without the bit and so on, and nothing seemed to work. It was almost as if my changed code did not even exist! I've kinda given up on getting bool to work.
working on this one.
Same as #64, #65 and #66, Maxwell can't handle 'bool' and (just to be completely sure) 'boolean'. This occurs at the
create table
stage. To get Maxwell to run again, I had topurge binary logs before now()
anddelete from maxwell.positions
.BOOL:
BOOLEAN: