mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[7947] Use "NUMERIC" type instead of "BIGINT" in mysql_to_pgsql convertor.
This commit is contained in:
parent
d2f654217d
commit
de2338c9a4
2 changed files with 14 additions and 3 deletions
|
|
@ -89,9 +89,20 @@ string ConvertNativeType(enum_field_types mysqlType, uint32 length)
|
||||||
case FIELD_TYPE_INT24:
|
case FIELD_TYPE_INT24:
|
||||||
return "integer";
|
return "integer";
|
||||||
case FIELD_TYPE_LONGLONG:
|
case FIELD_TYPE_LONGLONG:
|
||||||
return "int8";
|
|
||||||
case FIELD_TYPE_LONG:
|
case FIELD_TYPE_LONG:
|
||||||
return "bigint";
|
{
|
||||||
|
string temp;
|
||||||
|
char str[10];
|
||||||
|
temp = "numeric";
|
||||||
|
if (length)
|
||||||
|
{
|
||||||
|
temp.append("(");
|
||||||
|
sprintf(str,"%d",length);
|
||||||
|
temp.append(str);
|
||||||
|
temp.append(")");
|
||||||
|
}
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
case FIELD_TYPE_DECIMAL:
|
case FIELD_TYPE_DECIMAL:
|
||||||
case FIELD_TYPE_FLOAT:
|
case FIELD_TYPE_FLOAT:
|
||||||
case FIELD_TYPE_DOUBLE:
|
case FIELD_TYPE_DOUBLE:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7946"
|
#define REVISION_NR "7947"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue