File tree 4 files changed +21
-6
lines changed
4 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -55,3 +55,5 @@ docs/_build/
55
55
56
56
# PyBuilder
57
57
target /
58
+
59
+ PKG-INFO
Original file line number Diff line number Diff line change 1
- oursql v0.9.2!
1
+ oursql v0.9.3. 2!
2
2
3
3
Comprehensive documentation for oursql is available online:
4
4
http://packages.python.org/oursql/
Original file line number Diff line number Diff line change @@ -617,10 +617,23 @@ enum _oursqlx_exception_type _oursqlx_exc_from_errno(int err) {
617
617
return _oursqlx_PermissionsError ;
618
618
619
619
default :
620
- if (err >= ER_ERROR_FIRST && err <= ER_ERROR_LAST )
621
- return _oursqlx_ProgrammingError ;
622
- else if (err > CR_MIN_ERROR && err < CR_MAX_ERROR )
623
- return _oursqlx_InterfaceError ;
620
+ #if MYSQL_VERSION_ID >= 50700
621
+ for (unsigned int i = 0 ; i < sizeof (errmsg_section_start )/sizeof (int ); ++ i ) {
622
+ int min = errmsg_section_start [i ];
623
+ int max = errmsg_section_start [i ] + errmsg_section_size [i ] - 1 ;
624
+ if ( err >= min && err <= max ) {
625
+ return _oursqlx_ProgrammingError ;
626
+ }
627
+ }
628
+ if ( err > CR_MIN_ERROR && err < CR_MAX_ERROR ) {
629
+ return _oursqlx_InterfaceError ;
630
+ }
631
+ #else
632
+ if (err >= ER_ERROR_FIRST && err <= ER_ERROR_LAST )
633
+ return _oursqlx_ProgrammingError ;
634
+ else if (err > CR_MIN_ERROR && err < CR_MAX_ERROR )
635
+ return _oursqlx_InterfaceError ;
636
+ #endif
624
637
}
625
638
return _oursqlx_UnknownError ;
626
639
}
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ def run(self):
205
205
206
206
setup (
207
207
name = 'oursql' ,
208
- version = '0.9.3' ,
208
+ version = '0.9.3.2 ' ,
209
209
author = 'Aaron Gallagher' ,
210
210
211
211
url = 'http://launchpad.net/oursql' ,
You can’t perform that action at this time.
0 commit comments