473,809 Members | 2,708 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inserted record doesn't seem to be commited



greeting,
In short, I have a database data directory, 2 Mysql daemon are running
parallel over it through different port and sock. Now I found a problem
that for daemon "A" its read and write are performing well, but for
daemon "B", its read operation is fine, but when I issue "insert"
statement with "B", the new record is cache:
1, from daemon B, I can see the record with "select" statement.
2, no warning/error messge after the insert operation.
3, from daemon A, I can't see the record! Data is not writen to the disk.
4, after daemon B is stop and close, record gone and next time if B will
come up again, record is not there of cause.
I've checked the unix level read/write access...all seem fine.

Why the record is not commited to the disk?
How to solve, or trace?
regards,
sheng
Jul 20 '05 #1
1 1455
bunnytail wrote:
In short, I have a database data directory, 2 Mysql daemon are running
parallel over it through different port and sock.


Don't run two instances of MySQL that use the same data directory. You
will certainly corrupt your databases!

The database process keeps some data in its memory, and writes it to
disk when it can do so efficiently. This is the point of caching. But
it means that the data on disk is not necessarily the current view of
the database while the MySQL process is running.

When you inserted a record with daemon "B", it either conflicted with a
file lock and failed without checking for error (because it assumes it
is the only one writing to a database file), or else daemon "A"
immediately overwrote the change that "B" made. This might have been
coincedental; you shouldn't rely on it.

In any case, I'm surprised it worked as well as it did. It's not
unlikely that the database would be rendered unusable by both daemons
when you try operations like you did.

If you need two MySQL instances for load-balancing or failover, they
*MUST* each use their own data directory. Use MySQL Replication if you
need to keep databases in sync.

Regards,
Bill K.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8754
by: PT | last post by:
I got a problem. And thats..... First of all, I got these three tables. ------------------- ------------------ ---------------------- tblPerson tblPersonSoftware tblSoftware ------------------- ------------------ ---------------------- PID PName PID* SID* SID SWName --- ----- --- --- --- ------ 1 Thomas 1 1 ...
2
13401
by: george | last post by:
This is like the bug from hell. It is kind of hard to explain, so please bear with me. Background Info: SQL Server 7.0, on an NT box, Active Server pages with Javascript, using ADO objects. I'm inserting simple records into a table. But one insert command is placing 2 or 3 records into the table. The 'extra' records, have the same data as the previous insert incident, (except for the timestamp).
1
1618
by: Craig | last post by:
In ASP.NET 2.0 and the formview control how do you get the value of the identity field of a newly inserted record? In ASP.NET 1.1 after the new record was saved you just said intNewIdentityID = Dataset.tblMtTable.IndentityID Simple but can't seem to do it in the formview. Thanks
22
18819
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4. The system is client/server, multiusers based. The MDBs are using record locking. Here is part of the code: Dim wkSpace As Workspace, db As Database Dim rstTrans As DAO.Recordset Set wkSpace = DBEngine.Workspaces(0)
5
1633
by: Jan | last post by:
Hello, Just after the new record is inserted in the database using a Detailsview control, i would like to display a short message "the record is inserted". In the aspx file, i defined a hiddenfiekd: <asp:HiddenField ID="HiddenField1" runat="server" Visible="false" /> In the code-behind: Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles
1
2411
by: andy | last post by:
I have several forms with formviewa on them. When a new record is inserted the users want to see the readonly version of that record. Default behaviour is to show the first record in the collection. So if there are 5 entries and the user adds a 6th they want to see the 6th rather than the 1st after it's added. Changing the criteria for the collection they see is not an option. My quick and dirty solution is to sort on descending id so...
2
12812
by: TimSki | last post by:
Hi, In my asp page I am inserting a record in to the sql server 2005 db as follows... OpenDataConnection() oConn.BeginTrans set cm = CreateObject("ADODB.Command") set cm.ActiveConnection = oConn cm.CommandText ="INSERT INTO t_test( blah blah")
0
1622
by: fig000 | last post by:
Hi, I'm using an objectdatasource. The insert procedure called by the objectdatasource is in a separate library file outside of the aspx and the codebehind that is using the objectdatasource in question (I guess that separate file would be called a bll). I had originally used the parameter list method to pass the inserted values to thie insert procedure which also gave me the ability to add a retun parameter to access the newly...
2
5834
by: HotFrost | last post by:
Hello everyone, i am trying to work with linked servers... The local server is the one used by UPS worldwide software (it is Microsoft SQL Server Desktop Engine, v 8.00.2050). The linked server is 2005 MS server. on update/insert event for some table i hooked up the trigger that connects to linked server and updates the record in some DB. To test, i create a stored procedure that updates the record in UPS table that has that trigger....
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7660
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3014
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.