pg-redis-fdw / redis_fdw

A PostgreSQL foreign data wrapper for Redis
497 stars 68 forks source link

Bug in tablekeyprefix check #6

Closed dumbuzz closed 9 years ago

dumbuzz commented 9 years ago

You have a bug in line 998 of redis_fdw.c

else if (festate->keyprefix)
        {
            if (strncmp(qual_value, festate->keyprefix, 
                        strlen(festate->keyprefix)) == 0)
                festate->row = -1;
        }

strncmp must be !=0

With this bug foreign table with tablekeyprefix search for key equality doesn't work.

adunstan commented 9 years ago

Fixed. Thanks for the report.