Query check tmp generate allowed