diff options
author | Tedd Hansen | 2008-01-19 21:51:16 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-01-19 21:51:16 +0000 |
commit | 056b2940b4d7b9b5cbd7a2c84d93f8f38f9b78a9 (patch) | |
tree | 7a6044ea0830485b064548903d75374a64a84317 /OpenSim/Framework/Data.MySQL | |
parent | Removed mega-debugging. (diff) | |
download | opensim-SC-056b2940b4d7b9b5cbd7a2c84d93f8f38f9b78a9.zip opensim-SC-056b2940b4d7b9b5cbd7a2c84d93f8f38f9b78a9.tar.gz opensim-SC-056b2940b4d7b9b5cbd7a2c84d93f8f38f9b78a9.tar.bz2 opensim-SC-056b2940b4d7b9b5cbd7a2c84d93f8f38f9b78a9.tar.xz |
That didn't work, trying with TableAdapter.FillSchema(DataSet, SchemaType.Source)
Diffstat (limited to 'OpenSim/Framework/Data.MySQL')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs index d9a39a3..4e92af2 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | |||
@@ -108,11 +108,13 @@ 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. | ||
111 | m_primDataAdapter.Fill(m_primTable); | 112 | m_primDataAdapter.Fill(m_primTable); |
112 | 113 | ||
113 | m_shapeTable = createShapeTable(); | 114 | m_shapeTable = createShapeTable(); |
114 | m_dataSet.Tables.Add(m_shapeTable); | 115 | m_dataSet.Tables.Add(m_shapeTable); |
115 | SetupShapeCommands(m_shapeDataAdapter, m_connection); | 116 | 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. | ||
116 | m_shapeDataAdapter.Fill(m_shapeTable); | 118 | m_shapeDataAdapter.Fill(m_shapeTable); |
117 | 119 | ||
118 | if (persistPrimInventories) | 120 | if (persistPrimInventories) |
@@ -120,22 +122,26 @@ namespace OpenSim.Framework.Data.MySQL | |||
120 | m_itemsTable = createItemsTable(); | 122 | m_itemsTable = createItemsTable(); |
121 | m_dataSet.Tables.Add(m_itemsTable); | 123 | m_dataSet.Tables.Add(m_itemsTable); |
122 | SetupItemsCommands(m_itemsDataAdapter, m_connection); | 124 | 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. | ||
123 | m_itemsDataAdapter.Fill(m_itemsTable); | 126 | m_itemsDataAdapter.Fill(m_itemsTable); |
124 | } | 127 | } |
125 | 128 | ||
126 | m_terrainTable = createTerrainTable(); | 129 | m_terrainTable = createTerrainTable(); |
127 | m_dataSet.Tables.Add(m_terrainTable); | 130 | m_dataSet.Tables.Add(m_terrainTable); |
128 | SetupTerrainCommands(m_terrainDataAdapter, m_connection); | 131 | 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. | ||
129 | m_terrainDataAdapter.Fill(m_terrainTable); | 133 | m_terrainDataAdapter.Fill(m_terrainTable); |
130 | 134 | ||
131 | m_landTable = createLandTable(); | 135 | m_landTable = createLandTable(); |
132 | m_dataSet.Tables.Add(m_landTable); | 136 | m_dataSet.Tables.Add(m_landTable); |
133 | setupLandCommands(m_landDataAdapter, m_connection); | 137 | 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. | ||
134 | m_landDataAdapter.Fill(m_landTable); | 139 | m_landDataAdapter.Fill(m_landTable); |
135 | 140 | ||
136 | m_landAccessListTable = createLandAccessListTable(); | 141 | m_landAccessListTable = createLandAccessListTable(); |
137 | m_dataSet.Tables.Add(m_landAccessListTable); | 142 | m_dataSet.Tables.Add(m_landAccessListTable); |
138 | setupLandAccessCommands(m_landAccessListDataAdapter, m_connection); | 143 | 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. | ||
139 | m_landAccessListDataAdapter.Fill(m_landAccessListTable); | 145 | m_landAccessListDataAdapter.Fill(m_landAccessListTable); |
140 | } | 146 | } |
141 | } | 147 | } |
@@ -1581,14 +1587,22 @@ namespace OpenSim.Framework.Data.MySQL | |||
1581 | DataSet tmpDS = new DataSet(); | 1587 | DataSet tmpDS = new DataSet(); |
1582 | try | 1588 | try |
1583 | { | 1589 | { |
1590 | pDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1584 | 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. | ||
1585 | sDa.Fill(tmpDS, "primshapes"); | 1593 | sDa.Fill(tmpDS, "primshapes"); |
1586 | 1594 | ||
1587 | if (persistPrimInventories) | 1595 | if (persistPrimInventories) |
1596 | { | ||
1597 | iDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1588 | iDa.Fill(tmpDS, "primitems"); | 1598 | iDa.Fill(tmpDS, "primitems"); |
1589 | 1599 | } | |
1600 | |||
1601 | tDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1590 | tDa.Fill(tmpDS, "terrain"); | 1602 | tDa.Fill(tmpDS, "terrain"); |
1603 | lDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1591 | lDa.Fill(tmpDS, "land"); | 1604 | lDa.Fill(tmpDS, "land"); |
1605 | lalDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1592 | lalDa.Fill(tmpDS, "landaccesslist"); | 1606 | lalDa.Fill(tmpDS, "landaccesslist"); |
1593 | } | 1607 | } |
1594 | catch (MySqlException) | 1608 | catch (MySqlException) |
@@ -1597,14 +1611,22 @@ namespace OpenSim.Framework.Data.MySQL | |||
1597 | InitDB(conn); | 1611 | InitDB(conn); |
1598 | } | 1612 | } |
1599 | 1613 | ||
1614 | pDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1600 | pDa.Fill(tmpDS, "prims"); | 1615 | pDa.Fill(tmpDS, "prims"); |
1616 | sDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1601 | sDa.Fill(tmpDS, "primshapes"); | 1617 | sDa.Fill(tmpDS, "primshapes"); |
1602 | 1618 | ||
1603 | if (persistPrimInventories) | 1619 | if (persistPrimInventories) |
1620 | { | ||
1621 | iDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1604 | iDa.Fill(tmpDS, "primitems"); | 1622 | iDa.Fill(tmpDS, "primitems"); |
1605 | 1623 | } | |
1624 | |||
1625 | tDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1606 | tDa.Fill(tmpDS, "terrain"); | 1626 | tDa.Fill(tmpDS, "terrain"); |
1627 | lDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1607 | lDa.Fill(tmpDS, "land"); | 1628 | lDa.Fill(tmpDS, "land"); |
1629 | lalDa.FillSchema(tmpDS, SchemaType.Source); // to avoid random System.Data.DBConcurrencyException: Concurrency violation: the UpdateCommand affected 0 records. | ||
1608 | lalDa.Fill(tmpDS, "landaccesslist"); | 1630 | lalDa.Fill(tmpDS, "landaccesslist"); |
1609 | 1631 | ||
1610 | foreach (DataColumn col in createPrimTable().Columns) | 1632 | foreach (DataColumn col in createPrimTable().Columns) |