An item with the same key has already been added

Compares and synchronizes MySQL database content

Moderators: Chris Auckland, eddie davis, Michael Christofides

An item with the same key has already been added

Postby whatdoctorsknow » Tue Jan 07, 2014 7:32 pm

Trying to use MySQL data compare trial. but when connecting to the source MySQL database, I get the following error.

An item with the same key has already been added

How do I fix the error.

Cheers
Luke
whatdoctorsknow
 
Posts: 3
Joined: Tue Jan 07, 2014 7:25 pm

Bug Report

Postby whatdoctorsknow » Tue Jan 07, 2014 8:25 pm

This is the bug report

Bug report generated at 1/7/2014 12:14:24 PM

Program version 1.0.0.473


RedGate.Shared.Exceptions.DetailedPopulationException: An item with the same key has already been added. ---> System.ArgumentException: An item with the same key has already been added.

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)

at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)

at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)

at #Rjmb.#VzD.Add(#NrPb item)

at #Rjmb.#AAD.Add(#NrPb item)

at #Rjmb.#yBD.#8WD()

at #Rjmb.#yBD.#vl()

--- End of inner exception stack trace ---

at #Rjmb.#yBD.#vl()

at #5jmb.#4jmb.#l7B(#yBD databasePopulator)

at #5jmb.#4jmb.#t.#v3.#HIM()

at RedGate.Shared.Controls.ProgressDialogEx.e()


Last field accessed: is_nullable returning a System.String value NO


Last 5 rows retrieved from database:

nmotest,CVX_MAP,cvx_code,,varchar(5),NO,varchar,5,,

nmotest,app_docotr_cpt_rule,cpt_id,,varchar(36),NO,varchar,36,,

nmotest,app_docotr_cpt_rule,clinic_id,,varchar(36),NO,varchar,36,,

nmotest,app_docotr_cpt_rule,modifiedById,,varchar(36),YES,varchar,36,,

nmotest,app_docotr_cpt_rule,createdById,,varchar(36),YES,varchar,36,,
whatdoctorsknow
 
Posts: 3
Joined: Tue Jan 07, 2014 7:25 pm

Bug Report

Postby whatdoctorsknow » Tue Jan 07, 2014 8:40 pm

Bug report generated at 1/7/2014 12:40:13 PM
Program version 1.0.0.473

RedGate.Shared.Exceptions.DetailedPopulationException: An item with the same key has already been added. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at #Rjmb.#VzD.Add(#NrPb item)
at #Rjmb.#AAD.Add(#NrPb item)
at #Rjmb.#yBD.#8WD()
at #Rjmb.#yBD.#vl()
--- End of inner exception stack trace ---
at #Rjmb.#yBD.#vl()
at #5jmb.#4jmb.#l7B(#yBD databasePopulator)
at #5jmb.#4jmb.#t.#v3.#HIM()
at RedGate.Shared.Controls.ProgressDialogEx.e()

Last field accessed: is_nullable returning a System.String value NO

Last 5 rows retrieved from database:
nmotest,CVX_MAP,cvx_code,,varchar(5),NO,varchar,5,,
nmotest,app_docotr_cpt_rule,cpt_id,,varchar(36),NO,varchar,36,,
nmotest,app_docotr_cpt_rule,clinic_id,,varchar(36),NO,varchar,36,,
nmotest,app_docotr_cpt_rule,modifiedById,,varchar(36),YES,varchar,36,,
nmotest,app_docotr_cpt_rule,createdById,,varchar(36),YES,varchar,36,,
whatdoctorsknow
 
Posts: 3
Joined: Tue Jan 07, 2014 7:25 pm

Postby james.billings » Tue Jan 07, 2014 9:03 pm

I don't have a MySQL instance handy to test with I'm afraid, but what's the comparison key set up as? I see that some of the columns listed in your "last 5 rows" have similar values.

I'm not familiar with the MySQL version of the tool, but our SQL Server data compare does need to uniquely identify the rows in each table via some sort of PK / Unique Index- perhaps whatever is being picked up as the comparison key in your case is not returning unique values?
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to MySQL Data Compare

Who is online

Users browsing this forum: No registered users and 0 guests