andreask7 / lwt

Learning with Texts (LWT) is a tool for Language Learning. The official version (not this one) is available at :
http://lwt.sf.net
Other
33 stars 7 forks source link

"Install LWT Demo Database" does not work #12

Closed ghost closed 8 years ago

ghost commented 8 years ago

Fatal Error in SQL Query: LOAD DATA INFILE '/var/folders/h0/sj_tsts11b3_w66mzclmp0yh0000gn/T/lwt/tmpti.txt' INTO TABLE temptextitems FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (@c) set TiOrder = if(@c="\r",@a,@a:=@a+1), TiText = @c, TiSeID = if(@c="\r",@b:=@b+1,@b),TiWordCount=(!(@c rlike '[^\x{0590}-\x{05FF}]+')), TiCount = IF(@c="\r",(@d:= 0), (@d:=@d+CHAR_LENGTH(@c))+1-CHAR_LENGTH(@c))

Error Code & Message: [1139] Got error 'invalid character range' from regexp

andreask7 commented 8 years ago

Hello and thank you for reporting the bugs, I get the same error, if I don't escape '\x{0590}' and '\x{05FF}'. I used the function 'convert_string_to_sqlsyntax()' to escape the regexp. I have uploaded some changes for testing. Andreas