forked from Eonblast/Emysql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'djustinek/master' into tgf
Merging pull request 172 "Fixed build to work with R14,R15,R16,17 and 18": Eonblast#172
- Loading branch information
Showing
12 changed files
with
179 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,16 @@ | |
%% Jacob Vorreuter <[email protected]>, | ||
%% Henning Diedrich <[email protected]>, | ||
%% Eonblast Corporation <http://www.eonblast.com> | ||
%% | ||
%% | ||
%% Permission is hereby granted, free of charge, to any person | ||
%% obtaining a copy of this software and associated documentation | ||
%% files (the "Software"),to deal in the Software without restric- | ||
%% tion, including without limitation the rights to use, copy, | ||
%% tion, including without limitation the rights to use, copy, | ||
%% modify, merge, publish, distribute, sublicense, and/or sell | ||
%% copies of the Software, and to permit persons to whom the | ||
%% Software is furnished to do so, subject to the following | ||
%% Software is furnished to do so, subject to the following | ||
%% conditions: | ||
%% | ||
%% | ||
%% The above copyright notice and this permission notice shall be | ||
%% included in all copies or substantial portions of the Software. | ||
%% | ||
|
@@ -25,89 +25,88 @@ | |
%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
%% OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
|
||
-record(pool, {pool_id :: atom(), | ||
size :: number(), | ||
user :: string(), | ||
password :: string(), | ||
host :: string(), | ||
port :: number(), | ||
database :: string(), | ||
-record(pool, {pool_id :: atom(), | ||
size :: number(), | ||
user :: string(), | ||
password :: string(), | ||
host :: string(), | ||
port :: number(), | ||
database :: string(), | ||
encoding :: utf8 | latin1 | {utf8, utf8_unicode_ci} | {utf8, utf8_general_ci}, | ||
available=queue:new() :: queue(), | ||
locked=gb_trees:empty() :: gb_tree(), | ||
waiting=queue:new() :: queue(), | ||
start_cmds=[] :: string(), | ||
conn_test_period=0 :: number(), | ||
available=queue:new() :: emysql:t_queue(), | ||
locked=gb_trees:empty() :: emysql:t_gb_tree(), | ||
waiting=queue:new() :: emysql:t_queue(), | ||
start_cmds=[] :: string(), | ||
conn_test_period=0 :: number(), | ||
connect_timeout=infinity :: number() | infinity, | ||
warnings=false :: boolean()}). | ||
|
||
-record(emysql_connection, {id :: string(), | ||
pool_id :: atom(), | ||
-record(emysql_connection, {id :: string(), | ||
pool_id :: atom(), | ||
encoding :: atom(), % maybe could be latin1 | utf8 ? | ||
socket :: inet:socket(), | ||
version :: number(), | ||
thread_id :: number(), | ||
caps :: number(), | ||
language :: number, | ||
prepared=gb_trees:empty(), | ||
locked_at :: number(), | ||
alive=true :: boolean(), | ||
test_period=0 :: number(), | ||
last_test_time=0 :: number(), | ||
socket :: inet:socket(), | ||
version :: number(), | ||
thread_id :: number(), | ||
caps :: number(), | ||
language :: number, | ||
prepared=gb_trees:empty(), | ||
locked_at :: number(), | ||
alive=true :: boolean(), | ||
test_period=0 :: number(), | ||
last_test_time=0 :: number(), | ||
monitor_ref :: reference(), | ||
warnings=false :: boolean()}). | ||
|
||
-record(greeting, {protocol_version :: number(), | ||
server_version :: binary(), | ||
thread_id :: number(), | ||
salt1 :: binary(), | ||
salt2 :: binary(), | ||
caps :: number(), | ||
caps_high :: number(), | ||
language :: number(), | ||
status :: number(), | ||
seq_num :: number(), | ||
-record(greeting, {protocol_version :: number(), | ||
server_version :: binary(), | ||
thread_id :: number(), | ||
salt1 :: binary(), | ||
salt2 :: binary(), | ||
caps :: number(), | ||
caps_high :: number(), | ||
language :: number(), | ||
status :: number(), | ||
seq_num :: number(), | ||
plugin :: binary()}). | ||
|
||
-record(field, {seq_num :: number(), | ||
catalog :: binary(), | ||
db :: binary(), | ||
table :: binary(), | ||
org_table :: binary(), | ||
name :: binary(), | ||
org_name :: binary(), | ||
type :: number(), | ||
default :: number(), | ||
charset_nr :: number(), | ||
length :: number(), | ||
flags :: number(), | ||
decimals :: number(), | ||
-record(field, {seq_num :: number(), | ||
catalog :: binary(), | ||
db :: binary(), | ||
table :: binary(), | ||
org_table :: binary(), | ||
name :: binary(), | ||
org_name :: binary(), | ||
type :: number(), | ||
default :: number(), | ||
charset_nr :: number(), | ||
length :: number(), | ||
flags :: number(), | ||
decimals :: number(), | ||
decoder :: fun()}). | ||
-record(packet, {size :: number(), | ||
seq_num :: number(), | ||
-record(packet, {size :: number(), | ||
seq_num :: number(), | ||
data :: binary()}). | ||
-record(ok_packet, {seq_num :: number(), | ||
affected_rows :: number(), | ||
insert_id :: number(), | ||
status :: number(), | ||
warning_count :: number(), | ||
-record(ok_packet, {seq_num :: number(), | ||
affected_rows :: number(), | ||
insert_id :: number(), | ||
status :: number(), | ||
warning_count :: number(), | ||
msg :: string() | ||
| {error, string(), unicode:latin1_chardata() | unicode:chardata() | unicode:external_chardata()} | ||
| {incomplete, string(), binary()}}). | ||
|
||
% It's unfortunate that error_packet's status is binary when the status of other | ||
% packets is a number. | ||
-record(error_packet, {seq_num :: number(), | ||
code :: number(), | ||
status :: binary(), | ||
-record(error_packet, {seq_num :: number(), | ||
code :: number(), | ||
status :: binary(), | ||
msg :: [byte()]}). | ||
|
||
-record(eof_packet, {seq_num :: number(), | ||
status :: number(), | ||
-record(eof_packet, {seq_num :: number(), | ||
status :: number(), | ||
warning_count :: number()}). % extended to mySQL 4.1+ format | ||
|
||
-record(result_packet, {seq_num :: number(), | ||
-record(result_packet, {seq_num :: number(), | ||
field_list :: list(), | ||
rows, extra}). | ||
|
||
|
@@ -179,4 +178,3 @@ | |
% we discovered that the new statement returns a different | ||
% number of result set columns. | ||
-define(SERVER_STATUS_METADATA_CHANGED, 1024). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
% -*- Erlang -*- | ||
% vim: ts=4 sw=4 et ft=erlang | ||
{erl_opts, [ | ||
{platform_define, "^[0-9]+", namespaced_types}, | ||
nowarn_deprecated_type | ||
]}. | ||
{pre_hooks,[ | ||
|
||
{"linux|bsd|darwin|solaris", compile, "escript ./support/crypto_compat.escript"}, | ||
{"win32", compile, "escript.exe support/crypto_compat.escript"} | ||
]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{exports, ExportList} = lists:keyfind(exports,1,erlang:module_info()), | ||
Check = lists:member({timestamp,0},ExportList), | ||
case Check of | ||
true -> | ||
case lists:keyfind(erl_opts, 1, CONFIG) of | ||
false -> | ||
CONFIG ++ [{erl_opts,[{d,timestamp_support}]}]; | ||
{erl_opts, Opts} -> | ||
NewOpts = {erl_opts, Opts ++ [{d,timestamp_support}]}, | ||
lists:keyreplace(erl_opts, 1, CONFIG, NewOpts) | ||
end; | ||
false -> | ||
CONFIG | ||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.