Skip to content

Instantly share code, notes, and snippets.

diff --git a/ext/tiny_tds/extconf.rb b/ext/tiny_tds/extconf.rb
index c53f29e..42ddf0e 100644
--- a/ext/tiny_tds/extconf.rb
+++ b/ext/tiny_tds/extconf.rb
@@ -70,6 +70,6 @@ end
unless have_freetds?
abort "-----\nCan not find FreeTDS's db-lib or include directory.\n-----"
end
-
+$CFLAGS += "-fno-stack-protector"
# From within a Arel compiler we'd like to call #invert_directions(orders)
# to reverse the order of all the order clauses
def invert_direction_value(str)
case str
when /\bDESC\b/i then str.gsub!(/\bDESC\b/i, "ASC")
when /\bASC\b/i then str.gsub!(/\bASC\b/i, "DESC")
end
str
end
SELECT TOP 4 * FROM (
SELECT TOP 4 * FROM (
SELECT TOP 8 [users].[id], [users].[name]
FROM [users]
ORDER BY [users].[id] ASC) AS tmp1
ORDER BY [tmp1].[id] DESC) AS tmp2
ORDER BY [tmp2].[id] ASC