From: J. Nick Koston Date: Fri, 24 Mar 2023 23:09:26 +0000 (-1000) Subject: tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60630403b661574a80ea337a5f86545923039465;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git tests --- diff --git a/test/dialect/mysql/test_compiler.py b/test/dialect/mysql/test_compiler.py index 52d4529aec..b04659c2db 100644 --- a/test/dialect/mysql/test_compiler.py +++ b/test/dialect/mysql/test_compiler.py @@ -746,6 +746,7 @@ class SQLTest(fixtures.TestBase, AssertsCompiledSQL): (String(32), "CAST(t.col AS CHAR(32))"), (Unicode(32), "CAST(t.col AS CHAR(32))"), (CHAR(32), "CAST(t.col AS CHAR(32))"), + (CHAR(0), "CAST(t.col AS CHAR(0))"), (m.MSString, "CAST(t.col AS CHAR)"), (m.MSText, "CAST(t.col AS CHAR)"), (m.MSTinyText, "CAST(t.col AS CHAR)"), @@ -1526,3 +1527,15 @@ class MatchExpressionTest(fixtures.TestBase, AssertsCompiledSQL): "MATCH ('x') AGAINST ('y' IN BOOLEAN MODE)", literal_binds=True, ) + + def test_char_zero(self): + t1 = Table( + "sometable", + MetaData(), + Column("unused", CHAR(0)) + ) + self.assert_compile( + schema.CreateTable(t1), + "CREATE TABLE sometable (unused " + "CHAR(0))", + ) \ No newline at end of file