~free.ekanayaka/storm/any-expr

« back to all changes in this revision

Viewing changes to storm/databases/mysql.py

  • Committer: Jamu Kakar
  • Date: 2009-10-23 19:19:16 UTC
  • mfrom: (329.3.1 mysql-reserved-words)
  • Revision ID: jkakar@kakar.ca-20091023191916-6jfp30ed3l2bl1se
Merged mysql-reserved-words [r=gabriel,jamesh] [f=433833]

MySQL reserved words that weren't treated properly before are
handled correctly now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
        s = int(f)
196
196
        return time(int(h), int(m), s, (f-s)*1000000)
197
197
    return time(int(h), int(m), int(s), 0)
 
198
 
 
199
 
 
200
# --------------------------------------------------------------------
 
201
# Reserved words, MySQL specific
 
202
 
 
203
# The list of reserved words here are MySQL specific.  SQL92 reserved words
 
204
# are registered in storm.expr, near the "Reserved words, from SQL1992"
 
205
# comment.  The reserved words here were taken from:
 
206
#
 
207
# http://dev.mysql.com/doc/refman/5.4/en/reserved-words.html
 
208
compile.add_reserved_words("""
 
209
    accessible analyze asensitive before bigint binary blob call change
 
210
    condition current_user database databases day_hour day_microsecond
 
211
    day_minute day_second delayed deterministic distinctrow div dual each
 
212
    elseif enclosed escaped exit explain float4 float8 force fulltext
 
213
    high_priority hour_microsecond hour_minute hour_second if ignore index
 
214
    infile inout int1 int2 int3 int4 int8 iterate keys kill leave limit linear
 
215
    lines load localtime localtimestamp lock long longblob longtext loop
 
216
    low_priority master_ssl_verify_server_cert mediumblob mediumint mediumtext
 
217
    middleint minute_microsecond minute_second mod modifies no_write_to_binlog
 
218
    optimize optionally out outfile purge range read_write reads regexp
 
219
    release rename repeat replace require return rlike schemas
 
220
    second_microsecond sensitive separator show spatial specific
 
221
    sql_big_result sql_calc_found_rows sql_small_result sqlexception
 
222
    sqlwarning ssl starting straight_join terminated tinyblob tinyint tinytext
 
223
    trigger undo unlock unsigned use utc_date utc_time utc_timestamp varbinary
 
224
    varcharacter while xor year_month zerofill
 
225
    """.split())