some notes about escape benchmark
This commit is contained in:
parent
677c309963
commit
0128ad0e13
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue