• Y
    Hash table cleanup [7/n] · 8ed7d45a
    Yifan Hao 提交于
    1. Add missing lock / unlock in profiling code. Without
       synchronization, the profiling code could access freed memory.
    2. Remove unnecessary assert.
    3. Remove unncessary if check in taosHashRemoveWithData.
    
    * Testing
    sample mysql:
    taos> create database db;
    Query OK, 0 of 0 row(s) in database (0.002291s)
    
    taos> use db;
    Query OK, 0 of 0 row(s) in database (0.000197s)
    
    taos> create table t (ts timestamp, a int);
    Query OK, 0 of 0 row(s) in database (0.003851s)
    
    taos> insert into t values ('2019-07-15 00:00:00', 1);
    Query OK, 1 of 1 row(s) in database (0.001128s)
    
    taos> insert into t values ('2019-07-15 01:00:00', 2);
    Query OK, 1 of 1 row(s) in database (0.000249s)
    
    taos> select * from t;
               ts            |      a      |
    ========================================
     2019-07-15 00:00:00.000 |           1 |
     2019-07-15 01:00:00.000 |           2 |
    Query OK, 2 row(s) in set (0.000772s)
    
    taos> drop database db;
    Query OK, 0 of 0 row(s) in database (0.002308s)
    8ed7d45a
hash.h 5.7 KB