Imported Upstream version 4.6.2.6
Former-commit-id: acf0aed9cbf359eec20dc40fbeb30554b4ed84a3
This commit is contained in:
parent
36b9cc09f0
commit
ee1447783b
@ -1 +1 @@
|
||||
cfd298f0214dbe147b607ec867f5a0700ae52f03
|
||||
e8e55390c7a19b75beced76b13cba26115783992
|
@ -1 +1 @@
|
||||
f9f812ae034d2087f5a64846fa6446d74bc9f020
|
||||
249f69974e9846cf3b2f1ea6d1abcb79faff896f
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "4.6.1.0";
|
||||
public const string MonoVersion = "4.6.2.0";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -221,7 +221,7 @@ namespace Mono.Data.Sqlite
|
||||
case SQLiteDateFormats.UnixEpoch:
|
||||
return ((long)(dateValue.Subtract(UnixEpoch).Ticks / TimeSpan.TicksPerSecond)).ToString();
|
||||
default:
|
||||
return dateValue.ToString(_datetimeFormats[7], CultureInfo.InvariantCulture);
|
||||
return dateValue.ToString(_datetimeFormats[5], CultureInfo.InvariantCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,4 +6,4 @@ SqliteExceptionUnitTests.cs
|
||||
SqliteParameterUnitTests.cs
|
||||
SqliteFunctionTests.cs
|
||||
Bug27864.cs
|
||||
|
||||
SqliteTests.cs
|
||||
|
102
mcs/class/Mono.Data.Sqlite/Test/SqliteTests.cs
Normal file
102
mcs/class/Mono.Data.Sqlite/Test/SqliteTests.cs
Normal file
@ -0,0 +1,102 @@
|
||||
//
|
||||
// SqliteTests.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.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 restriction, 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 conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Mono.Data.Sqlite;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.Mono.Data.Sqlite
|
||||
{
|
||||
[TestFixture]
|
||||
public class SqliteTests
|
||||
{
|
||||
string _databasePath;
|
||||
|
||||
[SetUp]
|
||||
public void Setup ()
|
||||
{
|
||||
var dataFolder = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), "SqlTest");
|
||||
|
||||
_databasePath = Path.Combine (dataFolder, "database.db");
|
||||
|
||||
if (!Directory.Exists (dataFolder)) {
|
||||
Directory.CreateDirectory (dataFolder);
|
||||
}
|
||||
|
||||
File.Delete (_databasePath);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown ()
|
||||
{
|
||||
try {
|
||||
File.Delete (_databasePath);
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DateTimeConvert ()
|
||||
{
|
||||
var dateTime = new DateTime (2016, 9, 15, 12, 1, 53);
|
||||
var guid = Guid.NewGuid ();
|
||||
|
||||
using (var connection = new SqliteConnection ("Data Source=" + _databasePath)) {
|
||||
connection.Open ();
|
||||
|
||||
var sqlCreate = "CREATE TABLE TestTable (ID uniqueidentifier PRIMARY KEY, Modified datetime)";
|
||||
using (var cmd = new SqliteCommand (sqlCreate, connection)) {
|
||||
cmd.ExecuteNonQuery ();
|
||||
}
|
||||
|
||||
var sqlInsert = "INSERT INTO TestTable (ID, Modified) VALUES (@id, @mod)";
|
||||
using (var cmd = new SqliteCommand (sqlInsert, connection)) {
|
||||
cmd.Parameters.Add (new SqliteParameter ("@id", guid));
|
||||
cmd.Parameters.Add (new SqliteParameter ("@mod", dateTime));
|
||||
cmd.ExecuteNonQuery ();
|
||||
}
|
||||
}
|
||||
|
||||
using (var connection = new SqliteConnection ("Data Source=" + _databasePath)) {
|
||||
connection.Open ();
|
||||
|
||||
var sqlSelect = "SELECT * from TestTable";
|
||||
using (var cmd = new SqliteCommand (sqlSelect, connection))
|
||||
using (var reader = cmd.ExecuteReader ()) {
|
||||
while (reader.Read ()) {
|
||||
Assert.AreEqual (guid, reader.GetGuid (0), "#1");
|
||||
Assert.AreEqual (dateTime, reader.GetDateTime (1), "#2");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -179,13 +179,6 @@ namespace System.Net.Sockets
|
||||
|
||||
if (disposing && in_progress != 0)
|
||||
return;
|
||||
|
||||
AcceptSocket = null;
|
||||
Buffer = null;
|
||||
BufferList = null;
|
||||
RemoteEndPoint = null;
|
||||
UserToken = null;
|
||||
SendPacketsElements = null;
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
|
@ -247,6 +247,25 @@ namespace MonoTests.System.Net.Sockets {
|
||||
SocketAsyncEventArgsPoker saea = new SocketAsyncEventArgsPoker ();
|
||||
saea.OnCompleted_ (null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TransparentDispose ()
|
||||
{
|
||||
var buffer = new byte[5];
|
||||
var elements = new SendPacketsElement[2];
|
||||
var utoken = new object();
|
||||
|
||||
var saea = new SocketAsyncEventArgs();
|
||||
saea.SetBuffer(buffer, 0, 3);
|
||||
saea.SendPacketsElements = elements;
|
||||
saea.UserToken = utoken;
|
||||
|
||||
saea.Dispose();
|
||||
|
||||
Assert.AreEqual (buffer, saea.Buffer);
|
||||
Assert.AreEqual (elements, saea.SendPacketsElements);
|
||||
Assert.AreEqual (utoken, saea.UserToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
c083b93e7b6150b680d32a820f3b88c682ddf789
|
||||
00b036beeecec41027d32261f93ef4afcded2671
|
@ -1 +1 @@
|
||||
08ca578f5d7e96ee914dfbdbf084f73f3e8909b0
|
||||
bcbe83f41aabb1ad3e9a1b1d2db8b1a232d1a926
|
@ -1 +1 @@
|
||||
619913794ad60026c6830bab6dbfd0527c03dcb3
|
||||
3750501024a83aeecb9eae17568c1ce449e4a5ee
|
@ -1 +1 @@
|
||||
931b6d3637a95ae8cd8c492c6fa7126cffa90444
|
||||
902c79a57b8ba29447b9a30239452ab2187b2890
|
@ -1 +1 @@
|
||||
6bbc3c03d2cb117b010f43a89db6683af9ceb8f6
|
||||
5356d88f5d4b5d16d5017ef1fa1c4716dc7a2c99
|
@ -1 +1 @@
|
||||
9b7e5806ba59d76556574f901304d48e15f9520f
|
||||
957872a1e4c1a244c061e75175fedabe66254f81
|
@ -1 +1 @@
|
||||
48c23282983ab1e14ac9a68999ba56373af61c8d
|
||||
9494bf7798aee9c87600048b7a9fef4caf09d396
|
@ -380,9 +380,6 @@ struct _MonoDomain {
|
||||
GHashTable *method_rgctx_hash;
|
||||
|
||||
GHashTable *generic_virtual_cases;
|
||||
MonoThunkFreeList **thunk_free_lists;
|
||||
|
||||
GHashTable *generic_virtual_thunks;
|
||||
|
||||
/* Information maintained by the JIT engine */
|
||||
gpointer runtime_info;
|
||||
|
@ -1239,10 +1239,6 @@ mono_domain_free (MonoDomain *domain, gboolean force)
|
||||
g_hash_table_destroy (domain->generic_virtual_cases);
|
||||
domain->generic_virtual_cases = NULL;
|
||||
}
|
||||
if (domain->generic_virtual_thunks) {
|
||||
g_hash_table_destroy (domain->generic_virtual_thunks);
|
||||
domain->generic_virtual_thunks = NULL;
|
||||
}
|
||||
if (domain->ftnptrs_hash) {
|
||||
g_hash_table_destroy (domain->ftnptrs_hash);
|
||||
domain->ftnptrs_hash = NULL;
|
||||
|
@ -1 +1 @@
|
||||
f827cb16009ae47f3c9018b424c91bac7bf1214e
|
||||
d5b8dd5db52f5b2af9fca12c6c39209d7f1e8cfc
|
@ -824,7 +824,7 @@ EXTRA_DIST = TestDriver.cs \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.6.1.5/ef43c15\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.6.2.6/db69866\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
@ -824,7 +824,7 @@ EXTRA_DIST = TestDriver.cs \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.6.1.5/ef43c15\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.6.2.6/db69866\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
@ -1 +1 @@
|
||||
af57916ed7a1e484a212d0ac404d689861bcb022
|
||||
f219af2692be7d8f8ddc330d4241f4fa99446213
|
@ -1 +1 @@
|
||||
013d44207d4a363ed79bb112074971361023c73e
|
||||
f1499dd86dfa96b2daff903a17b06f8d4f099923
|
@ -1 +1 @@
|
||||
a907decc82e6ebd6fbd2f02741729d50fcfe07b4
|
||||
c997ed5af31cb98c0f5784fe9ae8fd20edb74fc5
|
@ -1 +1 @@
|
||||
#define FULL_VERSION "Stable 4.6.1.5/ef43c15"
|
||||
#define FULL_VERSION "Stable 4.6.2.6/db69866"
|
||||
|
@ -1 +1 @@
|
||||
40e4187280464b96aac6aa5ea5d1f8539689ea02
|
||||
874d8ba620ea8fa42ef506799e1dde438a2ecd10
|
@ -1190,7 +1190,7 @@ sleep_interruptable (guint32 ms, gboolean *alerted)
|
||||
*alerted = FALSE;
|
||||
|
||||
if (ms != INFINITE)
|
||||
end = mono_100ns_ticks () + (ms * 1000 * 10);
|
||||
end = mono_msec_ticks() + ms;
|
||||
|
||||
mono_lazy_initialize (&sleep_init, sleep_initialize);
|
||||
|
||||
@ -1198,8 +1198,8 @@ sleep_interruptable (guint32 ms, gboolean *alerted)
|
||||
|
||||
for (;;) {
|
||||
if (ms != INFINITE) {
|
||||
now = mono_100ns_ticks ();
|
||||
if (now > end)
|
||||
now = mono_msec_ticks();
|
||||
if (now >= end)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1210,7 +1210,7 @@ sleep_interruptable (guint32 ms, gboolean *alerted)
|
||||
}
|
||||
|
||||
if (ms != INFINITE)
|
||||
mono_coop_cond_timedwait (&sleep_cond, &sleep_mutex, (end - now) / 10 / 1000);
|
||||
mono_coop_cond_timedwait (&sleep_cond, &sleep_mutex, end - now);
|
||||
else
|
||||
mono_coop_cond_wait (&sleep_cond, &sleep_mutex);
|
||||
|
||||
|
BIN
po/mcs/de.gmo
BIN
po/mcs/de.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
5e4e19f077ff0b739d21c49cb7d12f01406323f0
|
||||
fee7aafe68936fe6e60112c7aee544d951a9e8ba
|
BIN
po/mcs/es.gmo
BIN
po/mcs/es.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
bc163f403dc4484be068e049bd90467d235957fd
|
||||
cb117604bb38e5972606741b5f2e06b1b17885d5
|
BIN
po/mcs/ja.gmo
BIN
po/mcs/ja.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
180d9e14490b61253133b79b59798a3bda578368
|
||||
cd8f7f08a55a6b8b1540dc1471ed6207c8bfae03
|
@ -6,9 +6,9 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mono 4.6.1\n"
|
||||
"Project-Id-Version: mono 4.6.2\n"
|
||||
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
|
||||
"POT-Creation-Date: 2016-10-11 13:11+0000\n"
|
||||
"POT-Creation-Date: 2016-11-02 14:17+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
BIN
po/mcs/pt_BR.gmo
BIN
po/mcs/pt_BR.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
faaa44720891d4d758b7b091b9b95ccf4243e9db
|
||||
cf53000475e62765019bb7c49d2f7842dee456b2
|
Loading…
x
Reference in New Issue
Block a user