# NOTE: LOCK TABLE was removed, so now just testing normal syntax.
93
94
#
94
95
95
96
CREATE TABLE t1 (
108
109
KEY contact_id (contact_id)
109
110
);
110
111
111
lock tables t1 read,t2 write;
112
113
112
INSERT INTO t2 VALUES (10,2);
114
113
INSERT INTO t2 VALUES (18,2);
115
114
INSERT INTO t2 VALUES (62,2);
121
120
SELECT cid, CONCAT(firstname, ' ', surname), COUNT(call_id) FROM t1 LEFT JOIN t2 ON cid=contact_id WHERE firstname like '%foo%' GROUP BY cid ORDER BY surname, firstname;