Merge from upstream. Adapt queries and code.
Add group_concat and full text search functions