diff --git a/src/client/src/tscSub.c b/src/client/src/tscSub.c index e44f88189fb5..b3d18f50114c 100644 --- a/src/client/src/tscSub.c +++ b/src/client/src/tscSub.c @@ -149,7 +149,6 @@ static SSub* tscCreateSubscription(STscObj* pObj, const char* topic, const char* goto fail; } - strtolower(pSql->sqlstr, pSql->sqlstr); pRes->qId = 0; pRes->numOfRows = 1; pCmd->resColumnId = TSDB_RES_COL_ID; diff --git a/tests/pytest/subscribe/singlemeter.py b/tests/pytest/subscribe/singlemeter.py index 879e0a75ebdf..ff182f70b572 100644 --- a/tests/pytest/subscribe/singlemeter.py +++ b/tests/pytest/subscribe/singlemeter.py @@ -68,8 +68,24 @@ def run(self): tdSub.consume() tdSub.checkRows(11) + + # TS-1788: Subscribe a case sensitive table + tdLog.info("create a table and insert 10 rows.") + tdSql.execute("create table `T1`(ts timestamp, a int, b int);") + for i in range(0, 10): + tdSql.execute("insert into `T1` values (%d, %d, %d);" % (now + i, i, i)) + + sqlstr = "select * from `T1`" + topic = "topic1" + now = int(time.time() * 1000) + + tdSub.init(self.conn.subscribe(True, topic, sqlstr, 0)) + tdSub.consume() + tdSub.checkRows(10) + tdSub.close(True) + def stop(self): tdSub.close(False) tdSql.close()