-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maxwell shutdown on 'bool' and 'boolean' #67
Comments
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. |
Merged
#68 fixes this. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
The text was updated successfully, but these errors were encountered: