Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.63 KB | None | 0 0
  1. ActiveRecord::Model
  2. .new
  3. creates person
  4. doesn't have id
  5. doesn't have any else field
  6. doesn't care about non-defined fields
  7. .fields
  8. returns fields defined on model
  9. #==
  10. is equal object to object with the same fields
  11. is not equal to object with the different fields
  12. is not equal to non-person objects
  13. #<field>=
  14. assigns field
  15. #create
  16. persists new record to database
  17. can be used through .create
  18. .find
  19. finds record properly
  20. is of right class
  21. works correctly with encapsulated levels
  22. .index
  23. finds all records
  24. works correctly with custom methods
  25. .where(query_hash)
  26. finds multiple records
  27. .where(Query)
  28. finds multiple records by raw parametrized query==3325== Invalid read of size 8
  29. ==3325== at 0x49A585: GC_generic_malloc_many (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  30. ==3325== by 0x4A38DE: GC_malloc_atomic (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  31. ==3325== by 0x414355: __crystal_malloc_atomic (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  32. ==3325== by 0x41A0D5: *GC::malloc_atomic<UInt32>:Pointer(Void) (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  33. ==3325== by 0x41D3FB: *String::new<Pointer(UInt8), UInt32, Int32>:String (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  34. ==3325== by 0x41D3C6: *String::new<Pointer(UInt8), UInt32>:String (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  35. ==3325== by 0x440175: *MySQL::Support::string_from_uint8<Pointer(UInt8), UInt32>:String (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  36. ==3325== by 0x43E96A: *MySQL::Connection#fetch_value<MySQL::Connection, Pointer(LibMySQL::MySQLField), Pointer(UInt8), UInt32>:(Nil | String | Int32 | Int64 | Float64 | Time) (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  37. ==3325== by 0x43E782: *MySQL::Connection#fetch_row<MySQL::Connection, Pointer(Pointer(Void)), Array(Pointer(LibMySQL::MySQLField))>:Array(Nil | String | Int32 | Int64 | Float64 | Time | Bool | MySQL::Types::Date)? (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  38. ==3325== by 0x43E581: *MySQL::Connection#query<MySQL::Connection, String>:Array(Array(Nil | String | Int32 | Int64 | Float64 | Time | Bool | MySQL::Types::Date))? (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  39. ==3325== by 0x45B8E5: *MySQL::Query#run<MySQL::Query, MySQL::Connection>:Array(Array(Nil | String | Int32 | Int64 | Float64 | Time | Bool | MySQL::Types::Date))? (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  40. ==3325== by 0x43A53F: *MysqlAdapter::Adapter#_where<MysqlAdapter::Adapter, String, Hash(String, String | Int8 | Int32 | Int16 | Int64 | UInt8 | UInt32 | UInt16 | UInt64 | Int::Null | String::Null)>:Array(Hash(String, String | Int8 | Int32 | Int16 | Int64 | UInt8 | UInt32 | UInt16 | UInt64 | Int::Null | String::Null)) (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  41. ==3325== Address 0x20666f2073746f4c is not stack'd, malloc'd or (recently) free'd
  42. ==3325==
  43. ==3325==
  44. ==3325== Process terminating with default action of signal 11 (SIGSEGV)
  45. ==3325== General Protection Fault
  46. ==3325== at 0x49A585: GC_generic_malloc_many (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  47. ==3325== by 0x4A38DE: GC_malloc_atomic (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  48. ==3325== by 0x414355: __crystal_malloc_atomic (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  49. ==3325== by 0x41A0D5: *GC::malloc_atomic<UInt32>:Pointer(Void) (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  50. ==3325== by 0x41D3FB: *String::new<Pointer(UInt8), UInt32, Int32>:String (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  51. ==3325== by 0x41D3C6: *String::new<Pointer(UInt8), UInt32>:String (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  52. ==3325== by 0x440175: *MySQL::Support::string_from_uint8<Pointer(UInt8), UInt32>:String (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  53. ==3325== by 0x43E96A: *MySQL::Connection#fetch_value<MySQL::Connection, Pointer(LibMySQL::MySQLField), Pointer(UInt8), UInt32>:(Nil | String | Int32 | Int64 | Float64 | Time) (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  54. ==3325== by 0x43E782: *MySQL::Connection#fetch_row<MySQL::Connection, Pointer(Pointer(Void)), Array(Pointer(LibMySQL::MySQLField))>:Array(Nil | String | Int32 | Int64 | Float64 | Time | Bool | MySQL::Types::Date)? (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  55. ==3325== by 0x43E581: *MySQL::Connection#query<MySQL::Connection, String>:Array(Array(Nil | String | Int32 | Int64 | Float64 | Time | Bool | MySQL::Types::Date))? (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  56. ==3325== by 0x45B8E5: *MySQL::Query#run<MySQL::Query, MySQL::Connection>:Array(Array(Nil | String | Int32 | Int64 | Float64 | Time | Bool | MySQL::Types::Date))? (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  57. ==3325== by 0x43A53F: *MysqlAdapter::Adapter#_where<MysqlAdapter::Adapter, String, Hash(String, String | Int8 | Int32 | Int16 | Int64 | UInt8 | UInt32 | UInt16 | UInt64 | Int::Null | String::Null)>:Array(Hash(String, String | Int8 | Int32 | Int16 | Int64 | UInt8 | UInt32 | UInt16 | UInt64 | Int::Null | String::Null)) (in /home/oleksii/code/github/waterlink/mysql_adapter.cr/integration/integration_spec)
  58. ==3325==
  59. ==3325== HEAP SUMMARY:
  60. ==3325== in use at exit: 178,224 bytes in 61 blocks
  61. ==3325== total heap usage: 228 allocs, 167 frees, 642,920 bytes allocated
  62. ==3325==
  63. ==3325== LEAK SUMMARY:
  64. ==3325== definitely lost: 0 bytes in 0 blocks
  65. ==3325== indirectly lost: 0 bytes in 0 blocks
  66. ==3325== possibly lost: 864 bytes in 3 blocks
  67. ==3325== still reachable: 177,360 bytes in 58 blocks
  68. ==3325== suppressed: 0 bytes in 0 blocks
  69. ==3325== Rerun with --leak-check=full to see details of leaked memory
  70. ==3325==
  71. ==3325== For counts of detected and suppressed errors, rerun with: -v
  72. ==3325== Use --track-origins=yes to see where uninitialised values come from
  73. ==3325== ERROR SUMMARY: 320 errors from 18 contexts (suppressed: 0 from 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement