Imported Upstream version 6.6.0.152
Former-commit-id: 86ad01d4d9648b8b15a92915cfbc25f843234e8e
This commit is contained in:
parent
3a44987f03
commit
179dd0da4b
@ -1 +1 @@
|
||||
8f7913d9589d4661ea36bc57247b1c54f9c884d9
|
||||
8422375f8c7d3090c1448b1e3991145993ac78ea
|
@ -1 +1 @@
|
||||
27f21cf351ea959556b90627b6b6848c4b2bd285
|
||||
1607281d38b3c68181c426167578c83839def078
|
@ -1257,15 +1257,30 @@ int32_t SystemNative_CopyFile(intptr_t sourceFd, intptr_t destinationFd)
|
||||
int ret;
|
||||
struct stat_ sourceStat;
|
||||
bool copied = false;
|
||||
#if HAVE_SENDFILE_4
|
||||
// If sendfile is available (Linux), try to use it, as the whole copy
|
||||
// can be performed in the kernel, without lots of unnecessary copying.
|
||||
|
||||
// First, stat the source file.
|
||||
while ((ret = fstat_(inFd, &sourceStat)) < 0 && errno == EINTR);
|
||||
if (ret != 0)
|
||||
{
|
||||
// If we can't stat() it, then we likely don't have permission to read it.
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Copy permissions. This fchmod() needs to happen prior to writing anything into
|
||||
// the file to avoid possibly leaking any private data.
|
||||
while ((ret = fchmod(outFd, sourceStat.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO))) < 0 && errno == EINTR);
|
||||
#if !TARGET_ANDROID
|
||||
// On Android, we are not allowed to modify permissions, but the copy should still succeed;
|
||||
// see https://github.com/mono/mono/issues/17133 for details.
|
||||
if (ret != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_SENDFILE_4
|
||||
// If sendfile is available (Linux), try to use it, as the whole copy
|
||||
// can be performed in the kernel, without lots of unnecessary copying.
|
||||
|
||||
// On 32-bit, if you use 64-bit offsets, the last argument of `sendfile' will be a
|
||||
// `size_t' a 32-bit integer while the `st_size' field of the stat structure will be off64_t.
|
||||
@ -1313,37 +1328,30 @@ int32_t SystemNative_CopyFile(intptr_t sourceFd, intptr_t destinationFd)
|
||||
// from the source file. First copy the file times.
|
||||
// If futimes nor futimes are available on this platform, file times will
|
||||
// not be copied over.
|
||||
while ((ret = fstat_(inFd, &sourceStat)) < 0 && errno == EINTR);
|
||||
if (ret == 0)
|
||||
{
|
||||
#if HAVE_FUTIMENS
|
||||
// futimens is prefered because it has a higher resolution.
|
||||
struct timespec origTimes[2];
|
||||
origTimes[0].tv_sec = (time_t)sourceStat.st_atime;
|
||||
origTimes[0].tv_nsec = ST_ATIME_NSEC(&sourceStat);
|
||||
origTimes[1].tv_sec = (time_t)sourceStat.st_mtime;
|
||||
origTimes[1].tv_nsec = ST_MTIME_NSEC(&sourceStat);
|
||||
while ((ret = futimens(outFd, origTimes)) < 0 && errno == EINTR);
|
||||
// futimens is prefered because it has a higher resolution.
|
||||
struct timespec origTimes[2];
|
||||
origTimes[0].tv_sec = (time_t)sourceStat.st_atime;
|
||||
origTimes[0].tv_nsec = ST_ATIME_NSEC(&sourceStat);
|
||||
origTimes[1].tv_sec = (time_t)sourceStat.st_mtime;
|
||||
origTimes[1].tv_nsec = ST_MTIME_NSEC(&sourceStat);
|
||||
while ((ret = futimens(outFd, origTimes)) < 0 && errno == EINTR);
|
||||
#elif HAVE_FUTIMES
|
||||
struct timeval origTimes[2];
|
||||
origTimes[0].tv_sec = sourceStat.st_atime;
|
||||
origTimes[0].tv_usec = ST_ATIME_NSEC(&sourceStat) / 1000;
|
||||
origTimes[1].tv_sec = sourceStat.st_mtime;
|
||||
origTimes[1].tv_usec = ST_MTIME_NSEC(&sourceStat) / 1000;
|
||||
while ((ret = futimes(outFd, origTimes)) < 0 && errno == EINTR);
|
||||
struct timeval origTimes[2];
|
||||
origTimes[0].tv_sec = sourceStat.st_atime;
|
||||
origTimes[0].tv_usec = ST_ATIME_NSEC(&sourceStat) / 1000;
|
||||
origTimes[1].tv_sec = sourceStat.st_mtime;
|
||||
origTimes[1].tv_usec = ST_MTIME_NSEC(&sourceStat) / 1000;
|
||||
while ((ret = futimes(outFd, origTimes)) < 0 && errno == EINTR);
|
||||
#endif
|
||||
}
|
||||
if (ret != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Then copy permissions.
|
||||
while ((ret = fchmod(outFd, sourceStat.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO))) < 0 && errno == EINTR);
|
||||
#if !TARGET_ANDROID
|
||||
// On Android, the copy should still succeed even if copying the file times didn't.
|
||||
if (ret != 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
#endif // HAVE_FCOPYFILE
|
||||
|
@ -1 +1 @@
|
||||
40a20092f6a571ef9598fc7477ff948b5b60cc32
|
||||
ed356e5ce8184cee9ce5336998ed241a0cc2e6eb
|
@ -231,6 +231,8 @@ namespace System.Data.SqlClient
|
||||
destination._sourceVersion = _sourceVersion;
|
||||
destination._sourceColumnNullMapping = _sourceColumnNullMapping;
|
||||
destination._isNullable = _isNullable;
|
||||
destination._parameterName = _parameterName;
|
||||
destination._isNull = _isNull;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,107 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
|
||||
namespace System.Data.SqlClient.ManualTesting.Tests
|
||||
{
|
||||
public class SqlAdapterUpdateBatch
|
||||
{
|
||||
[CheckConnStrSetupFact]
|
||||
public void SqlAdapterTest()
|
||||
{
|
||||
string tableName = "BatchDemoTable";
|
||||
try
|
||||
{
|
||||
var createTableQuery = "IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='BatchDemoTable' AND xtype='U')" +
|
||||
" CREATE TABLE [dbo].[" + tableName + "]([TransactionNumber][int] IDENTITY(1, 1) NOT NULL,[Level] [nvarchar] (50) NOT NULL," +
|
||||
"[Message] [nvarchar] (500) NOT NULL,[EventTime] [datetime]NOT NULL,CONSTRAINT[PK_BatchDemoTable] " +
|
||||
"PRIMARY KEY CLUSTERED([TransactionNumber] ASC)WITH(PAD_INDEX = OFF,STATISTICS_NORECOMPUTE = OFF, " +
|
||||
"IGNORE_DUP_KEY = OFF,ALLOW_ROW_LOCKS = ON,ALLOW_PAGE_LOCKS = ON,FILLFACTOR = 90) ON[PRIMARY]) ON[PRIMARY]";
|
||||
|
||||
using (var connection = new SqlConnection(DataTestUtility.TcpConnStr))
|
||||
using (var cmd = new SqlCommand(createTableQuery, connection))
|
||||
{
|
||||
connection.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
ExecuteNonQueries();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
Console.WriteLine(ex.StackTrace);
|
||||
}
|
||||
finally
|
||||
{
|
||||
var dropTableQuery = "DROP TABLE IF EXISTS " + tableName;
|
||||
using (var connection = new SqlConnection(DataTestUtility.TcpConnStr))
|
||||
using (var cmd = new SqlCommand(dropTableQuery, connection))
|
||||
{
|
||||
connection.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class EventInfo
|
||||
{
|
||||
public string Level { get; set; }
|
||||
public string Message { get; set; }
|
||||
public DateTime EventTime { get; set; }
|
||||
|
||||
public EventInfo()
|
||||
{
|
||||
EventTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ExecuteNonQueries()
|
||||
{
|
||||
List<EventInfo> entities = new List<EventInfo>
|
||||
{
|
||||
new EventInfo {Level = "L1", Message = "Message 1"},
|
||||
new EventInfo {Level = "L2", Message = "Message 2"},
|
||||
new EventInfo {Level = "L3", Message = "Message 3"},
|
||||
new EventInfo {Level = "L4", Message = "Message 4"},
|
||||
};
|
||||
|
||||
var sql = "INSERT INTO BatchDemoTable(Level, Message, EventTime) VALUES(@Level, @Message, @EventTime)";
|
||||
using (var connection = new SqlConnection(DataTestUtility.TcpConnStr))
|
||||
using (var adapter = new SqlDataAdapter())
|
||||
using (var cmd = new SqlCommand(sql, connection))
|
||||
{
|
||||
cmd.Parameters.Add(new SqlParameter("@Level", System.Data.SqlDbType.NVarChar, 50, "Level"));
|
||||
cmd.Parameters.Add(new SqlParameter("@Message", SqlDbType.NVarChar, 500, "Message"));
|
||||
cmd.Parameters.Add(new SqlParameter("@EventTime", SqlDbType.DateTime, 0, "EventTime"));
|
||||
cmd.UpdatedRowSource = UpdateRowSource.None;
|
||||
|
||||
adapter.InsertCommand = cmd;
|
||||
adapter.UpdateBatchSize = 2;
|
||||
|
||||
adapter.Update(ConvertToTable(entities));
|
||||
}
|
||||
}
|
||||
private static DataTable ConvertToTable(List<EventInfo> entities)
|
||||
{
|
||||
var table = new DataTable(typeof(EventInfo).Name);
|
||||
|
||||
table.Columns.Add("Level", typeof(string));
|
||||
table.Columns.Add("Message", typeof(string));
|
||||
table.Columns.Add("EventTime", typeof(DateTime));
|
||||
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
var row = table.NewRow();
|
||||
row["Level"] = entity.Level;
|
||||
row["Message"] = entity.Message;
|
||||
row["EventTime"] = entity.EventTime;
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
return table;
|
||||
}
|
||||
}
|
||||
}
|
@ -33,6 +33,7 @@
|
||||
<Compile Include="SQL\ParameterTest\DateTimeVariantTest.cs" />
|
||||
<Compile Include="SQL\ParameterTest\OutputParameter.cs" />
|
||||
<Compile Include="SQL\ParameterTest\ParametersTest.cs" />
|
||||
<Compile Include="SQL\ParameterTest\SqlAdapterUpdateBatch.cs" />
|
||||
<Compile Include="SQL\ParameterTest\SqlVariantParam.cs" />
|
||||
<Compile Include="SQL\ParameterTest\SteAttribute.cs" />
|
||||
<Compile Include="SQL\ParameterTest\SteParam.cs" />
|
||||
|
@ -41,7 +41,7 @@ static partial class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "6.6.0.148";
|
||||
public const string MonoVersion = "6.6.0.152";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -1 +1 @@
|
||||
d6873a6a44b22203212c3e27b6251f29330b876c
|
||||
8cbfffc44bc2c1521fa9c01477735ee6ce7d54cc
|
@ -1 +1 @@
|
||||
9a2509d048a11aa654ef116188660d4105b85cfb
|
||||
8870cf46c56544531aedebf91084549d99fe7e95
|
@ -1 +1 @@
|
||||
1977e3c1438869bf78c984b562e3b18d0e22c0d8
|
||||
0021e8ec4371d5333d963f5c03e3d072839ff571
|
@ -1 +1 @@
|
||||
2cc3f9d0e5eca6ca7c3153298e0c31d881db1d9c
|
||||
ee3235d2af5cd9092f327140fae870867ca1dc8c
|
@ -1 +1 @@
|
||||
cb882209764b14ee7b455c6de33db52b4ce0b86c
|
||||
ea2a116e0c48838a4805f5d3c9071a1ef062ae72
|
@ -1 +1 @@
|
||||
87775866d1524d54375f9c8e42483c788116d21e
|
||||
08591ef63807e12a11f7d8fcb2afe12e35913b2a
|
@ -1 +1 @@
|
||||
c260001f7211d72828c8a726f8ba8bf2a2920042
|
||||
cacfcceab39d08330e0348dcd454339fbbf3e2f3
|
@ -1 +1 @@
|
||||
d6873a6a44b22203212c3e27b6251f29330b876c
|
||||
8cbfffc44bc2c1521fa9c01477735ee6ce7d54cc
|
@ -1 +1 @@
|
||||
9a2509d048a11aa654ef116188660d4105b85cfb
|
||||
8870cf46c56544531aedebf91084549d99fe7e95
|
@ -1 +1 @@
|
||||
1977e3c1438869bf78c984b562e3b18d0e22c0d8
|
||||
0021e8ec4371d5333d963f5c03e3d072839ff571
|
@ -1 +1 @@
|
||||
2cc3f9d0e5eca6ca7c3153298e0c31d881db1d9c
|
||||
ee3235d2af5cd9092f327140fae870867ca1dc8c
|
@ -1 +1 @@
|
||||
cb882209764b14ee7b455c6de33db52b4ce0b86c
|
||||
ea2a116e0c48838a4805f5d3c9071a1ef062ae72
|
@ -1 +1 @@
|
||||
87775866d1524d54375f9c8e42483c788116d21e
|
||||
08591ef63807e12a11f7d8fcb2afe12e35913b2a
|
@ -1 +1 @@
|
||||
64580f738aafd340069a5cdd3e7e4b8950848c3b
|
||||
b2d94f95e17e0a4ae2c4853c45230afb5cbd4af4
|
@ -1 +1 @@
|
||||
c260001f7211d72828c8a726f8ba8bf2a2920042
|
||||
cacfcceab39d08330e0348dcd454339fbbf3e2f3
|
@ -1 +1 @@
|
||||
d6873a6a44b22203212c3e27b6251f29330b876c
|
||||
8cbfffc44bc2c1521fa9c01477735ee6ce7d54cc
|
@ -1 +1 @@
|
||||
9a2509d048a11aa654ef116188660d4105b85cfb
|
||||
8870cf46c56544531aedebf91084549d99fe7e95
|
@ -1 +1 @@
|
||||
1977e3c1438869bf78c984b562e3b18d0e22c0d8
|
||||
0021e8ec4371d5333d963f5c03e3d072839ff571
|
@ -1 +1 @@
|
||||
2cc3f9d0e5eca6ca7c3153298e0c31d881db1d9c
|
||||
ee3235d2af5cd9092f327140fae870867ca1dc8c
|
@ -1 +1 @@
|
||||
cb882209764b14ee7b455c6de33db52b4ce0b86c
|
||||
ea2a116e0c48838a4805f5d3c9071a1ef062ae72
|
@ -1 +1 @@
|
||||
87775866d1524d54375f9c8e42483c788116d21e
|
||||
08591ef63807e12a11f7d8fcb2afe12e35913b2a
|
@ -1 +1 @@
|
||||
64580f738aafd340069a5cdd3e7e4b8950848c3b
|
||||
b2d94f95e17e0a4ae2c4853c45230afb5cbd4af4
|
@ -1 +1 @@
|
||||
c260001f7211d72828c8a726f8ba8bf2a2920042
|
||||
cacfcceab39d08330e0348dcd454339fbbf3e2f3
|
@ -1 +1 @@
|
||||
d6873a6a44b22203212c3e27b6251f29330b876c
|
||||
8cbfffc44bc2c1521fa9c01477735ee6ce7d54cc
|
@ -1 +1 @@
|
||||
9a2509d048a11aa654ef116188660d4105b85cfb
|
||||
8870cf46c56544531aedebf91084549d99fe7e95
|
@ -1 +1 @@
|
||||
7ec86186854c76dc4c88bd3a1dfc5d10a8ae0227
|
||||
6eb524e83c500ffe4769f9d280c7d84a98416f54
|
@ -1 +1 @@
|
||||
2cc3f9d0e5eca6ca7c3153298e0c31d881db1d9c
|
||||
ee3235d2af5cd9092f327140fae870867ca1dc8c
|
@ -1 +1 @@
|
||||
cb882209764b14ee7b455c6de33db52b4ce0b86c
|
||||
ea2a116e0c48838a4805f5d3c9071a1ef062ae72
|
@ -1 +1 @@
|
||||
87775866d1524d54375f9c8e42483c788116d21e
|
||||
08591ef63807e12a11f7d8fcb2afe12e35913b2a
|
@ -1 +1 @@
|
||||
64580f738aafd340069a5cdd3e7e4b8950848c3b
|
||||
b2d94f95e17e0a4ae2c4853c45230afb5cbd4af4
|
@ -1 +1 @@
|
||||
cb73a7c13051b14270295b140b4e984d06a0308e
|
||||
5e17d78f358c64788a1930f6cf8b688cb3a766c0
|
@ -1 +1 @@
|
||||
#define FULL_VERSION "explicit/6ac1ff7"
|
||||
#define FULL_VERSION "explicit/e1ef774"
|
||||
|
BIN
po/mcs/de.gmo
BIN
po/mcs/de.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
41ea0fc0f9d22be67f4859aacf1a786e44cd6c6f
|
||||
8cc95576eb5eb31e48a53f64f6de4276a364304a
|
BIN
po/mcs/es.gmo
BIN
po/mcs/es.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
3be0a9ff32ee8078e4f6f9378ea4fad96b496adb
|
||||
69e831edcfc7c683b78a333fce6892042fdd3a07
|
BIN
po/mcs/ja.gmo
BIN
po/mcs/ja.gmo
Binary file not shown.
@ -1 +1 @@
|
||||
d213577b3c27ff7105b92058e6c0116f383c6a3c
|
||||
2377cf76f6d252767c511460a31d59b12a2eb459
|
@ -6,9 +6,9 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mono 6.6.0.148\n"
|
||||
"Project-Id-Version: mono 6.6.0.152\n"
|
||||
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
|
||||
"POT-Creation-Date: 2019-10-31 08:34+0000\n"
|
||||
"POT-Creation-Date: 2019-11-02 08:33+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 @@
|
||||
cca62399a21fe8055c1a33d5f0a8db0bc6f82955
|
||||
fb3be47f9dda9b5db21cad121962ae9986a871a9
|
Loading…
x
Reference in New Issue
Block a user