If the file does not exist or cannot be read because one of the preceding conditions is not satisfied, the function returns NULL . 

The character_set_filesystem  system variable controls interpretation of file names that are given as literal strings. 

mysql> UPDATE t SET blob_col=LOAD_FILE(’/tmp/picture’) WHERE id=1; 

• LOCATE( substr , str ) , LOCATE( substr , str , pos ) 

The first syntax returns the position of the first occurrence of substring substr  in string str . The second syntax returns the position of the first occurrence of substring substr  in string str , starting at position pos . Returns 0  if substr  is not in str . Returns NULL  if any argument is NULL . 

mysql> SELECT LOCATE(’bar’, ’foobarbar’); -> 4 mysql> SELECT LOCATE(’xbar’, ’foobar’); -> 0 mysql> SELECT LOCATE(’bar’, ’foobarbar’, 5); -> 7 

This function is multibyte safe, and is case-sensitive only if at least one argument is a binary string. 

• LOWER( str ) 

Returns the string str  with all characters changed to lowercase according to the current character set mapping. The default is utf8mb4 . 

mysql> SELECT LOWER(’QUADRATICALLY’); -> ’quadratically’ 

LOWER()  (and UPPER() ) are ineffective when applied to binary strings ( BINARY , VARBINARY , BLOB ). To perform lettercase conversion of a binary string, first convert it to a nonbinary string using a character set appropriate for the data stored in the string: 

mysql> SET @str = BINARY ’New York’; mysql> SELECT LOWER(@str), LOWER(CONVERT(@str USING utf8mb4)); +-------------+------------------------------------+ | LOWER(@str) | LOWER(CONVERT(@str USING utf8mb4)) | +-------------+------------------------------------+ | New York | new york | +-------------+------------------------------------+ 

For collations of Unicode character sets, LOWER()  and UPPER()  work according to the Unicode Collation Algorithm (UCA) version in the collation name, if there is one, and UCA 4.0.0 if no version is specified. For example, utf8mb4_0900_ai_ci  and utf8_unicode_520_ci  work according to UCA 9.0.0 and 5.2.0, respectively, whereas utf8_unicode_ci  works according to UCA 4.0.0. See Section 10.10.1, “Unicode Character Sets” . 

This function is multibyte safe. 

LCASE()  used within views is rewritten as LOWER() . 

