DROP TEMPORARY TABLE IF EXISTS tData;
CREATE TEMPORARY TABLE tData
	ENGINE = MEMORY
	SELECT sql_printf('SELECT %v FROM %t', 1, 'tbl') result, 'SELECT 1 FROM `tbl`' expect
		UNION SELECT sql_printf('%v', TRUE), 1
		UNION SELECT sql_printf('%v', 1), 1
		UNION SELECT sql_printf('%v', 'string'), '\'string\''
		UNION SELECT sql_printf('%v', DATE('2020-01-01')), '\'2020-01-01\''
		UNION SELECT sql_printf('%v', NULL), 'NULL'
		UNION SELECT sql_printf('%t', 'myTable'), '`myTable`'
		UNION SELECT sql_printf('%s', 'expr = TRUE'), 'expr = TRUE'
		UNION SELECT sql_printf('%%'), '%'
		UNION SELECT sql_printf(NULL), NULL
		UNION SELECT sql_printf('SELECT %'), NULL
		UNION SELECT sql_printf('SELECT %v'), NULL;

SELECT result, expect, result <=> expect isRight FROM tData;
    
DROP TEMPORARY TABLE tData;
