User queries with long WHERE clauses fail with "Data truncated for column 'query' at row 1" error from the mysql DB.

Review Request #2655 - Created Jan. 29, 2013 and submitted

Chris Conner
old-hue
HUE-1024
hue
abec, enricoberti, romain
Patch for Jira HUE-1024.
I tested by running syncdb and confirmed that the 'query' column in beeswax_queryhistory is now a TEXT field.
  1. The way to do is to update models.py then run 'build/env/bin/hue schemamigration' to generate migrations (to add to the review) and also test the migration by applying it with 'migrate'.
    
    e.g.
    https://issues.cloudera.org/browse/HUE-704
  2. 
      
  1. A good first shot. Just a couple of things:
    1. Hue has a database migration system called South. Instead of editing the migrations themselves, try modifying the models and creating a new schema migration: http://south.readthedocs.org/en/0.7.6/tutorial/part1.html
    2. When providing a description for the review. Try providing the first entry in 'git whatchanged' (or just 'git whatchanged -1').
    1. Alright, after further investigation I'm going to mark this as a Duplicate of HUE-704.  It looks like in the fix for HUE-704, the models.py was updated and then "hue schemamigration beeswax" was run.  However, "hue migrate beeswax" was not run.  As a result the file "0003_auto__chg_field_queryhistory_query.py" was left in the management directory instead of getting moved to the migrations directory.  So the fix was there, but still did not work in Hue 2.1.  Now in Hue 2.2, "hue migrate beeswax" has been run and the fix is now working.  So nothing to be done here.
  2. 
      
Review request changed

Status: Closed (submitted)

Loading...