From 0128ad0e13d5370374bd8408b91983e328e5c93e Mon Sep 17 00:00:00 2001 From: Brian Lopez Date: Sat, 3 Apr 2010 01:45:41 -0700 Subject: [PATCH] some notes about escape benchmark --- benchmark/escape.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchmark/escape.rb b/benchmark/escape.rb index c547c69..ee7e64c 100644 --- a/benchmark/escape.rb +++ b/benchmark/escape.rb @@ -15,6 +15,8 @@ Benchmark.bmbm do |x| x.report do puts "Mysql" number_of.times do + # NOTE: this uses mysql_escape_string in C + # which is *not* encoding aware mysql.escape_string str end end @@ -24,6 +26,8 @@ Benchmark.bmbm do |x| x.report do puts "Mysql2" number_of.times do + # NOTE: this uses mysql_real_escape_string in C + # which takes into account the encoding set on the connection mysql2.escape str end end