fixed CAST LONGTEXT issue with mysql

This commit is contained in:
mdipierro
2014-06-13 11:46:50 -05:00
parent d442b003ea
commit 3266c541b6
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.9.5-trunk+timestamp.2014.06.08.00.33.23
Version 2.9.5-trunk+timestamp.2014.06.13.11.45.40
+4
View File
@@ -2666,6 +2666,10 @@ class MySQLAdapter(BaseAdapter):
return '(%s REGEXP %s)' % (self.expand(first),
self.expand(second, 'string'))
def CAST(self, first, second):
if second=='LONGTEXT': second = 'CHAR'
return 'CAST(%s AS %s)' % (first, second)
def _drop(self, table, mode):
# breaks db integrity but without this mysql does not drop table
table_rname = table.sqlsafe