diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs index 4e92af2..0d2bd43 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | |||
@@ -108,13 +108,11 @@ namespace OpenSim.Framework.Data.MySQL | |||
108 | m_primTable = createPrimTable(); | 108 | m_primTable = createPrimTable(); |
109 | m_dataSet.Tables.Add(m_primTable); | 109 | m_dataSet.Tables.Add(m_primTable); |
110 | SetupPrimCommands(m_primDataAdapter, m_connection); | 110 | SetupPrimCommands(m_primDataAdapter, m_connection); |
111 | m_primDataAdapter.FillSchema(m_primTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
112 | m_primDataAdapter.Fill(m_primTable); | 111 | m_primDataAdapter.Fill(m_primTable); |
113 | 112 | ||
114 | m_shapeTable = createShapeTable(); | 113 | m_shapeTable = createShapeTable(); |
115 | m_dataSet.Tables.Add(m_shapeTable); | 114 | m_dataSet.Tables.Add(m_shapeTable); |
116 | SetupShapeCommands(m_shapeDataAdapter, m_connection); | 115 | SetupShapeCommands(m_shapeDataAdapter, m_connection); |
117 | m_shapeDataAdapter.FillSchema(m_shapeTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
118 | m_shapeDataAdapter.Fill(m_shapeTable); | 116 | m_shapeDataAdapter.Fill(m_shapeTable); |
119 | 117 | ||
120 | if (persistPrimInventories) | 118 | if (persistPrimInventories) |
@@ -122,26 +120,22 @@ namespace OpenSim.Framework.Data.MySQL | |||
122 | m_itemsTable = createItemsTable(); | 120 | m_itemsTable = createItemsTable(); |
123 | m_dataSet.Tables.Add(m_itemsTable); | 121 | m_dataSet.Tables.Add(m_itemsTable); |
124 | SetupItemsCommands(m_itemsDataAdapter, m_connection); | 122 | SetupItemsCommands(m_itemsDataAdapter, m_connection); |
125 | m_itemsDataAdapter.FillSchema(m_itemsTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
126 | m_itemsDataAdapter.Fill(m_itemsTable); | 123 | m_itemsDataAdapter.Fill(m_itemsTable); |
127 | } | 124 | } |
128 | 125 | ||
129 | m_terrainTable = createTerrainTable(); | 126 | m_terrainTable = createTerrainTable(); |
130 | m_dataSet.Tables.Add(m_terrainTable); | 127 | m_dataSet.Tables.Add(m_terrainTable); |
131 | SetupTerrainCommands(m_terrainDataAdapter, m_connection); | 128 | SetupTerrainCommands(m_terrainDataAdapter, m_connection); |
132 | m_terrainDataAdapter.FillSchema(m_terrainTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
133 | m_terrainDataAdapter.Fill(m_terrainTable); | 129 | m_terrainDataAdapter.Fill(m_terrainTable); |
134 | 130 | ||
135 | m_landTable = createLandTable(); | 131 | m_landTable = createLandTable(); |
136 | m_dataSet.Tables.Add(m_landTable); | 132 | m_dataSet.Tables.Add(m_landTable); |
137 | setupLandCommands(m_landDataAdapter, m_connection); | 133 | setupLandCommands(m_landDataAdapter, m_connection); |
138 | m_landDataAdapter.FillSchema(m_landTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
139 | m_landDataAdapter.Fill(m_landTable); | 134 | m_landDataAdapter.Fill(m_landTable); |
140 | 135 | ||
141 | m_landAccessListTable = createLandAccessListTable(); | 136 | m_landAccessListTable = createLandAccessListTable(); |
142 | m_dataSet.Tables.Add(m_landAccessListTable); | 137 | m_dataSet.Tables.Add(m_landAccessListTable); |
143 | setupLandAccessCommands(m_landAccessListDataAdapter, m_connection); | 138 | setupLandAccessCommands(m_landAccessListDataAdapter, m_connection); |
144 | m_landAccessListDataAdapter.FillSchema(m_landAccessListTable, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
145 | m_landAccessListDataAdapter.Fill(m_landAccessListTable); | 139 | m_landAccessListDataAdapter.Fill(m_landAccessListTable); |
146 | } | 140 | } |
147 | } | 141 | } |
@@ -525,18 +519,25 @@ namespace OpenSim.Framework.Data.MySQL | |||
525 | 519 | ||
526 | // DisplayDataSet(m_dataSet, "Region DataSet"); | 520 | // DisplayDataSet(m_dataSet, "Region DataSet"); |
527 | 521 | ||
522 | MainLog.Instance.Verbose("DATASTORE", "Tedd debug: m_primDataAdapter.Update(m_primTable)"); | ||
528 | m_primDataAdapter.Update(m_primTable); | 523 | m_primDataAdapter.Update(m_primTable); |
524 | MainLog.Instance.Verbose("DATASTORE", "Tedd debug: m_shapeDataAdapter.Update(m_shapeTable)"); | ||
529 | m_shapeDataAdapter.Update(m_shapeTable); | 525 | m_shapeDataAdapter.Update(m_shapeTable); |
530 | 526 | ||
531 | if (persistPrimInventories) | 527 | if (persistPrimInventories) |
532 | { | 528 | { |
529 | MainLog.Instance.Verbose("DATASTORE", "Tedd debug: m_itemsDataAdapter.Update(m_itemsTable)"); | ||
533 | m_itemsDataAdapter.Update(m_itemsTable); | 530 | m_itemsDataAdapter.Update(m_itemsTable); |
534 | } | 531 | } |
535 | 532 | ||
533 | MainLog.Instance.Verbose("DATASTORE", "Tedd debug: m_terrainDataAdapter.Update(m_terrainTable)"); | ||
536 | m_terrainDataAdapter.Update(m_terrainTable); | 534 | m_terrainDataAdapter.Update(m_terrainTable); |
535 | MainLog.Instance.Verbose("DATASTORE", "Tedd debug: m_landDataAdapter.Update(m_landTable)"); | ||
537 | m_landDataAdapter.Update(m_landTable); | 536 | m_landDataAdapter.Update(m_landTable); |
537 | MainLog.Instance.Verbose("DATASTORE", "Tedd debug: m_landAccessListDataAdapter.Update(m_landAccessListTable)"); | ||
538 | m_landAccessListDataAdapter.Update(m_landAccessListTable); | 538 | m_landAccessListDataAdapter.Update(m_landAccessListTable); |
539 | 539 | ||
540 | MainLog.Instance.Verbose("DATASTORE", "Tedd debug: m_dataSet.AcceptChanges()"); | ||
540 | m_dataSet.AcceptChanges(); | 541 | m_dataSet.AcceptChanges(); |
541 | } | 542 | } |
542 | 543 | ||
@@ -1587,22 +1588,16 @@ namespace OpenSim.Framework.Data.MySQL | |||
1587 | DataSet tmpDS = new DataSet(); | 1588 | DataSet tmpDS = new DataSet(); |
1588 | try | 1589 | try |
1589 | { | 1590 | { |
1590 | pDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1591 | pDa.Fill(tmpDS, "prims"); | 1591 | pDa.Fill(tmpDS, "prims"); |
1592 | sDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1593 | sDa.Fill(tmpDS, "primshapes"); | 1592 | sDa.Fill(tmpDS, "primshapes"); |
1594 | 1593 | ||
1595 | if (persistPrimInventories) | 1594 | if (persistPrimInventories) |
1596 | { | 1595 | { |
1597 | iDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1598 | iDa.Fill(tmpDS, "primitems"); | 1596 | iDa.Fill(tmpDS, "primitems"); |
1599 | } | 1597 | } |
1600 | 1598 | ||
1601 | tDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1602 | tDa.Fill(tmpDS, "terrain"); | 1599 | tDa.Fill(tmpDS, "terrain"); |
1603 | lDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1604 | lDa.Fill(tmpDS, "land"); | 1600 | lDa.Fill(tmpDS, "land"); |
1605 | lalDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1606 | lalDa.Fill(tmpDS, "landaccesslist"); | 1601 | lalDa.Fill(tmpDS, "landaccesslist"); |
1607 | } | 1602 | } |
1608 | catch (MySqlException) | 1603 | catch (MySqlException) |
@@ -1611,22 +1606,16 @@ namespace OpenSim.Framework.Data.MySQL | |||
1611 | InitDB(conn); | 1606 | InitDB(conn); |
1612 | } | 1607 | } |
1613 | 1608 | ||
1614 | pDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1615 | pDa.Fill(tmpDS, "prims"); | 1609 | pDa.Fill(tmpDS, "prims"); |
1616 | sDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1617 | sDa.Fill(tmpDS, "primshapes"); | 1610 | sDa.Fill(tmpDS, "primshapes"); |
1618 | 1611 | ||
1619 | if (persistPrimInventories) | 1612 | if (persistPrimInventories) |
1620 | { | 1613 | { |
1621 | iDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1622 | iDa.Fill(tmpDS, "primitems"); | 1614 | iDa.Fill(tmpDS, "primitems"); |
1623 | } | 1615 | } |
1624 | 1616 | ||
1625 | tDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1626 | tDa.Fill(tmpDS, "terrain"); | 1617 | tDa.Fill(tmpDS, "terrain"); |
1627 | lDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1628 | lDa.Fill(tmpDS, "land"); | 1618 | lDa.Fill(tmpDS, "land"); |
1629 | lalDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1630 | lalDa.Fill(tmpDS, "landaccesslist"); | 1619 | lalDa.Fill(tmpDS, "landaccesslist"); |
1631 | 1620 | ||
1632 | foreach (DataColumn col in createPrimTable().Columns) | 1621 | foreach (DataColumn col in createPrimTable().Columns) |