A little more info about what the OP is doing could be important because this feels like an improper use of LIMIT in the current context and I will explain why. Limit is supposed to reflect that you want so many of the data you're querying.
SELECT column1 FROM table1 LIMIT (SELECT column1 FROM table2 WHERE column3="whatever");
This is particularly weird because if I were convert this to English, you would get something like this:
Give me column1 from table1 and give me as many records as there are in table2 with column3 having "whatever" for a value.
What this gets you is
any record from table1 but, limited (by count,) by the number of records in table2 that fit the criteria. Since this isn't a JOIN, the rows you get from table1 are mostly non-deterministic and as a result, will give you a pseudo-random (but, certainly not completely random,) sample of your data.
You would be better off doing something more like this if the number of rows in table1 are to match the rows in table2, even if they're not selected.
Code:
SELECT a.column1 FROM table1 AS a JOIN table2 AS b ON a.column1 = b.column1 WHERE b.column2 = 'foobar' GROUP BY a.column1;
This would provide you unique values from column1 in table1 for every match in table2 given the WHERE constraint of b.column2 being set to "foobar". There is absolutely no reason why you need to limit to an upper bound of something you're joining against. Something like this might also be valid:
Code:
SELECT a.column1 FROM table1 AS a WHERE a.column1 IN (SELECT b.column1 FROM table2 AS b WHERE b.column2 = 'foobar');
Now, I don't usually use MySQL. PostgreSQL is my weapon of choice but, everything tells me that the approach of using LIMIT for this purpose is wrong.
select * from users limit (select count(*) from users where sex like "F");
Just as a FYI, that says give me as many users without any filter criteria up to the same number of users that are female. If it worked, it would not get all users that are female.